mirror of https://github.com/vernonkeenan/lib
parent
8e1826b734
commit
4819dfa8a5
|
@ -34,6 +34,9 @@ type Account struct {
|
||||||
// Annual Revenue Estimate
|
// Annual Revenue Estimate
|
||||||
AnnualRevenue *float64 `json:"AnnualRevenue,omitempty"`
|
AnnualRevenue *float64 `json:"AnnualRevenue,omitempty"`
|
||||||
|
|
||||||
|
// Salesforce AppExchange URL
|
||||||
|
AppExchange *string `json:"AppExchange,omitempty"`
|
||||||
|
|
||||||
// billing address
|
// billing address
|
||||||
BillingAddress *Address `json:"BillingAddress,omitempty"`
|
BillingAddress *Address `json:"BillingAddress,omitempty"`
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,262 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesParams creates a new GetResearchProjectServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewGetResearchProjectServicesParams() *GetResearchProjectServicesParams {
|
||||||
|
return &GetResearchProjectServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesParamsWithTimeout creates a new GetResearchProjectServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewGetResearchProjectServicesParamsWithTimeout(timeout time.Duration) *GetResearchProjectServicesParams {
|
||||||
|
return &GetResearchProjectServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesParamsWithContext creates a new GetResearchProjectServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewGetResearchProjectServicesParamsWithContext(ctx context.Context) *GetResearchProjectServicesParams {
|
||||||
|
return &GetResearchProjectServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesParamsWithHTTPClient creates a new GetResearchProjectServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewGetResearchProjectServicesParamsWithHTTPClient(client *http.Client) *GetResearchProjectServicesParams {
|
||||||
|
return &GetResearchProjectServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the get research project services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesParams struct {
|
||||||
|
|
||||||
|
/* XAuth0UserID.
|
||||||
|
|
||||||
|
Auth0 User Id
|
||||||
|
*/
|
||||||
|
XAuth0UserID string
|
||||||
|
|
||||||
|
/* ID.
|
||||||
|
|
||||||
|
Unique Record ID
|
||||||
|
*/
|
||||||
|
ID *string
|
||||||
|
|
||||||
|
/* Limit.
|
||||||
|
|
||||||
|
How many objects to return at one time
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Limit *int64
|
||||||
|
|
||||||
|
/* Offset.
|
||||||
|
|
||||||
|
How many objects to skip?
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Offset *int64
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the get research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetResearchProjectServicesParams) WithDefaults() *GetResearchProjectServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the get research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetResearchProjectServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithTimeout(timeout time.Duration) *GetResearchProjectServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithContext(ctx context.Context) *GetResearchProjectServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithHTTPClient(client *http.Client) *GetResearchProjectServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithXAuth0UserID adds the xAuth0UserID to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithXAuth0UserID(xAuth0UserID string) *GetResearchProjectServicesParams {
|
||||||
|
o.SetXAuth0UserID(xAuth0UserID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetXAuth0UserID adds the xAuth0UserId to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetXAuth0UserID(xAuth0UserID string) {
|
||||||
|
o.XAuth0UserID = xAuth0UserID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithID adds the id to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithID(id *string) *GetResearchProjectServicesParams {
|
||||||
|
o.SetID(id)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetID adds the id to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetID(id *string) {
|
||||||
|
o.ID = id
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithLimit adds the limit to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithLimit(limit *int64) *GetResearchProjectServicesParams {
|
||||||
|
o.SetLimit(limit)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLimit adds the limit to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetLimit(limit *int64) {
|
||||||
|
o.Limit = limit
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithOffset adds the offset to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithOffset(offset *int64) *GetResearchProjectServicesParams {
|
||||||
|
o.SetOffset(offset)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOffset adds the offset to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetOffset(offset *int64) {
|
||||||
|
o.Offset = offset
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *GetResearchProjectServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// header param X-Auth0-UserId
|
||||||
|
if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.ID != nil {
|
||||||
|
|
||||||
|
// query param id
|
||||||
|
var qrID string
|
||||||
|
|
||||||
|
if o.ID != nil {
|
||||||
|
qrID = *o.ID
|
||||||
|
}
|
||||||
|
qID := qrID
|
||||||
|
if qID != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("id", qID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
|
||||||
|
// query param limit
|
||||||
|
var qrLimit int64
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
qrLimit = *o.Limit
|
||||||
|
}
|
||||||
|
qLimit := swag.FormatInt64(qrLimit)
|
||||||
|
if qLimit != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
|
||||||
|
// query param offset
|
||||||
|
var qrOffset int64
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
qrOffset = *o.Offset
|
||||||
|
}
|
||||||
|
qOffset := swag.FormatInt64(qrOffset)
|
||||||
|
if qOffset != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,486 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetResearchProjectServicesReader is a Reader for the GetResearchProjectServices structure.
|
||||||
|
type GetResearchProjectServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *GetResearchProjectServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewGetResearchProjectServicesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewGetResearchProjectServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewGetResearchProjectServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewGetResearchProjectServicesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewGetResearchProjectServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewGetResearchProjectServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesOK creates a GetResearchProjectServicesOK with default headers values
|
||||||
|
func NewGetResearchProjectServicesOK() *GetResearchProjectServicesOK {
|
||||||
|
return &GetResearchProjectServicesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
ResearchProjectService Response Object
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesOK struct {
|
||||||
|
Payload *members_models.ResearchProjectServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services o k response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services o k response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services o k response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services o k response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services o k response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services o k response
|
||||||
|
func (o *GetResearchProjectServicesOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesOK) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesOK) GetPayload() *members_models.ResearchProjectServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.ResearchProjectServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesUnauthorized creates a GetResearchProjectServicesUnauthorized with default headers values
|
||||||
|
func NewGetResearchProjectServicesUnauthorized() *GetResearchProjectServicesUnauthorized {
|
||||||
|
return &GetResearchProjectServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access Unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesUnauthorized struct {
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services unauthorized response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services unauthorized response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services unauthorized response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services unauthorized response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services unauthorized response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services unauthorized response
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesForbidden creates a GetResearchProjectServicesForbidden with default headers values
|
||||||
|
func NewGetResearchProjectServicesForbidden() *GetResearchProjectServicesForbidden {
|
||||||
|
return &GetResearchProjectServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesForbidden struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services forbidden response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services forbidden response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services forbidden response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services forbidden response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services forbidden response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services forbidden response
|
||||||
|
func (o *GetResearchProjectServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesForbidden) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesNotFound creates a GetResearchProjectServicesNotFound with default headers values
|
||||||
|
func NewGetResearchProjectServicesNotFound() *GetResearchProjectServicesNotFound {
|
||||||
|
return &GetResearchProjectServicesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesNotFound struct {
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services not found response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services not found response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services not found response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services not found response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services not found response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services not found response
|
||||||
|
func (o *GetResearchProjectServicesNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesNotFound) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesUnprocessableEntity creates a GetResearchProjectServicesUnprocessableEntity with default headers values
|
||||||
|
func NewGetResearchProjectServicesUnprocessableEntity() *GetResearchProjectServicesUnprocessableEntity {
|
||||||
|
return &GetResearchProjectServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesUnprocessableEntity struct {
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services unprocessable entity response
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesInternalServerError creates a GetResearchProjectServicesInternalServerError with default headers values
|
||||||
|
func NewGetResearchProjectServicesInternalServerError() *GetResearchProjectServicesInternalServerError {
|
||||||
|
return &GetResearchProjectServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesInternalServerError struct {
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services internal server error response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services internal server error response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services internal server error response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services internal server error response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services internal server error response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services internal server error response
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,179 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesParams creates a new PostResearchProjectServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewPostResearchProjectServicesParams() *PostResearchProjectServicesParams {
|
||||||
|
return &PostResearchProjectServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesParamsWithTimeout creates a new PostResearchProjectServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewPostResearchProjectServicesParamsWithTimeout(timeout time.Duration) *PostResearchProjectServicesParams {
|
||||||
|
return &PostResearchProjectServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesParamsWithContext creates a new PostResearchProjectServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewPostResearchProjectServicesParamsWithContext(ctx context.Context) *PostResearchProjectServicesParams {
|
||||||
|
return &PostResearchProjectServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesParamsWithHTTPClient creates a new PostResearchProjectServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewPostResearchProjectServicesParamsWithHTTPClient(client *http.Client) *PostResearchProjectServicesParams {
|
||||||
|
return &PostResearchProjectServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the post research project services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesParams struct {
|
||||||
|
|
||||||
|
/* XAuth0UserID.
|
||||||
|
|
||||||
|
Auth0 User Id
|
||||||
|
*/
|
||||||
|
XAuth0UserID string
|
||||||
|
|
||||||
|
/* ResearchProjectServiceRequest.
|
||||||
|
|
||||||
|
An array of new ResearchProjectService records
|
||||||
|
*/
|
||||||
|
ResearchProjectServiceRequest *members_models.ResearchProjectServiceRequest
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the post research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PostResearchProjectServicesParams) WithDefaults() *PostResearchProjectServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the post research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PostResearchProjectServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) WithTimeout(timeout time.Duration) *PostResearchProjectServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) WithContext(ctx context.Context) *PostResearchProjectServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) WithHTTPClient(client *http.Client) *PostResearchProjectServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithXAuth0UserID adds the xAuth0UserID to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) WithXAuth0UserID(xAuth0UserID string) *PostResearchProjectServicesParams {
|
||||||
|
o.SetXAuth0UserID(xAuth0UserID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetXAuth0UserID adds the xAuth0UserId to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) SetXAuth0UserID(xAuth0UserID string) {
|
||||||
|
o.XAuth0UserID = xAuth0UserID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithResearchProjectServiceRequest adds the researchProjectServiceRequest to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) WithResearchProjectServiceRequest(researchProjectServiceRequest *members_models.ResearchProjectServiceRequest) *PostResearchProjectServicesParams {
|
||||||
|
o.SetResearchProjectServiceRequest(researchProjectServiceRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetResearchProjectServiceRequest adds the researchProjectServiceRequest to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) SetResearchProjectServiceRequest(researchProjectServiceRequest *members_models.ResearchProjectServiceRequest) {
|
||||||
|
o.ResearchProjectServiceRequest = researchProjectServiceRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *PostResearchProjectServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// header param X-Auth0-UserId
|
||||||
|
if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if o.ResearchProjectServiceRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.ResearchProjectServiceRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,486 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PostResearchProjectServicesReader is a Reader for the PostResearchProjectServices structure.
|
||||||
|
type PostResearchProjectServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *PostResearchProjectServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewPostResearchProjectServicesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 201:
|
||||||
|
result := NewPostResearchProjectServicesCreated()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewPostResearchProjectServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewPostResearchProjectServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewPostResearchProjectServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewPostResearchProjectServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesOK creates a PostResearchProjectServicesOK with default headers values
|
||||||
|
func NewPostResearchProjectServicesOK() *PostResearchProjectServicesOK {
|
||||||
|
return &PostResearchProjectServicesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
ResearchProjectService Response Object
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesOK struct {
|
||||||
|
Payload *members_models.ResearchProjectServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services o k response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services o k response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services o k response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services o k response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services o k response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services o k response
|
||||||
|
func (o *PostResearchProjectServicesOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesOK) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesOK) GetPayload() *members_models.ResearchProjectServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.ResearchProjectServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesCreated creates a PostResearchProjectServicesCreated with default headers values
|
||||||
|
func NewPostResearchProjectServicesCreated() *PostResearchProjectServicesCreated {
|
||||||
|
return &PostResearchProjectServicesCreated{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesCreated describes a response with status code 201, with default header values.
|
||||||
|
|
||||||
|
ResearchProjectService Response Object
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesCreated struct {
|
||||||
|
Payload *members_models.ResearchProjectServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services created response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesCreated) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services created response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesCreated) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services created response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesCreated) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services created response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesCreated) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services created response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesCreated) IsCode(code int) bool {
|
||||||
|
return code == 201
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services created response
|
||||||
|
func (o *PostResearchProjectServicesCreated) Code() int {
|
||||||
|
return 201
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesCreated) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesCreated) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesCreated) GetPayload() *members_models.ResearchProjectServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.ResearchProjectServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesUnauthorized creates a PostResearchProjectServicesUnauthorized with default headers values
|
||||||
|
func NewPostResearchProjectServicesUnauthorized() *PostResearchProjectServicesUnauthorized {
|
||||||
|
return &PostResearchProjectServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access Unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesUnauthorized struct {
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services unauthorized response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services unauthorized response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services unauthorized response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services unauthorized response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services unauthorized response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services unauthorized response
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesForbidden creates a PostResearchProjectServicesForbidden with default headers values
|
||||||
|
func NewPostResearchProjectServicesForbidden() *PostResearchProjectServicesForbidden {
|
||||||
|
return &PostResearchProjectServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesForbidden struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services forbidden response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services forbidden response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services forbidden response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services forbidden response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services forbidden response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services forbidden response
|
||||||
|
func (o *PostResearchProjectServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesForbidden) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesUnprocessableEntity creates a PostResearchProjectServicesUnprocessableEntity with default headers values
|
||||||
|
func NewPostResearchProjectServicesUnprocessableEntity() *PostResearchProjectServicesUnprocessableEntity {
|
||||||
|
return &PostResearchProjectServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesUnprocessableEntity struct {
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services unprocessable entity response
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesInternalServerError creates a PostResearchProjectServicesInternalServerError with default headers values
|
||||||
|
func NewPostResearchProjectServicesInternalServerError() *PostResearchProjectServicesInternalServerError {
|
||||||
|
return &PostResearchProjectServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesInternalServerError struct {
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services internal server error response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services internal server error response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services internal server error response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services internal server error response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services internal server error response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services internal server error response
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,179 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesParams creates a new PutResearchProjectServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewPutResearchProjectServicesParams() *PutResearchProjectServicesParams {
|
||||||
|
return &PutResearchProjectServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesParamsWithTimeout creates a new PutResearchProjectServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewPutResearchProjectServicesParamsWithTimeout(timeout time.Duration) *PutResearchProjectServicesParams {
|
||||||
|
return &PutResearchProjectServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesParamsWithContext creates a new PutResearchProjectServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewPutResearchProjectServicesParamsWithContext(ctx context.Context) *PutResearchProjectServicesParams {
|
||||||
|
return &PutResearchProjectServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesParamsWithHTTPClient creates a new PutResearchProjectServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewPutResearchProjectServicesParamsWithHTTPClient(client *http.Client) *PutResearchProjectServicesParams {
|
||||||
|
return &PutResearchProjectServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the put research project services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesParams struct {
|
||||||
|
|
||||||
|
/* XAuth0UserID.
|
||||||
|
|
||||||
|
Auth0 User Id
|
||||||
|
*/
|
||||||
|
XAuth0UserID string
|
||||||
|
|
||||||
|
/* ResearchProjectServiceRequest.
|
||||||
|
|
||||||
|
An array of new ResearchProjectService records
|
||||||
|
*/
|
||||||
|
ResearchProjectServiceRequest *members_models.ResearchProjectServiceRequest
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the put research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PutResearchProjectServicesParams) WithDefaults() *PutResearchProjectServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the put research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PutResearchProjectServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) WithTimeout(timeout time.Duration) *PutResearchProjectServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) WithContext(ctx context.Context) *PutResearchProjectServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) WithHTTPClient(client *http.Client) *PutResearchProjectServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithXAuth0UserID adds the xAuth0UserID to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) WithXAuth0UserID(xAuth0UserID string) *PutResearchProjectServicesParams {
|
||||||
|
o.SetXAuth0UserID(xAuth0UserID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetXAuth0UserID adds the xAuth0UserId to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) SetXAuth0UserID(xAuth0UserID string) {
|
||||||
|
o.XAuth0UserID = xAuth0UserID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithResearchProjectServiceRequest adds the researchProjectServiceRequest to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) WithResearchProjectServiceRequest(researchProjectServiceRequest *members_models.ResearchProjectServiceRequest) *PutResearchProjectServicesParams {
|
||||||
|
o.SetResearchProjectServiceRequest(researchProjectServiceRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetResearchProjectServiceRequest adds the researchProjectServiceRequest to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) SetResearchProjectServiceRequest(researchProjectServiceRequest *members_models.ResearchProjectServiceRequest) {
|
||||||
|
o.ResearchProjectServiceRequest = researchProjectServiceRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *PutResearchProjectServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
// header param X-Auth0-UserId
|
||||||
|
if err := r.SetHeaderParam("X-Auth0-UserId", o.XAuth0UserID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if o.ResearchProjectServiceRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.ResearchProjectServiceRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,477 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PutResearchProjectServicesReader is a Reader for the PutResearchProjectServices structure.
|
||||||
|
type PutResearchProjectServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *PutResearchProjectServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewPutResearchProjectServicesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 201:
|
||||||
|
result := NewPutResearchProjectServicesCreated()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewPutResearchProjectServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewPutResearchProjectServicesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewPutResearchProjectServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewPutResearchProjectServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesOK creates a PutResearchProjectServicesOK with default headers values
|
||||||
|
func NewPutResearchProjectServicesOK() *PutResearchProjectServicesOK {
|
||||||
|
return &PutResearchProjectServicesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
ResearchProjectService Response Object
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesOK struct {
|
||||||
|
Payload *members_models.ResearchProjectServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this put research project services o k response has a 2xx status code
|
||||||
|
func (o *PutResearchProjectServicesOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this put research project services o k response has a 3xx status code
|
||||||
|
func (o *PutResearchProjectServicesOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this put research project services o k response has a 4xx status code
|
||||||
|
func (o *PutResearchProjectServicesOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this put research project services o k response has a 5xx status code
|
||||||
|
func (o *PutResearchProjectServicesOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this put research project services o k response a status code equal to that given
|
||||||
|
func (o *PutResearchProjectServicesOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the put research project services o k response
|
||||||
|
func (o *PutResearchProjectServicesOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesOK) String() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesOK) GetPayload() *members_models.ResearchProjectServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.ResearchProjectServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesCreated creates a PutResearchProjectServicesCreated with default headers values
|
||||||
|
func NewPutResearchProjectServicesCreated() *PutResearchProjectServicesCreated {
|
||||||
|
return &PutResearchProjectServicesCreated{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesCreated describes a response with status code 201, with default header values.
|
||||||
|
|
||||||
|
ResearchProjectService Response Object
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesCreated struct {
|
||||||
|
Payload *members_models.ResearchProjectServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this put research project services created response has a 2xx status code
|
||||||
|
func (o *PutResearchProjectServicesCreated) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this put research project services created response has a 3xx status code
|
||||||
|
func (o *PutResearchProjectServicesCreated) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this put research project services created response has a 4xx status code
|
||||||
|
func (o *PutResearchProjectServicesCreated) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this put research project services created response has a 5xx status code
|
||||||
|
func (o *PutResearchProjectServicesCreated) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this put research project services created response a status code equal to that given
|
||||||
|
func (o *PutResearchProjectServicesCreated) IsCode(code int) bool {
|
||||||
|
return code == 201
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the put research project services created response
|
||||||
|
func (o *PutResearchProjectServicesCreated) Code() int {
|
||||||
|
return 201
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesCreated) Error() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesCreated) String() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesCreated) GetPayload() *members_models.ResearchProjectServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.ResearchProjectServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesUnauthorized creates a PutResearchProjectServicesUnauthorized with default headers values
|
||||||
|
func NewPutResearchProjectServicesUnauthorized() *PutResearchProjectServicesUnauthorized {
|
||||||
|
return &PutResearchProjectServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access Unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesUnauthorized struct {
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this put research project services unauthorized response has a 2xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this put research project services unauthorized response has a 3xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this put research project services unauthorized response has a 4xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this put research project services unauthorized response has a 5xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this put research project services unauthorized response a status code equal to that given
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the put research project services unauthorized response
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesNotFound creates a PutResearchProjectServicesNotFound with default headers values
|
||||||
|
func NewPutResearchProjectServicesNotFound() *PutResearchProjectServicesNotFound {
|
||||||
|
return &PutResearchProjectServicesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesNotFound struct {
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this put research project services not found response has a 2xx status code
|
||||||
|
func (o *PutResearchProjectServicesNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this put research project services not found response has a 3xx status code
|
||||||
|
func (o *PutResearchProjectServicesNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this put research project services not found response has a 4xx status code
|
||||||
|
func (o *PutResearchProjectServicesNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this put research project services not found response has a 5xx status code
|
||||||
|
func (o *PutResearchProjectServicesNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this put research project services not found response a status code equal to that given
|
||||||
|
func (o *PutResearchProjectServicesNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the put research project services not found response
|
||||||
|
func (o *PutResearchProjectServicesNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesNotFound) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesUnprocessableEntity creates a PutResearchProjectServicesUnprocessableEntity with default headers values
|
||||||
|
func NewPutResearchProjectServicesUnprocessableEntity() *PutResearchProjectServicesUnprocessableEntity {
|
||||||
|
return &PutResearchProjectServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesUnprocessableEntity struct {
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this put research project services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this put research project services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this put research project services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this put research project services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this put research project services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *PutResearchProjectServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the put research project services unprocessable entity response
|
||||||
|
func (o *PutResearchProjectServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnprocessableEntity) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesInternalServerError creates a PutResearchProjectServicesInternalServerError with default headers values
|
||||||
|
func NewPutResearchProjectServicesInternalServerError() *PutResearchProjectServicesInternalServerError {
|
||||||
|
return &PutResearchProjectServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesInternalServerError struct {
|
||||||
|
Payload *members_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this put research project services internal server error response has a 2xx status code
|
||||||
|
func (o *PutResearchProjectServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this put research project services internal server error response has a 3xx status code
|
||||||
|
func (o *PutResearchProjectServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this put research project services internal server error response has a 4xx status code
|
||||||
|
func (o *PutResearchProjectServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this put research project services internal server error response has a 5xx status code
|
||||||
|
func (o *PutResearchProjectServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this put research project services internal server error response a status code equal to that given
|
||||||
|
func (o *PutResearchProjectServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the put research project services internal server error response
|
||||||
|
func (o *PutResearchProjectServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesInternalServerError) GetPayload() *members_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(members_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -40,6 +40,8 @@ type ClientService interface {
|
||||||
|
|
||||||
GetResearchProjectProducts(params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error)
|
GetResearchProjectProducts(params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error)
|
||||||
|
|
||||||
|
GetResearchProjectServices(params *GetResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectServicesOK, error)
|
||||||
|
|
||||||
GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error)
|
GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error)
|
||||||
|
|
||||||
GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error)
|
GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error)
|
||||||
|
@ -50,6 +52,8 @@ type ClientService interface {
|
||||||
|
|
||||||
PostResearchProjectProducts(params *PostResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectProductsOK, error)
|
PostResearchProjectProducts(params *PostResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectProductsOK, error)
|
||||||
|
|
||||||
|
PostResearchProjectServices(params *PostResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectServicesOK, *PostResearchProjectServicesCreated, error)
|
||||||
|
|
||||||
PostResearchProjectTopics(params *PostResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicsOK, error)
|
PostResearchProjectTopics(params *PostResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicsOK, error)
|
||||||
|
|
||||||
PostResearchProjects(params *PostResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectsOK, error)
|
PostResearchProjects(params *PostResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectsOK, error)
|
||||||
|
@ -60,6 +64,8 @@ type ClientService interface {
|
||||||
|
|
||||||
PutResearchProjectProducts(params *PutResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectProductsOK, error)
|
PutResearchProjectProducts(params *PutResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectProductsOK, error)
|
||||||
|
|
||||||
|
PutResearchProjectServices(params *PutResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectServicesOK, *PutResearchProjectServicesCreated, error)
|
||||||
|
|
||||||
PutResearchProjectTopics(params *PutResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectTopicsOK, error)
|
PutResearchProjectTopics(params *PutResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectTopicsOK, error)
|
||||||
|
|
||||||
PutResearchProjects(params *PutResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectsOK, error)
|
PutResearchProjects(params *PutResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectsOK, error)
|
||||||
|
@ -190,6 +196,47 @@ func (a *Client) GetResearchProjectProducts(params *GetResearchProjectProductsPa
|
||||||
panic(msg)
|
panic(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServices gets a list of research project services
|
||||||
|
|
||||||
|
Return a list of ResearchProjectService records from the datastore
|
||||||
|
*/
|
||||||
|
func (a *Client) GetResearchProjectServices(params *GetResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectServicesOK, error) {
|
||||||
|
// TODO: Validate the params 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,
|
||||||
|
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.(*GetResearchProjectServicesOK)
|
||||||
|
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 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
|
GetResearchProjectTopics gets a list of research project topics
|
||||||
|
|
||||||
|
@ -395,6 +442,48 @@ func (a *Client) PostResearchProjectProducts(params *PostResearchProjectProducts
|
||||||
panic(msg)
|
panic(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServices creates new research project services
|
||||||
|
|
||||||
|
Create ResearchProjectServices in the system
|
||||||
|
*/
|
||||||
|
func (a *Client) PostResearchProjectServices(params *PostResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectServicesOK, *PostResearchProjectServicesCreated, error) {
|
||||||
|
// TODO: Validate the params 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,
|
||||||
|
Context: params.Context,
|
||||||
|
Client: params.HTTPClient,
|
||||||
|
}
|
||||||
|
for _, opt := range opts {
|
||||||
|
opt(op)
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := a.transport.Submit(op)
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
switch value := result.(type) {
|
||||||
|
case *PostResearchProjectServicesOK:
|
||||||
|
return value, nil, nil
|
||||||
|
case *PostResearchProjectServicesCreated:
|
||||||
|
return nil, value, nil
|
||||||
|
}
|
||||||
|
// 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 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
|
PostResearchProjectTopics creates new research project topics
|
||||||
|
|
||||||
|
@ -600,6 +689,48 @@ func (a *Client) PutResearchProjectProducts(params *PutResearchProjectProductsPa
|
||||||
panic(msg)
|
panic(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServices updates research project services
|
||||||
|
|
||||||
|
Update ResearchProjectService in the system
|
||||||
|
*/
|
||||||
|
func (a *Client) PutResearchProjectServices(params *PutResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutResearchProjectServicesOK, *PutResearchProjectServicesCreated, error) {
|
||||||
|
// TODO: Validate the params 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,
|
||||||
|
Context: params.Context,
|
||||||
|
Client: params.HTTPClient,
|
||||||
|
}
|
||||||
|
for _, opt := range opts {
|
||||||
|
opt(op)
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := a.transport.Submit(op)
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
switch value := result.(type) {
|
||||||
|
case *PutResearchProjectServicesOK:
|
||||||
|
return value, nil, nil
|
||||||
|
case *PutResearchProjectServicesCreated:
|
||||||
|
return nil, value, nil
|
||||||
|
}
|
||||||
|
// 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 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
|
PutResearchProjectTopics updates research project topics
|
||||||
|
|
||||||
|
|
|
@ -39,15 +39,15 @@ type ResearchProjectProduct struct {
|
||||||
// last modified date
|
// last modified date
|
||||||
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||||
|
|
||||||
|
// product name
|
||||||
|
ProductName *string `json:"ProductName,omitempty"`
|
||||||
|
|
||||||
// research project ID
|
// research project ID
|
||||||
ResearchProjectID *string `json:"ResearchProjectID,omitempty"`
|
ResearchProjectID *string `json:"ResearchProjectID,omitempty"`
|
||||||
|
|
||||||
// tenant ID
|
// tenant ID
|
||||||
TenantID *string `json:"TenantID,omitempty"`
|
TenantID *string `json:"TenantID,omitempty"`
|
||||||
|
|
||||||
// title
|
|
||||||
Title *string `json:"Title,omitempty"`
|
|
||||||
|
|
||||||
// user ID
|
// user ID
|
||||||
UserID *string `json:"UserID,omitempty"`
|
UserID *string `json:"UserID,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
// 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 members_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ResearchProjectService research project service
|
||||||
|
//
|
||||||
|
// swagger:model researchProjectService
|
||||||
|
type ResearchProjectService struct {
|
||||||
|
|
||||||
|
// company service ID
|
||||||
|
CompanyServiceID *string `json:"CompanyServiceID,omitempty"`
|
||||||
|
|
||||||
|
// created by ID
|
||||||
|
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||||
|
|
||||||
|
// created date
|
||||||
|
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||||
|
|
||||||
|
// ID
|
||||||
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
|
// last modified by ID
|
||||||
|
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||||
|
|
||||||
|
// last modified date
|
||||||
|
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||||
|
|
||||||
|
// research project ID
|
||||||
|
ResearchProjectID *string `json:"ResearchProjectID,omitempty"`
|
||||||
|
|
||||||
|
// service name
|
||||||
|
ServiceName *string `json:"ServiceName,omitempty"`
|
||||||
|
|
||||||
|
// tenant ID
|
||||||
|
TenantID *string `json:"TenantID,omitempty"`
|
||||||
|
|
||||||
|
// user ID
|
||||||
|
UserID *string `json:"UserID,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this research project service
|
||||||
|
func (m *ResearchProjectService) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validates this research project service based on context it is used
|
||||||
|
func (m *ResearchProjectService) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectService) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectService) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ResearchProjectService
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
// 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 members_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ResearchProjectServiceRequest An array of ResearchProjectService objects
|
||||||
|
//
|
||||||
|
// swagger:model ResearchProjectServiceRequest
|
||||||
|
type ResearchProjectServiceRequest struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*ResearchProjectService `json:"Data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this research project service request
|
||||||
|
func (m *ResearchProjectServiceRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceRequest) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this research project service request based on the context it is used
|
||||||
|
func (m *ResearchProjectServiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectServiceRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectServiceRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ResearchProjectServiceRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,166 @@
|
||||||
|
// 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 members_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ResearchProjectServiceResponse An array of ResearchProjectService objects
|
||||||
|
//
|
||||||
|
// swagger:model ResearchProjectServiceResponse
|
||||||
|
type ResearchProjectServiceResponse struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*ResearchProjectService `json:"Data"`
|
||||||
|
|
||||||
|
// meta
|
||||||
|
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this research project service response
|
||||||
|
func (m *ResearchProjectServiceResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateMeta(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceResponse) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceResponse) validateMeta(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Meta) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this research project service response based on the context it is used
|
||||||
|
func (m *ResearchProjectServiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectServiceResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectServiceResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ResearchProjectServiceResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -76,7 +76,7 @@ func NewGetCompanyProductsOK() *GetCompanyProductsOK {
|
||||||
/*
|
/*
|
||||||
GetCompanyProductsOK describes a response with status code 200, with default header values.
|
GetCompanyProductsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Response with Company objects
|
Response with CompanyProduct objects
|
||||||
*/
|
*/
|
||||||
type GetCompanyProductsOK struct {
|
type GetCompanyProductsOK struct {
|
||||||
Payload *research_models.CompanyProductResponse
|
Payload *research_models.CompanyProductResponse
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPostCompanyProductsOK() *PostCompanyProductsOK {
|
||||||
/*
|
/*
|
||||||
PostCompanyProductsOK describes a response with status code 200, with default header values.
|
PostCompanyProductsOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Response with Company objects
|
Response with CompanyProduct objects
|
||||||
*/
|
*/
|
||||||
type PostCompanyProductsOK struct {
|
type PostCompanyProductsOK struct {
|
||||||
Payload *research_models.CompanyProductResponse
|
Payload *research_models.CompanyProductResponse
|
||||||
|
|
|
@ -76,7 +76,7 @@ func NewPutCompanyProductOK() *PutCompanyProductOK {
|
||||||
/*
|
/*
|
||||||
PutCompanyProductOK describes a response with status code 200, with default header values.
|
PutCompanyProductOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
Response with Company objects
|
Response with CompanyProduct objects
|
||||||
*/
|
*/
|
||||||
type PutCompanyProductOK struct {
|
type PutCompanyProductOK struct {
|
||||||
Payload *research_models.CompanyProductResponse
|
Payload *research_models.CompanyProductResponse
|
||||||
|
|
|
@ -0,0 +1,172 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// 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 company services API client.
|
||||||
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||||
|
return &Client{transport: transport, formats: formats}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Client for company services 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 {
|
||||||
|
CreateCompanyService(params *CreateCompanyServiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCompanyServiceOK, error)
|
||||||
|
|
||||||
|
DeleteCompanyService(params *DeleteCompanyServiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteCompanyServiceOK, error)
|
||||||
|
|
||||||
|
GetCompanyServices(params *GetCompanyServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompanyServicesOK, error)
|
||||||
|
|
||||||
|
SetTransport(transport runtime.ClientTransport)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CreateCompanyService creates a new company service
|
||||||
|
|
||||||
|
Create a new CompanyService record
|
||||||
|
*/
|
||||||
|
func (a *Client) CreateCompanyService(params *CreateCompanyServiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCompanyServiceOK, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewCreateCompanyServiceParams()
|
||||||
|
}
|
||||||
|
op := &runtime.ClientOperation{
|
||||||
|
ID: "createCompanyService",
|
||||||
|
Method: "POST",
|
||||||
|
PathPattern: "/companyservices",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"http"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &CreateCompanyServiceReader{formats: a.formats},
|
||||||
|
AuthInfo: authInfo,
|
||||||
|
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.(*CreateCompanyServiceOK)
|
||||||
|
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 createCompanyService: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
|
panic(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteCompanyService deletes a company service
|
||||||
|
|
||||||
|
Delete CompanyService record
|
||||||
|
*/
|
||||||
|
func (a *Client) DeleteCompanyService(params *DeleteCompanyServiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteCompanyServiceOK, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewDeleteCompanyServiceParams()
|
||||||
|
}
|
||||||
|
op := &runtime.ClientOperation{
|
||||||
|
ID: "deleteCompanyService",
|
||||||
|
Method: "DELETE",
|
||||||
|
PathPattern: "/companyservices",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"http"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &DeleteCompanyServiceReader{formats: a.formats},
|
||||||
|
AuthInfo: authInfo,
|
||||||
|
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.(*DeleteCompanyServiceOK)
|
||||||
|
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 deleteCompanyService: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
|
panic(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServices gets a list of company services
|
||||||
|
|
||||||
|
Return a list of all available CompanyServices
|
||||||
|
*/
|
||||||
|
func (a *Client) GetCompanyServices(params *GetCompanyServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompanyServicesOK, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewGetCompanyServicesParams()
|
||||||
|
}
|
||||||
|
op := &runtime.ClientOperation{
|
||||||
|
ID: "getCompanyServices",
|
||||||
|
Method: "GET",
|
||||||
|
PathPattern: "/companyservices",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"http"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &GetCompanyServicesReader{formats: a.formats},
|
||||||
|
AuthInfo: authInfo,
|
||||||
|
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.(*GetCompanyServicesOK)
|
||||||
|
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 getCompanyServices: 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
|
||||||
|
}
|
|
@ -0,0 +1,157 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewCreateCompanyServiceParams creates a new CreateCompanyServiceParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewCreateCompanyServiceParams() *CreateCompanyServiceParams {
|
||||||
|
return &CreateCompanyServiceParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCompanyServiceParamsWithTimeout creates a new CreateCompanyServiceParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewCreateCompanyServiceParamsWithTimeout(timeout time.Duration) *CreateCompanyServiceParams {
|
||||||
|
return &CreateCompanyServiceParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCompanyServiceParamsWithContext creates a new CreateCompanyServiceParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewCreateCompanyServiceParamsWithContext(ctx context.Context) *CreateCompanyServiceParams {
|
||||||
|
return &CreateCompanyServiceParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCompanyServiceParamsWithHTTPClient creates a new CreateCompanyServiceParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewCreateCompanyServiceParamsWithHTTPClient(client *http.Client) *CreateCompanyServiceParams {
|
||||||
|
return &CreateCompanyServiceParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CreateCompanyServiceParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the create company service operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type CreateCompanyServiceParams struct {
|
||||||
|
|
||||||
|
/* CompanyServiceRequest.
|
||||||
|
|
||||||
|
An array of new CompanyService records
|
||||||
|
*/
|
||||||
|
CompanyServiceRequest *research_models.CompanyServiceRequest
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the create company service params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *CreateCompanyServiceParams) WithDefaults() *CreateCompanyServiceParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the create company service params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *CreateCompanyServiceParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the create company service params
|
||||||
|
func (o *CreateCompanyServiceParams) WithTimeout(timeout time.Duration) *CreateCompanyServiceParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the create company service params
|
||||||
|
func (o *CreateCompanyServiceParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the create company service params
|
||||||
|
func (o *CreateCompanyServiceParams) WithContext(ctx context.Context) *CreateCompanyServiceParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the create company service params
|
||||||
|
func (o *CreateCompanyServiceParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the create company service params
|
||||||
|
func (o *CreateCompanyServiceParams) WithHTTPClient(client *http.Client) *CreateCompanyServiceParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the create company service params
|
||||||
|
func (o *CreateCompanyServiceParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithCompanyServiceRequest adds the companyServiceRequest to the create company service params
|
||||||
|
func (o *CreateCompanyServiceParams) WithCompanyServiceRequest(companyServiceRequest *research_models.CompanyServiceRequest) *CreateCompanyServiceParams {
|
||||||
|
o.SetCompanyServiceRequest(companyServiceRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCompanyServiceRequest adds the companyServiceRequest to the create company service params
|
||||||
|
func (o *CreateCompanyServiceParams) SetCompanyServiceRequest(companyServiceRequest *research_models.CompanyServiceRequest) {
|
||||||
|
o.CompanyServiceRequest = companyServiceRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *CreateCompanyServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
if o.CompanyServiceRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.CompanyServiceRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,522 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateCompanyServiceReader is a Reader for the CreateCompanyService structure.
|
||||||
|
type CreateCompanyServiceReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *CreateCompanyServiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewCreateCompanyServiceOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewCreateCompanyServiceUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewCreateCompanyServiceForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 409:
|
||||||
|
result := NewCreateCompanyServiceConflict()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewCreateCompanyServiceUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewCreateCompanyServiceInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCompanyServiceOK creates a CreateCompanyServiceOK with default headers values
|
||||||
|
func NewCreateCompanyServiceOK() *CreateCompanyServiceOK {
|
||||||
|
return &CreateCompanyServiceOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CreateCompanyServiceOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
Response with CompanyService objects
|
||||||
|
*/
|
||||||
|
type CreateCompanyServiceOK struct {
|
||||||
|
Payload *research_models.CompanyServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this create company service o k response has a 2xx status code
|
||||||
|
func (o *CreateCompanyServiceOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this create company service o k response has a 3xx status code
|
||||||
|
func (o *CreateCompanyServiceOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this create company service o k response has a 4xx status code
|
||||||
|
func (o *CreateCompanyServiceOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this create company service o k response has a 5xx status code
|
||||||
|
func (o *CreateCompanyServiceOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this create company service o k response a status code equal to that given
|
||||||
|
func (o *CreateCompanyServiceOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the create company service o k response
|
||||||
|
func (o *CreateCompanyServiceOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceOK) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceOK) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceOK) GetPayload() *research_models.CompanyServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(research_models.CompanyServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCompanyServiceUnauthorized creates a CreateCompanyServiceUnauthorized with default headers values
|
||||||
|
func NewCreateCompanyServiceUnauthorized() *CreateCompanyServiceUnauthorized {
|
||||||
|
return &CreateCompanyServiceUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CreateCompanyServiceUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type CreateCompanyServiceUnauthorized struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this create company service unauthorized response has a 2xx status code
|
||||||
|
func (o *CreateCompanyServiceUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this create company service unauthorized response has a 3xx status code
|
||||||
|
func (o *CreateCompanyServiceUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this create company service unauthorized response has a 4xx status code
|
||||||
|
func (o *CreateCompanyServiceUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this create company service unauthorized response has a 5xx status code
|
||||||
|
func (o *CreateCompanyServiceUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this create company service unauthorized response a status code equal to that given
|
||||||
|
func (o *CreateCompanyServiceUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the create company service unauthorized response
|
||||||
|
func (o *CreateCompanyServiceUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceUnauthorized) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCompanyServiceForbidden creates a CreateCompanyServiceForbidden with default headers values
|
||||||
|
func NewCreateCompanyServiceForbidden() *CreateCompanyServiceForbidden {
|
||||||
|
return &CreateCompanyServiceForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CreateCompanyServiceForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type CreateCompanyServiceForbidden struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this create company service forbidden response has a 2xx status code
|
||||||
|
func (o *CreateCompanyServiceForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this create company service forbidden response has a 3xx status code
|
||||||
|
func (o *CreateCompanyServiceForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this create company service forbidden response has a 4xx status code
|
||||||
|
func (o *CreateCompanyServiceForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this create company service forbidden response has a 5xx status code
|
||||||
|
func (o *CreateCompanyServiceForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this create company service forbidden response a status code equal to that given
|
||||||
|
func (o *CreateCompanyServiceForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the create company service forbidden response
|
||||||
|
func (o *CreateCompanyServiceForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceForbidden) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCompanyServiceConflict creates a CreateCompanyServiceConflict with default headers values
|
||||||
|
func NewCreateCompanyServiceConflict() *CreateCompanyServiceConflict {
|
||||||
|
return &CreateCompanyServiceConflict{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CreateCompanyServiceConflict describes a response with status code 409, with default header values.
|
||||||
|
|
||||||
|
Conflict
|
||||||
|
*/
|
||||||
|
type CreateCompanyServiceConflict struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this create company service conflict response has a 2xx status code
|
||||||
|
func (o *CreateCompanyServiceConflict) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this create company service conflict response has a 3xx status code
|
||||||
|
func (o *CreateCompanyServiceConflict) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this create company service conflict response has a 4xx status code
|
||||||
|
func (o *CreateCompanyServiceConflict) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this create company service conflict response has a 5xx status code
|
||||||
|
func (o *CreateCompanyServiceConflict) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this create company service conflict response a status code equal to that given
|
||||||
|
func (o *CreateCompanyServiceConflict) IsCode(code int) bool {
|
||||||
|
return code == 409
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the create company service conflict response
|
||||||
|
func (o *CreateCompanyServiceConflict) Code() int {
|
||||||
|
return 409
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceConflict) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceConflict %+v", 409, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceConflict) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceConflict %+v", 409, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceConflict) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCompanyServiceUnprocessableEntity creates a CreateCompanyServiceUnprocessableEntity with default headers values
|
||||||
|
func NewCreateCompanyServiceUnprocessableEntity() *CreateCompanyServiceUnprocessableEntity {
|
||||||
|
return &CreateCompanyServiceUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CreateCompanyServiceUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type CreateCompanyServiceUnprocessableEntity struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this create company service unprocessable entity response has a 2xx status code
|
||||||
|
func (o *CreateCompanyServiceUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this create company service unprocessable entity response has a 3xx status code
|
||||||
|
func (o *CreateCompanyServiceUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this create company service unprocessable entity response has a 4xx status code
|
||||||
|
func (o *CreateCompanyServiceUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this create company service unprocessable entity response has a 5xx status code
|
||||||
|
func (o *CreateCompanyServiceUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this create company service unprocessable entity response a status code equal to that given
|
||||||
|
func (o *CreateCompanyServiceUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the create company service unprocessable entity response
|
||||||
|
func (o *CreateCompanyServiceUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceUnprocessableEntity) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCreateCompanyServiceInternalServerError creates a CreateCompanyServiceInternalServerError with default headers values
|
||||||
|
func NewCreateCompanyServiceInternalServerError() *CreateCompanyServiceInternalServerError {
|
||||||
|
return &CreateCompanyServiceInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CreateCompanyServiceInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type CreateCompanyServiceInternalServerError struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this create company service internal server error response has a 2xx status code
|
||||||
|
func (o *CreateCompanyServiceInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this create company service internal server error response has a 3xx status code
|
||||||
|
func (o *CreateCompanyServiceInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this create company service internal server error response has a 4xx status code
|
||||||
|
func (o *CreateCompanyServiceInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this create company service internal server error response has a 5xx status code
|
||||||
|
func (o *CreateCompanyServiceInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this create company service internal server error response a status code equal to that given
|
||||||
|
func (o *CreateCompanyServiceInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the create company service internal server error response
|
||||||
|
func (o *CreateCompanyServiceInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] createCompanyServiceInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceInternalServerError) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *CreateCompanyServiceInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,167 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewDeleteCompanyServiceParams creates a new DeleteCompanyServiceParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewDeleteCompanyServiceParams() *DeleteCompanyServiceParams {
|
||||||
|
return &DeleteCompanyServiceParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteCompanyServiceParamsWithTimeout creates a new DeleteCompanyServiceParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewDeleteCompanyServiceParamsWithTimeout(timeout time.Duration) *DeleteCompanyServiceParams {
|
||||||
|
return &DeleteCompanyServiceParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteCompanyServiceParamsWithContext creates a new DeleteCompanyServiceParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewDeleteCompanyServiceParamsWithContext(ctx context.Context) *DeleteCompanyServiceParams {
|
||||||
|
return &DeleteCompanyServiceParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteCompanyServiceParamsWithHTTPClient creates a new DeleteCompanyServiceParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewDeleteCompanyServiceParamsWithHTTPClient(client *http.Client) *DeleteCompanyServiceParams {
|
||||||
|
return &DeleteCompanyServiceParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteCompanyServiceParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the delete company service operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type DeleteCompanyServiceParams struct {
|
||||||
|
|
||||||
|
/* CompanyServiceID.
|
||||||
|
|
||||||
|
CompanyService record ID
|
||||||
|
*/
|
||||||
|
CompanyServiceID *string
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the delete company service params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *DeleteCompanyServiceParams) WithDefaults() *DeleteCompanyServiceParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the delete company service params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *DeleteCompanyServiceParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the delete company service params
|
||||||
|
func (o *DeleteCompanyServiceParams) WithTimeout(timeout time.Duration) *DeleteCompanyServiceParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the delete company service params
|
||||||
|
func (o *DeleteCompanyServiceParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the delete company service params
|
||||||
|
func (o *DeleteCompanyServiceParams) WithContext(ctx context.Context) *DeleteCompanyServiceParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the delete company service params
|
||||||
|
func (o *DeleteCompanyServiceParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the delete company service params
|
||||||
|
func (o *DeleteCompanyServiceParams) WithHTTPClient(client *http.Client) *DeleteCompanyServiceParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the delete company service params
|
||||||
|
func (o *DeleteCompanyServiceParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithCompanyServiceID adds the companyServiceID to the delete company service params
|
||||||
|
func (o *DeleteCompanyServiceParams) WithCompanyServiceID(companyServiceID *string) *DeleteCompanyServiceParams {
|
||||||
|
o.SetCompanyServiceID(companyServiceID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCompanyServiceID adds the companyServiceId to the delete company service params
|
||||||
|
func (o *DeleteCompanyServiceParams) SetCompanyServiceID(companyServiceID *string) {
|
||||||
|
o.CompanyServiceID = companyServiceID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *DeleteCompanyServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if o.CompanyServiceID != nil {
|
||||||
|
|
||||||
|
// query param companyServiceId
|
||||||
|
var qrCompanyServiceID string
|
||||||
|
|
||||||
|
if o.CompanyServiceID != nil {
|
||||||
|
qrCompanyServiceID = *o.CompanyServiceID
|
||||||
|
}
|
||||||
|
qCompanyServiceID := qrCompanyServiceID
|
||||||
|
if qCompanyServiceID != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("companyServiceId", qCompanyServiceID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,531 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeleteCompanyServiceReader is a Reader for the DeleteCompanyService structure.
|
||||||
|
type DeleteCompanyServiceReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *DeleteCompanyServiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewDeleteCompanyServiceOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewDeleteCompanyServiceUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewDeleteCompanyServiceForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewDeleteCompanyServiceNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewDeleteCompanyServiceUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewDeleteCompanyServiceInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteCompanyServiceOK creates a DeleteCompanyServiceOK with default headers values
|
||||||
|
func NewDeleteCompanyServiceOK() *DeleteCompanyServiceOK {
|
||||||
|
return &DeleteCompanyServiceOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteCompanyServiceOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
Response with Message Objects with Delete Status
|
||||||
|
*/
|
||||||
|
type DeleteCompanyServiceOK struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.DeleteResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete company service o k response has a 2xx status code
|
||||||
|
func (o *DeleteCompanyServiceOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete company service o k response has a 3xx status code
|
||||||
|
func (o *DeleteCompanyServiceOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete company service o k response has a 4xx status code
|
||||||
|
func (o *DeleteCompanyServiceOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete company service o k response has a 5xx status code
|
||||||
|
func (o *DeleteCompanyServiceOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete company service o k response a status code equal to that given
|
||||||
|
func (o *DeleteCompanyServiceOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete company service o k response
|
||||||
|
func (o *DeleteCompanyServiceOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceOK) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceOK) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceOK) GetPayload() *research_models.DeleteResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.DeleteResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteCompanyServiceUnauthorized creates a DeleteCompanyServiceUnauthorized with default headers values
|
||||||
|
func NewDeleteCompanyServiceUnauthorized() *DeleteCompanyServiceUnauthorized {
|
||||||
|
return &DeleteCompanyServiceUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteCompanyServiceUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type DeleteCompanyServiceUnauthorized struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete company service unauthorized response has a 2xx status code
|
||||||
|
func (o *DeleteCompanyServiceUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete company service unauthorized response has a 3xx status code
|
||||||
|
func (o *DeleteCompanyServiceUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete company service unauthorized response has a 4xx status code
|
||||||
|
func (o *DeleteCompanyServiceUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete company service unauthorized response has a 5xx status code
|
||||||
|
func (o *DeleteCompanyServiceUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete company service unauthorized response a status code equal to that given
|
||||||
|
func (o *DeleteCompanyServiceUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete company service unauthorized response
|
||||||
|
func (o *DeleteCompanyServiceUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceUnauthorized) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteCompanyServiceForbidden creates a DeleteCompanyServiceForbidden with default headers values
|
||||||
|
func NewDeleteCompanyServiceForbidden() *DeleteCompanyServiceForbidden {
|
||||||
|
return &DeleteCompanyServiceForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteCompanyServiceForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type DeleteCompanyServiceForbidden struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete company service forbidden response has a 2xx status code
|
||||||
|
func (o *DeleteCompanyServiceForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete company service forbidden response has a 3xx status code
|
||||||
|
func (o *DeleteCompanyServiceForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete company service forbidden response has a 4xx status code
|
||||||
|
func (o *DeleteCompanyServiceForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete company service forbidden response has a 5xx status code
|
||||||
|
func (o *DeleteCompanyServiceForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete company service forbidden response a status code equal to that given
|
||||||
|
func (o *DeleteCompanyServiceForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete company service forbidden response
|
||||||
|
func (o *DeleteCompanyServiceForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceForbidden) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteCompanyServiceNotFound creates a DeleteCompanyServiceNotFound with default headers values
|
||||||
|
func NewDeleteCompanyServiceNotFound() *DeleteCompanyServiceNotFound {
|
||||||
|
return &DeleteCompanyServiceNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteCompanyServiceNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type DeleteCompanyServiceNotFound struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete company service not found response has a 2xx status code
|
||||||
|
func (o *DeleteCompanyServiceNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete company service not found response has a 3xx status code
|
||||||
|
func (o *DeleteCompanyServiceNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete company service not found response has a 4xx status code
|
||||||
|
func (o *DeleteCompanyServiceNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete company service not found response has a 5xx status code
|
||||||
|
func (o *DeleteCompanyServiceNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete company service not found response a status code equal to that given
|
||||||
|
func (o *DeleteCompanyServiceNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete company service not found response
|
||||||
|
func (o *DeleteCompanyServiceNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceNotFound) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteCompanyServiceUnprocessableEntity creates a DeleteCompanyServiceUnprocessableEntity with default headers values
|
||||||
|
func NewDeleteCompanyServiceUnprocessableEntity() *DeleteCompanyServiceUnprocessableEntity {
|
||||||
|
return &DeleteCompanyServiceUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteCompanyServiceUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type DeleteCompanyServiceUnprocessableEntity struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete company service unprocessable entity response has a 2xx status code
|
||||||
|
func (o *DeleteCompanyServiceUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete company service unprocessable entity response has a 3xx status code
|
||||||
|
func (o *DeleteCompanyServiceUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete company service unprocessable entity response has a 4xx status code
|
||||||
|
func (o *DeleteCompanyServiceUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete company service unprocessable entity response has a 5xx status code
|
||||||
|
func (o *DeleteCompanyServiceUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete company service unprocessable entity response a status code equal to that given
|
||||||
|
func (o *DeleteCompanyServiceUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete company service unprocessable entity response
|
||||||
|
func (o *DeleteCompanyServiceUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceUnprocessableEntity) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteCompanyServiceInternalServerError creates a DeleteCompanyServiceInternalServerError with default headers values
|
||||||
|
func NewDeleteCompanyServiceInternalServerError() *DeleteCompanyServiceInternalServerError {
|
||||||
|
return &DeleteCompanyServiceInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteCompanyServiceInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type DeleteCompanyServiceInternalServerError struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete company service internal server error response has a 2xx status code
|
||||||
|
func (o *DeleteCompanyServiceInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete company service internal server error response has a 3xx status code
|
||||||
|
func (o *DeleteCompanyServiceInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete company service internal server error response has a 4xx status code
|
||||||
|
func (o *DeleteCompanyServiceInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete company service internal server error response has a 5xx status code
|
||||||
|
func (o *DeleteCompanyServiceInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete company service internal server error response a status code equal to that given
|
||||||
|
func (o *DeleteCompanyServiceInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete company service internal server error response
|
||||||
|
func (o *DeleteCompanyServiceInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceInternalServerError) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteCompanyServiceInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,274 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewGetCompanyServicesParams creates a new GetCompanyServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewGetCompanyServicesParams() *GetCompanyServicesParams {
|
||||||
|
return &GetCompanyServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesParamsWithTimeout creates a new GetCompanyServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewGetCompanyServicesParamsWithTimeout(timeout time.Duration) *GetCompanyServicesParams {
|
||||||
|
return &GetCompanyServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesParamsWithContext creates a new GetCompanyServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewGetCompanyServicesParamsWithContext(ctx context.Context) *GetCompanyServicesParams {
|
||||||
|
return &GetCompanyServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesParamsWithHTTPClient creates a new GetCompanyServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewGetCompanyServicesParamsWithHTTPClient(client *http.Client) *GetCompanyServicesParams {
|
||||||
|
return &GetCompanyServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the get company services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesParams struct {
|
||||||
|
|
||||||
|
/* CompanyServiceID.
|
||||||
|
|
||||||
|
CompanyService record ID
|
||||||
|
*/
|
||||||
|
CompanyServiceID *string
|
||||||
|
|
||||||
|
/* Limit.
|
||||||
|
|
||||||
|
How many objects to return at one time
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Limit *int64
|
||||||
|
|
||||||
|
/* Offset.
|
||||||
|
|
||||||
|
How many objects to skip?
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Offset *int64
|
||||||
|
|
||||||
|
/* Slug.
|
||||||
|
|
||||||
|
The Slug of this Object
|
||||||
|
*/
|
||||||
|
Slug *string
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the get company services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetCompanyServicesParams) WithDefaults() *GetCompanyServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the get company services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetCompanyServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithTimeout(timeout time.Duration) *GetCompanyServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithContext(ctx context.Context) *GetCompanyServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithHTTPClient(client *http.Client) *GetCompanyServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithCompanyServiceID adds the companyServiceID to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithCompanyServiceID(companyServiceID *string) *GetCompanyServicesParams {
|
||||||
|
o.SetCompanyServiceID(companyServiceID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCompanyServiceID adds the companyServiceId to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetCompanyServiceID(companyServiceID *string) {
|
||||||
|
o.CompanyServiceID = companyServiceID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithLimit adds the limit to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithLimit(limit *int64) *GetCompanyServicesParams {
|
||||||
|
o.SetLimit(limit)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLimit adds the limit to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetLimit(limit *int64) {
|
||||||
|
o.Limit = limit
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithOffset adds the offset to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithOffset(offset *int64) *GetCompanyServicesParams {
|
||||||
|
o.SetOffset(offset)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOffset adds the offset to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetOffset(offset *int64) {
|
||||||
|
o.Offset = offset
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithSlug adds the slug to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithSlug(slug *string) *GetCompanyServicesParams {
|
||||||
|
o.SetSlug(slug)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSlug adds the slug to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetSlug(slug *string) {
|
||||||
|
o.Slug = slug
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *GetCompanyServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if o.CompanyServiceID != nil {
|
||||||
|
|
||||||
|
// query param companyServiceId
|
||||||
|
var qrCompanyServiceID string
|
||||||
|
|
||||||
|
if o.CompanyServiceID != nil {
|
||||||
|
qrCompanyServiceID = *o.CompanyServiceID
|
||||||
|
}
|
||||||
|
qCompanyServiceID := qrCompanyServiceID
|
||||||
|
if qCompanyServiceID != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("companyServiceId", qCompanyServiceID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
|
||||||
|
// query param limit
|
||||||
|
var qrLimit int64
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
qrLimit = *o.Limit
|
||||||
|
}
|
||||||
|
qLimit := swag.FormatInt64(qrLimit)
|
||||||
|
if qLimit != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
|
||||||
|
// query param offset
|
||||||
|
var qrOffset int64
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
qrOffset = *o.Offset
|
||||||
|
}
|
||||||
|
qOffset := swag.FormatInt64(qrOffset)
|
||||||
|
if qOffset != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Slug != nil {
|
||||||
|
|
||||||
|
// query param slug
|
||||||
|
var qrSlug string
|
||||||
|
|
||||||
|
if o.Slug != nil {
|
||||||
|
qrSlug = *o.Slug
|
||||||
|
}
|
||||||
|
qSlug := qrSlug
|
||||||
|
if qSlug != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("slug", qSlug); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,522 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetCompanyServicesReader is a Reader for the GetCompanyServices structure.
|
||||||
|
type GetCompanyServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *GetCompanyServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewGetCompanyServicesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewGetCompanyServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewGetCompanyServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewGetCompanyServicesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewGetCompanyServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewGetCompanyServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesOK creates a GetCompanyServicesOK with default headers values
|
||||||
|
func NewGetCompanyServicesOK() *GetCompanyServicesOK {
|
||||||
|
return &GetCompanyServicesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
Response with CompanyService objects
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesOK struct {
|
||||||
|
Payload *research_models.CompanyServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services o k response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services o k response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services o k response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services o k response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services o k response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services o k response
|
||||||
|
func (o *GetCompanyServicesOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesOK) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesOK) GetPayload() *research_models.CompanyServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(research_models.CompanyServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesUnauthorized creates a GetCompanyServicesUnauthorized with default headers values
|
||||||
|
func NewGetCompanyServicesUnauthorized() *GetCompanyServicesUnauthorized {
|
||||||
|
return &GetCompanyServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesUnauthorized struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services unauthorized response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services unauthorized response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services unauthorized response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services unauthorized response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services unauthorized response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services unauthorized response
|
||||||
|
func (o *GetCompanyServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnauthorized) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesForbidden creates a GetCompanyServicesForbidden with default headers values
|
||||||
|
func NewGetCompanyServicesForbidden() *GetCompanyServicesForbidden {
|
||||||
|
return &GetCompanyServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesForbidden struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services forbidden response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services forbidden response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services forbidden response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services forbidden response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services forbidden response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services forbidden response
|
||||||
|
func (o *GetCompanyServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesForbidden) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesNotFound creates a GetCompanyServicesNotFound with default headers values
|
||||||
|
func NewGetCompanyServicesNotFound() *GetCompanyServicesNotFound {
|
||||||
|
return &GetCompanyServicesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesNotFound struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services not found response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services not found response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services not found response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services not found response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services not found response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services not found response
|
||||||
|
func (o *GetCompanyServicesNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesNotFound) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesUnprocessableEntity creates a GetCompanyServicesUnprocessableEntity with default headers values
|
||||||
|
func NewGetCompanyServicesUnprocessableEntity() *GetCompanyServicesUnprocessableEntity {
|
||||||
|
return &GetCompanyServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesUnprocessableEntity struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services unprocessable entity response
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesInternalServerError creates a GetCompanyServicesInternalServerError with default headers values
|
||||||
|
func NewGetCompanyServicesInternalServerError() *GetCompanyServicesInternalServerError {
|
||||||
|
return &GetCompanyServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesInternalServerError struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services internal server error response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services internal server error response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services internal server error response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services internal server error response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services internal server error response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services internal server error response
|
||||||
|
func (o *GetCompanyServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesInternalServerError) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,240 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewDeleteIndustryServiceParams creates a new DeleteIndustryServiceParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewDeleteIndustryServiceParams() *DeleteIndustryServiceParams {
|
||||||
|
return &DeleteIndustryServiceParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteIndustryServiceParamsWithTimeout creates a new DeleteIndustryServiceParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewDeleteIndustryServiceParamsWithTimeout(timeout time.Duration) *DeleteIndustryServiceParams {
|
||||||
|
return &DeleteIndustryServiceParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteIndustryServiceParamsWithContext creates a new DeleteIndustryServiceParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewDeleteIndustryServiceParamsWithContext(ctx context.Context) *DeleteIndustryServiceParams {
|
||||||
|
return &DeleteIndustryServiceParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteIndustryServiceParamsWithHTTPClient creates a new DeleteIndustryServiceParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewDeleteIndustryServiceParamsWithHTTPClient(client *http.Client) *DeleteIndustryServiceParams {
|
||||||
|
return &DeleteIndustryServiceParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteIndustryServiceParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the delete industry service operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type DeleteIndustryServiceParams struct {
|
||||||
|
|
||||||
|
/* IndustryServiceID.
|
||||||
|
|
||||||
|
IndustryService record ID
|
||||||
|
*/
|
||||||
|
IndustryServiceID *string
|
||||||
|
|
||||||
|
/* Limit.
|
||||||
|
|
||||||
|
How many objects to return at one time
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Limit *int64
|
||||||
|
|
||||||
|
/* Offset.
|
||||||
|
|
||||||
|
How many objects to skip?
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Offset *int64
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the delete industry service params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *DeleteIndustryServiceParams) WithDefaults() *DeleteIndustryServiceParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the delete industry service params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *DeleteIndustryServiceParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) WithTimeout(timeout time.Duration) *DeleteIndustryServiceParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) WithContext(ctx context.Context) *DeleteIndustryServiceParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) WithHTTPClient(client *http.Client) *DeleteIndustryServiceParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithIndustryServiceID adds the industryServiceID to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) WithIndustryServiceID(industryServiceID *string) *DeleteIndustryServiceParams {
|
||||||
|
o.SetIndustryServiceID(industryServiceID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetIndustryServiceID adds the industryServiceId to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) SetIndustryServiceID(industryServiceID *string) {
|
||||||
|
o.IndustryServiceID = industryServiceID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithLimit adds the limit to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) WithLimit(limit *int64) *DeleteIndustryServiceParams {
|
||||||
|
o.SetLimit(limit)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLimit adds the limit to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) SetLimit(limit *int64) {
|
||||||
|
o.Limit = limit
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithOffset adds the offset to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) WithOffset(offset *int64) *DeleteIndustryServiceParams {
|
||||||
|
o.SetOffset(offset)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOffset adds the offset to the delete industry service params
|
||||||
|
func (o *DeleteIndustryServiceParams) SetOffset(offset *int64) {
|
||||||
|
o.Offset = offset
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *DeleteIndustryServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if o.IndustryServiceID != nil {
|
||||||
|
|
||||||
|
// query param industryServiceId
|
||||||
|
var qrIndustryServiceID string
|
||||||
|
|
||||||
|
if o.IndustryServiceID != nil {
|
||||||
|
qrIndustryServiceID = *o.IndustryServiceID
|
||||||
|
}
|
||||||
|
qIndustryServiceID := qrIndustryServiceID
|
||||||
|
if qIndustryServiceID != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("industryServiceId", qIndustryServiceID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
|
||||||
|
// query param limit
|
||||||
|
var qrLimit int64
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
qrLimit = *o.Limit
|
||||||
|
}
|
||||||
|
qLimit := swag.FormatInt64(qrLimit)
|
||||||
|
if qLimit != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
|
||||||
|
// query param offset
|
||||||
|
var qrOffset int64
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
qrOffset = *o.Offset
|
||||||
|
}
|
||||||
|
qOffset := swag.FormatInt64(qrOffset)
|
||||||
|
if qOffset != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,531 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeleteIndustryServiceReader is a Reader for the DeleteIndustryService structure.
|
||||||
|
type DeleteIndustryServiceReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *DeleteIndustryServiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewDeleteIndustryServiceOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewDeleteIndustryServiceUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewDeleteIndustryServiceForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewDeleteIndustryServiceNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewDeleteIndustryServiceUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewDeleteIndustryServiceInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteIndustryServiceOK creates a DeleteIndustryServiceOK with default headers values
|
||||||
|
func NewDeleteIndustryServiceOK() *DeleteIndustryServiceOK {
|
||||||
|
return &DeleteIndustryServiceOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteIndustryServiceOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
Response with Message Objects with Delete Status
|
||||||
|
*/
|
||||||
|
type DeleteIndustryServiceOK struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.DeleteResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete industry service o k response has a 2xx status code
|
||||||
|
func (o *DeleteIndustryServiceOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete industry service o k response has a 3xx status code
|
||||||
|
func (o *DeleteIndustryServiceOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete industry service o k response has a 4xx status code
|
||||||
|
func (o *DeleteIndustryServiceOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete industry service o k response has a 5xx status code
|
||||||
|
func (o *DeleteIndustryServiceOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete industry service o k response a status code equal to that given
|
||||||
|
func (o *DeleteIndustryServiceOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete industry service o k response
|
||||||
|
func (o *DeleteIndustryServiceOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceOK) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceOK) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceOK) GetPayload() *research_models.DeleteResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.DeleteResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteIndustryServiceUnauthorized creates a DeleteIndustryServiceUnauthorized with default headers values
|
||||||
|
func NewDeleteIndustryServiceUnauthorized() *DeleteIndustryServiceUnauthorized {
|
||||||
|
return &DeleteIndustryServiceUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteIndustryServiceUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type DeleteIndustryServiceUnauthorized struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete industry service unauthorized response has a 2xx status code
|
||||||
|
func (o *DeleteIndustryServiceUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete industry service unauthorized response has a 3xx status code
|
||||||
|
func (o *DeleteIndustryServiceUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete industry service unauthorized response has a 4xx status code
|
||||||
|
func (o *DeleteIndustryServiceUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete industry service unauthorized response has a 5xx status code
|
||||||
|
func (o *DeleteIndustryServiceUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete industry service unauthorized response a status code equal to that given
|
||||||
|
func (o *DeleteIndustryServiceUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete industry service unauthorized response
|
||||||
|
func (o *DeleteIndustryServiceUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceUnauthorized) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteIndustryServiceForbidden creates a DeleteIndustryServiceForbidden with default headers values
|
||||||
|
func NewDeleteIndustryServiceForbidden() *DeleteIndustryServiceForbidden {
|
||||||
|
return &DeleteIndustryServiceForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteIndustryServiceForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type DeleteIndustryServiceForbidden struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete industry service forbidden response has a 2xx status code
|
||||||
|
func (o *DeleteIndustryServiceForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete industry service forbidden response has a 3xx status code
|
||||||
|
func (o *DeleteIndustryServiceForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete industry service forbidden response has a 4xx status code
|
||||||
|
func (o *DeleteIndustryServiceForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete industry service forbidden response has a 5xx status code
|
||||||
|
func (o *DeleteIndustryServiceForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete industry service forbidden response a status code equal to that given
|
||||||
|
func (o *DeleteIndustryServiceForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete industry service forbidden response
|
||||||
|
func (o *DeleteIndustryServiceForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceForbidden) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteIndustryServiceNotFound creates a DeleteIndustryServiceNotFound with default headers values
|
||||||
|
func NewDeleteIndustryServiceNotFound() *DeleteIndustryServiceNotFound {
|
||||||
|
return &DeleteIndustryServiceNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteIndustryServiceNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type DeleteIndustryServiceNotFound struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete industry service not found response has a 2xx status code
|
||||||
|
func (o *DeleteIndustryServiceNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete industry service not found response has a 3xx status code
|
||||||
|
func (o *DeleteIndustryServiceNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete industry service not found response has a 4xx status code
|
||||||
|
func (o *DeleteIndustryServiceNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete industry service not found response has a 5xx status code
|
||||||
|
func (o *DeleteIndustryServiceNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete industry service not found response a status code equal to that given
|
||||||
|
func (o *DeleteIndustryServiceNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete industry service not found response
|
||||||
|
func (o *DeleteIndustryServiceNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceNotFound) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteIndustryServiceUnprocessableEntity creates a DeleteIndustryServiceUnprocessableEntity with default headers values
|
||||||
|
func NewDeleteIndustryServiceUnprocessableEntity() *DeleteIndustryServiceUnprocessableEntity {
|
||||||
|
return &DeleteIndustryServiceUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteIndustryServiceUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type DeleteIndustryServiceUnprocessableEntity struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete industry service unprocessable entity response has a 2xx status code
|
||||||
|
func (o *DeleteIndustryServiceUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete industry service unprocessable entity response has a 3xx status code
|
||||||
|
func (o *DeleteIndustryServiceUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete industry service unprocessable entity response has a 4xx status code
|
||||||
|
func (o *DeleteIndustryServiceUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete industry service unprocessable entity response has a 5xx status code
|
||||||
|
func (o *DeleteIndustryServiceUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete industry service unprocessable entity response a status code equal to that given
|
||||||
|
func (o *DeleteIndustryServiceUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete industry service unprocessable entity response
|
||||||
|
func (o *DeleteIndustryServiceUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceUnprocessableEntity) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDeleteIndustryServiceInternalServerError creates a DeleteIndustryServiceInternalServerError with default headers values
|
||||||
|
func NewDeleteIndustryServiceInternalServerError() *DeleteIndustryServiceInternalServerError {
|
||||||
|
return &DeleteIndustryServiceInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteIndustryServiceInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type DeleteIndustryServiceInternalServerError struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this delete industry service internal server error response has a 2xx status code
|
||||||
|
func (o *DeleteIndustryServiceInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this delete industry service internal server error response has a 3xx status code
|
||||||
|
func (o *DeleteIndustryServiceInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this delete industry service internal server error response has a 4xx status code
|
||||||
|
func (o *DeleteIndustryServiceInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this delete industry service internal server error response has a 5xx status code
|
||||||
|
func (o *DeleteIndustryServiceInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this delete industry service internal server error response a status code equal to that given
|
||||||
|
func (o *DeleteIndustryServiceInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the delete industry service internal server error response
|
||||||
|
func (o *DeleteIndustryServiceInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[DELETE /industryservices][%d] deleteIndustryServiceInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceInternalServerError) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *DeleteIndustryServiceInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,240 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewGetIndustryServicesParams creates a new GetIndustryServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewGetIndustryServicesParams() *GetIndustryServicesParams {
|
||||||
|
return &GetIndustryServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesParamsWithTimeout creates a new GetIndustryServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewGetIndustryServicesParamsWithTimeout(timeout time.Duration) *GetIndustryServicesParams {
|
||||||
|
return &GetIndustryServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesParamsWithContext creates a new GetIndustryServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewGetIndustryServicesParamsWithContext(ctx context.Context) *GetIndustryServicesParams {
|
||||||
|
return &GetIndustryServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesParamsWithHTTPClient creates a new GetIndustryServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewGetIndustryServicesParamsWithHTTPClient(client *http.Client) *GetIndustryServicesParams {
|
||||||
|
return &GetIndustryServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the get industry services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesParams struct {
|
||||||
|
|
||||||
|
/* IndustryServiceID.
|
||||||
|
|
||||||
|
IndustryService record ID
|
||||||
|
*/
|
||||||
|
IndustryServiceID *string
|
||||||
|
|
||||||
|
/* Limit.
|
||||||
|
|
||||||
|
How many objects to return at one time
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Limit *int64
|
||||||
|
|
||||||
|
/* Offset.
|
||||||
|
|
||||||
|
How many objects to skip?
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Offset *int64
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the get industry services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetIndustryServicesParams) WithDefaults() *GetIndustryServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the get industry services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetIndustryServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithTimeout(timeout time.Duration) *GetIndustryServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithContext(ctx context.Context) *GetIndustryServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithHTTPClient(client *http.Client) *GetIndustryServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithIndustryServiceID adds the industryServiceID to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithIndustryServiceID(industryServiceID *string) *GetIndustryServicesParams {
|
||||||
|
o.SetIndustryServiceID(industryServiceID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetIndustryServiceID adds the industryServiceId to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetIndustryServiceID(industryServiceID *string) {
|
||||||
|
o.IndustryServiceID = industryServiceID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithLimit adds the limit to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithLimit(limit *int64) *GetIndustryServicesParams {
|
||||||
|
o.SetLimit(limit)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLimit adds the limit to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetLimit(limit *int64) {
|
||||||
|
o.Limit = limit
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithOffset adds the offset to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithOffset(offset *int64) *GetIndustryServicesParams {
|
||||||
|
o.SetOffset(offset)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOffset adds the offset to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetOffset(offset *int64) {
|
||||||
|
o.Offset = offset
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *GetIndustryServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if o.IndustryServiceID != nil {
|
||||||
|
|
||||||
|
// query param industryServiceId
|
||||||
|
var qrIndustryServiceID string
|
||||||
|
|
||||||
|
if o.IndustryServiceID != nil {
|
||||||
|
qrIndustryServiceID = *o.IndustryServiceID
|
||||||
|
}
|
||||||
|
qIndustryServiceID := qrIndustryServiceID
|
||||||
|
if qIndustryServiceID != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("industryServiceId", qIndustryServiceID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
|
||||||
|
// query param limit
|
||||||
|
var qrLimit int64
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
qrLimit = *o.Limit
|
||||||
|
}
|
||||||
|
qLimit := swag.FormatInt64(qrLimit)
|
||||||
|
if qLimit != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
|
||||||
|
// query param offset
|
||||||
|
var qrOffset int64
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
qrOffset = *o.Offset
|
||||||
|
}
|
||||||
|
qOffset := swag.FormatInt64(qrOffset)
|
||||||
|
if qOffset != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,522 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetIndustryServicesReader is a Reader for the GetIndustryServices structure.
|
||||||
|
type GetIndustryServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *GetIndustryServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewGetIndustryServicesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewGetIndustryServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewGetIndustryServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewGetIndustryServicesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewGetIndustryServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewGetIndustryServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesOK creates a GetIndustryServicesOK with default headers values
|
||||||
|
func NewGetIndustryServicesOK() *GetIndustryServicesOK {
|
||||||
|
return &GetIndustryServicesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
Response with IndustryService objects
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesOK struct {
|
||||||
|
Payload *research_models.IndustryServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services o k response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services o k response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services o k response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services o k response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services o k response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services o k response
|
||||||
|
func (o *GetIndustryServicesOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesOK) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesOK) GetPayload() *research_models.IndustryServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(research_models.IndustryServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesUnauthorized creates a GetIndustryServicesUnauthorized with default headers values
|
||||||
|
func NewGetIndustryServicesUnauthorized() *GetIndustryServicesUnauthorized {
|
||||||
|
return &GetIndustryServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesUnauthorized struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services unauthorized response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services unauthorized response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services unauthorized response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services unauthorized response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services unauthorized response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services unauthorized response
|
||||||
|
func (o *GetIndustryServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnauthorized) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesForbidden creates a GetIndustryServicesForbidden with default headers values
|
||||||
|
func NewGetIndustryServicesForbidden() *GetIndustryServicesForbidden {
|
||||||
|
return &GetIndustryServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesForbidden struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services forbidden response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services forbidden response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services forbidden response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services forbidden response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services forbidden response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services forbidden response
|
||||||
|
func (o *GetIndustryServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesForbidden) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesNotFound creates a GetIndustryServicesNotFound with default headers values
|
||||||
|
func NewGetIndustryServicesNotFound() *GetIndustryServicesNotFound {
|
||||||
|
return &GetIndustryServicesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesNotFound struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services not found response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services not found response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services not found response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services not found response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services not found response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services not found response
|
||||||
|
func (o *GetIndustryServicesNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesNotFound) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesUnprocessableEntity creates a GetIndustryServicesUnprocessableEntity with default headers values
|
||||||
|
func NewGetIndustryServicesUnprocessableEntity() *GetIndustryServicesUnprocessableEntity {
|
||||||
|
return &GetIndustryServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesUnprocessableEntity struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services unprocessable entity response
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesInternalServerError creates a GetIndustryServicesInternalServerError with default headers values
|
||||||
|
func NewGetIndustryServicesInternalServerError() *GetIndustryServicesInternalServerError {
|
||||||
|
return &GetIndustryServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesInternalServerError struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services internal server error response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services internal server error response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services internal server error response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services internal server error response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services internal server error response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services internal server error response
|
||||||
|
func (o *GetIndustryServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesInternalServerError) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,172 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// 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 industry services API client.
|
||||||
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||||
|
return &Client{transport: transport, formats: formats}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Client for industry services 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 {
|
||||||
|
DeleteIndustryService(params *DeleteIndustryServiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIndustryServiceOK, error)
|
||||||
|
|
||||||
|
GetIndustryServices(params *GetIndustryServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustryServicesOK, error)
|
||||||
|
|
||||||
|
PostIndustryServices(params *PostIndustryServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustryServicesOK, error)
|
||||||
|
|
||||||
|
SetTransport(transport runtime.ClientTransport)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DeleteIndustryService deletes an industry service
|
||||||
|
|
||||||
|
Delete IndustryService record
|
||||||
|
*/
|
||||||
|
func (a *Client) DeleteIndustryService(params *DeleteIndustryServiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIndustryServiceOK, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewDeleteIndustryServiceParams()
|
||||||
|
}
|
||||||
|
op := &runtime.ClientOperation{
|
||||||
|
ID: "deleteIndustryService",
|
||||||
|
Method: "DELETE",
|
||||||
|
PathPattern: "/industryservices",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"http"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &DeleteIndustryServiceReader{formats: a.formats},
|
||||||
|
AuthInfo: authInfo,
|
||||||
|
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.(*DeleteIndustryServiceOK)
|
||||||
|
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 deleteIndustryService: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
|
panic(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServices gets a list of industryservices
|
||||||
|
|
||||||
|
Return a list of all available IndustryServices
|
||||||
|
*/
|
||||||
|
func (a *Client) GetIndustryServices(params *GetIndustryServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustryServicesOK, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewGetIndustryServicesParams()
|
||||||
|
}
|
||||||
|
op := &runtime.ClientOperation{
|
||||||
|
ID: "getIndustryServices",
|
||||||
|
Method: "GET",
|
||||||
|
PathPattern: "/industryservices",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"http"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &GetIndustryServicesReader{formats: a.formats},
|
||||||
|
AuthInfo: authInfo,
|
||||||
|
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.(*GetIndustryServicesOK)
|
||||||
|
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 getIndustryServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
|
panic(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServices adds a new industry service to salesforce devops net
|
||||||
|
|
||||||
|
IndustryService record to be added
|
||||||
|
*/
|
||||||
|
func (a *Client) PostIndustryServices(params *PostIndustryServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustryServicesOK, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewPostIndustryServicesParams()
|
||||||
|
}
|
||||||
|
op := &runtime.ClientOperation{
|
||||||
|
ID: "postIndustryServices",
|
||||||
|
Method: "POST",
|
||||||
|
PathPattern: "/industryservices",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"http"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &PostIndustryServicesReader{formats: a.formats},
|
||||||
|
AuthInfo: authInfo,
|
||||||
|
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.(*PostIndustryServicesOK)
|
||||||
|
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 postIndustryServices: 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
|
||||||
|
}
|
|
@ -0,0 +1,157 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewPostIndustryServicesParams creates a new PostIndustryServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewPostIndustryServicesParams() *PostIndustryServicesParams {
|
||||||
|
return &PostIndustryServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesParamsWithTimeout creates a new PostIndustryServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewPostIndustryServicesParamsWithTimeout(timeout time.Duration) *PostIndustryServicesParams {
|
||||||
|
return &PostIndustryServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesParamsWithContext creates a new PostIndustryServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewPostIndustryServicesParamsWithContext(ctx context.Context) *PostIndustryServicesParams {
|
||||||
|
return &PostIndustryServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesParamsWithHTTPClient creates a new PostIndustryServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewPostIndustryServicesParamsWithHTTPClient(client *http.Client) *PostIndustryServicesParams {
|
||||||
|
return &PostIndustryServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the post industry services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesParams struct {
|
||||||
|
|
||||||
|
/* IndustryServiceRequest.
|
||||||
|
|
||||||
|
An array of new IndustryService records
|
||||||
|
*/
|
||||||
|
IndustryServiceRequest *research_models.IndustryServiceRequest
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the post industry services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PostIndustryServicesParams) WithDefaults() *PostIndustryServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the post industry services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PostIndustryServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) WithTimeout(timeout time.Duration) *PostIndustryServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) WithContext(ctx context.Context) *PostIndustryServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) WithHTTPClient(client *http.Client) *PostIndustryServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithIndustryServiceRequest adds the industryServiceRequest to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) WithIndustryServiceRequest(industryServiceRequest *research_models.IndustryServiceRequest) *PostIndustryServicesParams {
|
||||||
|
o.SetIndustryServiceRequest(industryServiceRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetIndustryServiceRequest adds the industryServiceRequest to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) SetIndustryServiceRequest(industryServiceRequest *research_models.IndustryServiceRequest) {
|
||||||
|
o.IndustryServiceRequest = industryServiceRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *PostIndustryServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
if o.IndustryServiceRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.IndustryServiceRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,522 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PostIndustryServicesReader is a Reader for the PostIndustryServices structure.
|
||||||
|
type PostIndustryServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *PostIndustryServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewPostIndustryServicesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewPostIndustryServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewPostIndustryServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewPostIndustryServicesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewPostIndustryServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewPostIndustryServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesOK creates a PostIndustryServicesOK with default headers values
|
||||||
|
func NewPostIndustryServicesOK() *PostIndustryServicesOK {
|
||||||
|
return &PostIndustryServicesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
Response with IndustryService objects
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesOK struct {
|
||||||
|
Payload *research_models.IndustryServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services o k response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services o k response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services o k response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services o k response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services o k response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services o k response
|
||||||
|
func (o *PostIndustryServicesOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesOK) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesOK) GetPayload() *research_models.IndustryServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(research_models.IndustryServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesUnauthorized creates a PostIndustryServicesUnauthorized with default headers values
|
||||||
|
func NewPostIndustryServicesUnauthorized() *PostIndustryServicesUnauthorized {
|
||||||
|
return &PostIndustryServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesUnauthorized struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services unauthorized response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services unauthorized response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services unauthorized response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services unauthorized response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services unauthorized response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services unauthorized response
|
||||||
|
func (o *PostIndustryServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnauthorized) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesForbidden creates a PostIndustryServicesForbidden with default headers values
|
||||||
|
func NewPostIndustryServicesForbidden() *PostIndustryServicesForbidden {
|
||||||
|
return &PostIndustryServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesForbidden struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services forbidden response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services forbidden response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services forbidden response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services forbidden response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services forbidden response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services forbidden response
|
||||||
|
func (o *PostIndustryServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesForbidden) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesNotFound creates a PostIndustryServicesNotFound with default headers values
|
||||||
|
func NewPostIndustryServicesNotFound() *PostIndustryServicesNotFound {
|
||||||
|
return &PostIndustryServicesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesNotFound struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services not found response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services not found response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services not found response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services not found response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services not found response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services not found response
|
||||||
|
func (o *PostIndustryServicesNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesNotFound) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesUnprocessableEntity creates a PostIndustryServicesUnprocessableEntity with default headers values
|
||||||
|
func NewPostIndustryServicesUnprocessableEntity() *PostIndustryServicesUnprocessableEntity {
|
||||||
|
return &PostIndustryServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesUnprocessableEntity struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services unprocessable entity response
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesInternalServerError creates a PostIndustryServicesInternalServerError with default headers values
|
||||||
|
func NewPostIndustryServicesInternalServerError() *PostIndustryServicesInternalServerError {
|
||||||
|
return &PostIndustryServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesInternalServerError struct {
|
||||||
|
AccessControlAllowOrigin string
|
||||||
|
|
||||||
|
Payload *research_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services internal server error response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services internal server error response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services internal server error response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services internal server error response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services internal server error response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services internal server error response
|
||||||
|
func (o *PostIndustryServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesInternalServerError) GetPayload() *research_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
// hydrates response header Access-Control-Allow-Origin
|
||||||
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||||
|
|
||||||
|
if hdrAccessControlAllowOrigin != "" {
|
||||||
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||||
|
}
|
||||||
|
|
||||||
|
o.Payload = new(research_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -16,11 +16,13 @@ import (
|
||||||
|
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/company_categories"
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/company_categories"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/company_products"
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/company_products"
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/company_services"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/factors"
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/factors"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/financial_statements"
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/financial_statements"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/industry"
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/industry"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/industry_companies"
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/industry_companies"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/industry_products"
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/industry_products"
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/industry_services"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/observations"
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/observations"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/topics"
|
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/topics"
|
||||||
)
|
)
|
||||||
|
@ -69,11 +71,13 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Research {
|
||||||
cli.Transport = transport
|
cli.Transport = transport
|
||||||
cli.CompanyCategories = company_categories.New(transport, formats)
|
cli.CompanyCategories = company_categories.New(transport, formats)
|
||||||
cli.CompanyProducts = company_products.New(transport, formats)
|
cli.CompanyProducts = company_products.New(transport, formats)
|
||||||
|
cli.CompanyServices = company_services.New(transport, formats)
|
||||||
cli.Factors = factors.New(transport, formats)
|
cli.Factors = factors.New(transport, formats)
|
||||||
cli.FinancialStatements = financial_statements.New(transport, formats)
|
cli.FinancialStatements = financial_statements.New(transport, formats)
|
||||||
cli.Industry = industry.New(transport, formats)
|
cli.Industry = industry.New(transport, formats)
|
||||||
cli.IndustryCompanies = industry_companies.New(transport, formats)
|
cli.IndustryCompanies = industry_companies.New(transport, formats)
|
||||||
cli.IndustryProducts = industry_products.New(transport, formats)
|
cli.IndustryProducts = industry_products.New(transport, formats)
|
||||||
|
cli.IndustryServices = industry_services.New(transport, formats)
|
||||||
cli.Observations = observations.New(transport, formats)
|
cli.Observations = observations.New(transport, formats)
|
||||||
cli.Topics = topics.New(transport, formats)
|
cli.Topics = topics.New(transport, formats)
|
||||||
return cli
|
return cli
|
||||||
|
@ -124,6 +128,8 @@ type Research struct {
|
||||||
|
|
||||||
CompanyProducts company_products.ClientService
|
CompanyProducts company_products.ClientService
|
||||||
|
|
||||||
|
CompanyServices company_services.ClientService
|
||||||
|
|
||||||
Factors factors.ClientService
|
Factors factors.ClientService
|
||||||
|
|
||||||
FinancialStatements financial_statements.ClientService
|
FinancialStatements financial_statements.ClientService
|
||||||
|
@ -134,6 +140,8 @@ type Research struct {
|
||||||
|
|
||||||
IndustryProducts industry_products.ClientService
|
IndustryProducts industry_products.ClientService
|
||||||
|
|
||||||
|
IndustryServices industry_services.ClientService
|
||||||
|
|
||||||
Observations observations.ClientService
|
Observations observations.ClientService
|
||||||
|
|
||||||
Topics topics.ClientService
|
Topics topics.ClientService
|
||||||
|
@ -146,11 +154,13 @@ func (c *Research) SetTransport(transport runtime.ClientTransport) {
|
||||||
c.Transport = transport
|
c.Transport = transport
|
||||||
c.CompanyCategories.SetTransport(transport)
|
c.CompanyCategories.SetTransport(transport)
|
||||||
c.CompanyProducts.SetTransport(transport)
|
c.CompanyProducts.SetTransport(transport)
|
||||||
|
c.CompanyServices.SetTransport(transport)
|
||||||
c.Factors.SetTransport(transport)
|
c.Factors.SetTransport(transport)
|
||||||
c.FinancialStatements.SetTransport(transport)
|
c.FinancialStatements.SetTransport(transport)
|
||||||
c.Industry.SetTransport(transport)
|
c.Industry.SetTransport(transport)
|
||||||
c.IndustryCompanies.SetTransport(transport)
|
c.IndustryCompanies.SetTransport(transport)
|
||||||
c.IndustryProducts.SetTransport(transport)
|
c.IndustryProducts.SetTransport(transport)
|
||||||
|
c.IndustryServices.SetTransport(transport)
|
||||||
c.Observations.SetTransport(transport)
|
c.Observations.SetTransport(transport)
|
||||||
c.Topics.SetTransport(transport)
|
c.Topics.SetTransport(transport)
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,9 @@ type CompanyProduct struct {
|
||||||
// ID of the Company that owns this Product
|
// ID of the Company that owns this Product
|
||||||
AccountID *string `json:"AccountID,omitempty"`
|
AccountID *string `json:"AccountID,omitempty"`
|
||||||
|
|
||||||
|
// Salesforce AppExchange URL
|
||||||
|
AppExchange *string `json:"AppExchange,omitempty"`
|
||||||
|
|
||||||
// Created By User ID
|
// Created By User ID
|
||||||
CreatedByID *string `json:"CreatedByID,omitempty"`
|
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,177 @@
|
||||||
|
// 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_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CompanyService A service performed by a Company
|
||||||
|
//
|
||||||
|
// swagger:model CompanyService
|
||||||
|
type CompanyService struct {
|
||||||
|
|
||||||
|
// ID of the Company that owns this Service
|
||||||
|
AccountID string `json:"AccountID,omitempty"`
|
||||||
|
|
||||||
|
// Salesforce AppExchange URL
|
||||||
|
AppExchange *string `json:"AppExchange,omitempty"`
|
||||||
|
|
||||||
|
// Created By User ID
|
||||||
|
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||||
|
|
||||||
|
// Created Date
|
||||||
|
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||||
|
|
||||||
|
// Description of service
|
||||||
|
Description *string `json:"Description,omitempty"`
|
||||||
|
|
||||||
|
// Full Description of service
|
||||||
|
FullDescription *string `json:"FullDescription,omitempty"`
|
||||||
|
|
||||||
|
// Record Id
|
||||||
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
|
// Image Alt Text
|
||||||
|
ImageAltText *string `json:"ImageAltText,omitempty"`
|
||||||
|
|
||||||
|
// Image URL
|
||||||
|
ImageURL *string `json:"ImageURL,omitempty"`
|
||||||
|
|
||||||
|
// Industries
|
||||||
|
Industries []*Industry `json:"Industries"`
|
||||||
|
|
||||||
|
// Last Modified By User ID
|
||||||
|
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||||
|
|
||||||
|
// Last Modified Date
|
||||||
|
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||||
|
|
||||||
|
// Logo
|
||||||
|
Logo *string `json:"Logo,omitempty"`
|
||||||
|
|
||||||
|
// Service Name
|
||||||
|
Name *string `json:"Name,omitempty"`
|
||||||
|
|
||||||
|
// Published
|
||||||
|
Published *bool `json:"Published,omitempty"`
|
||||||
|
|
||||||
|
// Salesforce Specific
|
||||||
|
SalesforceSpecific *bool `json:"SalesforceSpecific,omitempty"`
|
||||||
|
|
||||||
|
// Service Video ID
|
||||||
|
ServiceVideoID *string `json:"ServiceVideoID,omitempty"`
|
||||||
|
|
||||||
|
// Slug
|
||||||
|
Slug *string `json:"Slug,omitempty"`
|
||||||
|
|
||||||
|
// Tag Line
|
||||||
|
TagLine *string `json:"TagLine,omitempty"`
|
||||||
|
|
||||||
|
// URL
|
||||||
|
URL *string `json:"URL,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this company service
|
||||||
|
func (m *CompanyService) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateIndustries(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyService) validateIndustries(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Industries) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Industries); i++ {
|
||||||
|
if swag.IsZero(m.Industries[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Industries[i] != nil {
|
||||||
|
if err := m.Industries[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this company service based on the context it is used
|
||||||
|
func (m *CompanyService) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateIndustries(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyService) contextValidateIndustries(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Industries); i++ {
|
||||||
|
|
||||||
|
if m.Industries[i] != nil {
|
||||||
|
if err := m.Industries[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *CompanyService) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *CompanyService) UnmarshalBinary(b []byte) error {
|
||||||
|
var res CompanyService
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
// 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_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CompanyServiceRequest An array of CompanyService objects submitted for processing
|
||||||
|
//
|
||||||
|
// swagger:model CompanyServiceRequest
|
||||||
|
type CompanyServiceRequest struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*CompanyService `json:"Data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this company service request
|
||||||
|
func (m *CompanyServiceRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceRequest) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this company service request based on the context it is used
|
||||||
|
func (m *CompanyServiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *CompanyServiceRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *CompanyServiceRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res CompanyServiceRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,166 @@
|
||||||
|
// 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_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CompanyServiceResponse An array of CompanyService objects produced in response to a request
|
||||||
|
//
|
||||||
|
// swagger:model CompanyServiceResponse
|
||||||
|
type CompanyServiceResponse struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*CompanyService `json:"Data"`
|
||||||
|
|
||||||
|
// meta
|
||||||
|
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this company service response
|
||||||
|
func (m *CompanyServiceResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateMeta(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceResponse) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceResponse) validateMeta(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Meta) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this company service response based on the context it is used
|
||||||
|
func (m *CompanyServiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *CompanyServiceResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *CompanyServiceResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res CompanyServiceResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -26,6 +26,9 @@ type Industry struct {
|
||||||
// The list of Products in this industry
|
// The list of Products in this industry
|
||||||
CompanyProducts []*CompanyProduct `json:"CompanyProducts"`
|
CompanyProducts []*CompanyProduct `json:"CompanyProducts"`
|
||||||
|
|
||||||
|
// The list of Services in this industry
|
||||||
|
CompanyServices []*CompanyService `json:"CompanyServices"`
|
||||||
|
|
||||||
// Created By User ID
|
// Created By User ID
|
||||||
CreatedByID *string `json:"CreatedByID,omitempty"`
|
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||||
|
|
||||||
|
@ -83,6 +86,10 @@ func (m *Industry) Validate(formats strfmt.Registry) error {
|
||||||
res = append(res, err)
|
res = append(res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := m.validateCompanyServices(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
if len(res) > 0 {
|
if len(res) > 0 {
|
||||||
return errors.CompositeValidationError(res...)
|
return errors.CompositeValidationError(res...)
|
||||||
}
|
}
|
||||||
|
@ -115,6 +122,32 @@ func (m *Industry) validateCompanyProducts(formats strfmt.Registry) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *Industry) validateCompanyServices(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.CompanyServices) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.CompanyServices); i++ {
|
||||||
|
if swag.IsZero(m.CompanyServices[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.CompanyServices[i] != nil {
|
||||||
|
if err := m.CompanyServices[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("CompanyServices" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("CompanyServices" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// ContextValidate validate this industry based on the context it is used
|
// ContextValidate validate this industry based on the context it is used
|
||||||
func (m *Industry) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
func (m *Industry) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
var res []error
|
var res []error
|
||||||
|
@ -123,6 +156,10 @@ func (m *Industry) ContextValidate(ctx context.Context, formats strfmt.Registry)
|
||||||
res = append(res, err)
|
res = append(res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := m.contextValidateCompanyServices(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
if len(res) > 0 {
|
if len(res) > 0 {
|
||||||
return errors.CompositeValidationError(res...)
|
return errors.CompositeValidationError(res...)
|
||||||
}
|
}
|
||||||
|
@ -149,6 +186,26 @@ func (m *Industry) contextValidateCompanyProducts(ctx context.Context, formats s
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *Industry) contextValidateCompanyServices(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.CompanyServices); i++ {
|
||||||
|
|
||||||
|
if m.CompanyServices[i] != nil {
|
||||||
|
if err := m.CompanyServices[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("CompanyServices" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("CompanyServices" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
// MarshalBinary interface implementation
|
||||||
func (m *Industry) MarshalBinary() ([]byte, error) {
|
func (m *Industry) MarshalBinary() ([]byte, error) {
|
||||||
if m == nil {
|
if m == nil {
|
||||||
|
|
|
@ -0,0 +1,175 @@
|
||||||
|
// 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_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// IndustryService Junction Object bewtwen Industry and CompanyService
|
||||||
|
//
|
||||||
|
// swagger:model IndustryService
|
||||||
|
type IndustryService struct {
|
||||||
|
|
||||||
|
// company service
|
||||||
|
CompanyService *CompanyService `json:"CompanyService,omitempty"`
|
||||||
|
|
||||||
|
// company service ID
|
||||||
|
CompanyServiceID *string `json:"CompanyServiceID,omitempty"`
|
||||||
|
|
||||||
|
// Created By User ID
|
||||||
|
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||||
|
|
||||||
|
// Created Date
|
||||||
|
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||||
|
|
||||||
|
// Record Id
|
||||||
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
|
// industry
|
||||||
|
Industry *Industry `json:"Industry,omitempty"`
|
||||||
|
|
||||||
|
// industry ID
|
||||||
|
IndustryID *string `json:"IndustryID,omitempty"`
|
||||||
|
|
||||||
|
// Last Modified By User ID
|
||||||
|
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||||
|
|
||||||
|
// Last Modified Date
|
||||||
|
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this industry service
|
||||||
|
func (m *IndustryService) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateCompanyService(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateIndustry(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryService) validateCompanyService(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.CompanyService) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.CompanyService != nil {
|
||||||
|
if err := m.CompanyService.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("CompanyService")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("CompanyService")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryService) validateIndustry(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Industry) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Industry != nil {
|
||||||
|
if err := m.Industry.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Industry")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Industry")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this industry service based on the context it is used
|
||||||
|
func (m *IndustryService) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateCompanyService(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.contextValidateIndustry(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryService) contextValidateCompanyService(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if m.CompanyService != nil {
|
||||||
|
if err := m.CompanyService.ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("CompanyService")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("CompanyService")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryService) contextValidateIndustry(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if m.Industry != nil {
|
||||||
|
if err := m.Industry.ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Industry")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Industry")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *IndustryService) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *IndustryService) UnmarshalBinary(b []byte) error {
|
||||||
|
var res IndustryService
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
// 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_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// IndustryServiceRequest An array of IndustryService objects submitted for processing
|
||||||
|
//
|
||||||
|
// swagger:model IndustryServiceRequest
|
||||||
|
type IndustryServiceRequest struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*IndustryService `json:"Data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this industry service request
|
||||||
|
func (m *IndustryServiceRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceRequest) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this industry service request based on the context it is used
|
||||||
|
func (m *IndustryServiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *IndustryServiceRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *IndustryServiceRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res IndustryServiceRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,166 @@
|
||||||
|
// 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_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// IndustryServiceResponse An array of IndustryService objects produced in response to a request
|
||||||
|
//
|
||||||
|
// swagger:model IndustryServiceResponse
|
||||||
|
type IndustryServiceResponse struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*IndustryService `json:"Data"`
|
||||||
|
|
||||||
|
// meta
|
||||||
|
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this industry service response
|
||||||
|
func (m *IndustryServiceResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateMeta(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceResponse) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceResponse) validateMeta(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Meta) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this industry service response based on the context it is used
|
||||||
|
func (m *IndustryServiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *IndustryServiceResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *IndustryServiceResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res IndustryServiceResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,129 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// 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 company services API client.
|
||||||
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||||
|
return &Client{transport: transport, formats: formats}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Client for company services 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 {
|
||||||
|
GetCompanyServices(params *GetCompanyServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompanyServicesOK, error)
|
||||||
|
|
||||||
|
PostCompanyServices(params *PostCompanyServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCompanyServicesCreated, error)
|
||||||
|
|
||||||
|
SetTransport(transport runtime.ClientTransport)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServices gets a list of companyservices
|
||||||
|
|
||||||
|
Return a list of all available CompanyServices
|
||||||
|
*/
|
||||||
|
func (a *Client) GetCompanyServices(params *GetCompanyServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompanyServicesOK, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewGetCompanyServicesParams()
|
||||||
|
}
|
||||||
|
op := &runtime.ClientOperation{
|
||||||
|
ID: "getCompanyServices",
|
||||||
|
Method: "GET",
|
||||||
|
PathPattern: "/companyservices",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"http"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &GetCompanyServicesReader{formats: a.formats},
|
||||||
|
AuthInfo: authInfo,
|
||||||
|
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.(*GetCompanyServicesOK)
|
||||||
|
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 getCompanyServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
|
panic(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostCompanyServices adds a new companyservice
|
||||||
|
|
||||||
|
Industry record to be added
|
||||||
|
*/
|
||||||
|
func (a *Client) PostCompanyServices(params *PostCompanyServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostCompanyServicesCreated, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewPostCompanyServicesParams()
|
||||||
|
}
|
||||||
|
op := &runtime.ClientOperation{
|
||||||
|
ID: "postCompanyServices",
|
||||||
|
Method: "POST",
|
||||||
|
PathPattern: "/companyservices",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"http"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &PostCompanyServicesReader{formats: a.formats},
|
||||||
|
AuthInfo: authInfo,
|
||||||
|
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.(*PostCompanyServicesCreated)
|
||||||
|
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 postCompanyServices: 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
|
||||||
|
}
|
|
@ -0,0 +1,274 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewGetCompanyServicesParams creates a new GetCompanyServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewGetCompanyServicesParams() *GetCompanyServicesParams {
|
||||||
|
return &GetCompanyServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesParamsWithTimeout creates a new GetCompanyServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewGetCompanyServicesParamsWithTimeout(timeout time.Duration) *GetCompanyServicesParams {
|
||||||
|
return &GetCompanyServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesParamsWithContext creates a new GetCompanyServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewGetCompanyServicesParamsWithContext(ctx context.Context) *GetCompanyServicesParams {
|
||||||
|
return &GetCompanyServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesParamsWithHTTPClient creates a new GetCompanyServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewGetCompanyServicesParamsWithHTTPClient(client *http.Client) *GetCompanyServicesParams {
|
||||||
|
return &GetCompanyServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the get company services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesParams struct {
|
||||||
|
|
||||||
|
/* Active.
|
||||||
|
|
||||||
|
Only retrieve active records?
|
||||||
|
*/
|
||||||
|
Active *bool
|
||||||
|
|
||||||
|
/* CompanyServiceID.
|
||||||
|
|
||||||
|
CompanyService record ID
|
||||||
|
*/
|
||||||
|
CompanyServiceID *string
|
||||||
|
|
||||||
|
/* Limit.
|
||||||
|
|
||||||
|
How many objects to return at one time
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Limit *int64
|
||||||
|
|
||||||
|
/* Offset.
|
||||||
|
|
||||||
|
How many objects to skip?
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Offset *int64
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the get company services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetCompanyServicesParams) WithDefaults() *GetCompanyServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the get company services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetCompanyServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithTimeout(timeout time.Duration) *GetCompanyServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithContext(ctx context.Context) *GetCompanyServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithHTTPClient(client *http.Client) *GetCompanyServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithActive adds the active to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithActive(active *bool) *GetCompanyServicesParams {
|
||||||
|
o.SetActive(active)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetActive adds the active to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetActive(active *bool) {
|
||||||
|
o.Active = active
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithCompanyServiceID adds the companyServiceID to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithCompanyServiceID(companyServiceID *string) *GetCompanyServicesParams {
|
||||||
|
o.SetCompanyServiceID(companyServiceID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCompanyServiceID adds the companyServiceId to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetCompanyServiceID(companyServiceID *string) {
|
||||||
|
o.CompanyServiceID = companyServiceID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithLimit adds the limit to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithLimit(limit *int64) *GetCompanyServicesParams {
|
||||||
|
o.SetLimit(limit)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLimit adds the limit to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetLimit(limit *int64) {
|
||||||
|
o.Limit = limit
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithOffset adds the offset to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) WithOffset(offset *int64) *GetCompanyServicesParams {
|
||||||
|
o.SetOffset(offset)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOffset adds the offset to the get company services params
|
||||||
|
func (o *GetCompanyServicesParams) SetOffset(offset *int64) {
|
||||||
|
o.Offset = offset
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *GetCompanyServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if o.Active != nil {
|
||||||
|
|
||||||
|
// query param active
|
||||||
|
var qrActive bool
|
||||||
|
|
||||||
|
if o.Active != nil {
|
||||||
|
qrActive = *o.Active
|
||||||
|
}
|
||||||
|
qActive := swag.FormatBool(qrActive)
|
||||||
|
if qActive != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("active", qActive); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.CompanyServiceID != nil {
|
||||||
|
|
||||||
|
// query param companyServiceId
|
||||||
|
var qrCompanyServiceID string
|
||||||
|
|
||||||
|
if o.CompanyServiceID != nil {
|
||||||
|
qrCompanyServiceID = *o.CompanyServiceID
|
||||||
|
}
|
||||||
|
qCompanyServiceID := qrCompanyServiceID
|
||||||
|
if qCompanyServiceID != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("companyServiceId", qCompanyServiceID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
|
||||||
|
// query param limit
|
||||||
|
var qrLimit int64
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
qrLimit = *o.Limit
|
||||||
|
}
|
||||||
|
qLimit := swag.FormatInt64(qrLimit)
|
||||||
|
if qLimit != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
|
||||||
|
// query param offset
|
||||||
|
var qrOffset int64
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
qrOffset = *o.Offset
|
||||||
|
}
|
||||||
|
qOffset := swag.FormatInt64(qrOffset)
|
||||||
|
if qOffset != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,477 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetCompanyServicesReader is a Reader for the GetCompanyServices structure.
|
||||||
|
type GetCompanyServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *GetCompanyServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewGetCompanyServicesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewGetCompanyServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewGetCompanyServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewGetCompanyServicesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewGetCompanyServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewGetCompanyServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesOK creates a GetCompanyServicesOK with default headers values
|
||||||
|
func NewGetCompanyServicesOK() *GetCompanyServicesOK {
|
||||||
|
return &GetCompanyServicesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
Response with CompanyService objects
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesOK struct {
|
||||||
|
Payload *sfgate_models.CompanyServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services o k response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services o k response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services o k response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services o k response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services o k response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services o k response
|
||||||
|
func (o *GetCompanyServicesOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesOK) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesOK) GetPayload() *sfgate_models.CompanyServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.CompanyServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesUnauthorized creates a GetCompanyServicesUnauthorized with default headers values
|
||||||
|
func NewGetCompanyServicesUnauthorized() *GetCompanyServicesUnauthorized {
|
||||||
|
return &GetCompanyServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesUnauthorized struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services unauthorized response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services unauthorized response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services unauthorized response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services unauthorized response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services unauthorized response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services unauthorized response
|
||||||
|
func (o *GetCompanyServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnauthorized) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesForbidden creates a GetCompanyServicesForbidden with default headers values
|
||||||
|
func NewGetCompanyServicesForbidden() *GetCompanyServicesForbidden {
|
||||||
|
return &GetCompanyServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesForbidden struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services forbidden response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services forbidden response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services forbidden response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services forbidden response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services forbidden response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services forbidden response
|
||||||
|
func (o *GetCompanyServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesForbidden) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesNotFound creates a GetCompanyServicesNotFound with default headers values
|
||||||
|
func NewGetCompanyServicesNotFound() *GetCompanyServicesNotFound {
|
||||||
|
return &GetCompanyServicesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesNotFound struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services not found response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services not found response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services not found response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services not found response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services not found response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services not found response
|
||||||
|
func (o *GetCompanyServicesNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesNotFound) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesUnprocessableEntity creates a GetCompanyServicesUnprocessableEntity with default headers values
|
||||||
|
func NewGetCompanyServicesUnprocessableEntity() *GetCompanyServicesUnprocessableEntity {
|
||||||
|
return &GetCompanyServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesUnprocessableEntity struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services unprocessable entity response
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetCompanyServicesInternalServerError creates a GetCompanyServicesInternalServerError with default headers values
|
||||||
|
func NewGetCompanyServicesInternalServerError() *GetCompanyServicesInternalServerError {
|
||||||
|
return &GetCompanyServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetCompanyServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type GetCompanyServicesInternalServerError struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get company services internal server error response has a 2xx status code
|
||||||
|
func (o *GetCompanyServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get company services internal server error response has a 3xx status code
|
||||||
|
func (o *GetCompanyServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get company services internal server error response has a 4xx status code
|
||||||
|
func (o *GetCompanyServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get company services internal server error response has a 5xx status code
|
||||||
|
func (o *GetCompanyServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get company services internal server error response a status code equal to that given
|
||||||
|
func (o *GetCompanyServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get company services internal server error response
|
||||||
|
func (o *GetCompanyServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[GET /companyservices][%d] getCompanyServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesInternalServerError) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetCompanyServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,157 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewPostCompanyServicesParams creates a new PostCompanyServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewPostCompanyServicesParams() *PostCompanyServicesParams {
|
||||||
|
return &PostCompanyServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCompanyServicesParamsWithTimeout creates a new PostCompanyServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewPostCompanyServicesParamsWithTimeout(timeout time.Duration) *PostCompanyServicesParams {
|
||||||
|
return &PostCompanyServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCompanyServicesParamsWithContext creates a new PostCompanyServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewPostCompanyServicesParamsWithContext(ctx context.Context) *PostCompanyServicesParams {
|
||||||
|
return &PostCompanyServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCompanyServicesParamsWithHTTPClient creates a new PostCompanyServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewPostCompanyServicesParamsWithHTTPClient(client *http.Client) *PostCompanyServicesParams {
|
||||||
|
return &PostCompanyServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostCompanyServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the post company services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type PostCompanyServicesParams struct {
|
||||||
|
|
||||||
|
/* CompanyServiceRequest.
|
||||||
|
|
||||||
|
An array of new CompanyService records
|
||||||
|
*/
|
||||||
|
CompanyServiceRequest *sfgate_models.CompanyServiceRequest
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the post company services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PostCompanyServicesParams) WithDefaults() *PostCompanyServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the post company services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PostCompanyServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the post company services params
|
||||||
|
func (o *PostCompanyServicesParams) WithTimeout(timeout time.Duration) *PostCompanyServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the post company services params
|
||||||
|
func (o *PostCompanyServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the post company services params
|
||||||
|
func (o *PostCompanyServicesParams) WithContext(ctx context.Context) *PostCompanyServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the post company services params
|
||||||
|
func (o *PostCompanyServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the post company services params
|
||||||
|
func (o *PostCompanyServicesParams) WithHTTPClient(client *http.Client) *PostCompanyServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the post company services params
|
||||||
|
func (o *PostCompanyServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithCompanyServiceRequest adds the companyServiceRequest to the post company services params
|
||||||
|
func (o *PostCompanyServicesParams) WithCompanyServiceRequest(companyServiceRequest *sfgate_models.CompanyServiceRequest) *PostCompanyServicesParams {
|
||||||
|
o.SetCompanyServiceRequest(companyServiceRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCompanyServiceRequest adds the companyServiceRequest to the post company services params
|
||||||
|
func (o *PostCompanyServicesParams) SetCompanyServiceRequest(companyServiceRequest *sfgate_models.CompanyServiceRequest) {
|
||||||
|
o.CompanyServiceRequest = companyServiceRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *PostCompanyServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
if o.CompanyServiceRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.CompanyServiceRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,477 @@
|
||||||
|
// 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 company_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PostCompanyServicesReader is a Reader for the PostCompanyServices structure.
|
||||||
|
type PostCompanyServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *PostCompanyServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 201:
|
||||||
|
result := NewPostCompanyServicesCreated()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewPostCompanyServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewPostCompanyServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewPostCompanyServicesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewPostCompanyServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewPostCompanyServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCompanyServicesCreated creates a PostCompanyServicesCreated with default headers values
|
||||||
|
func NewPostCompanyServicesCreated() *PostCompanyServicesCreated {
|
||||||
|
return &PostCompanyServicesCreated{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostCompanyServicesCreated describes a response with status code 201, with default header values.
|
||||||
|
|
||||||
|
Response from Salesforce
|
||||||
|
*/
|
||||||
|
type PostCompanyServicesCreated struct {
|
||||||
|
Payload *sfgate_models.SalesforcePostResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post company services created response has a 2xx status code
|
||||||
|
func (o *PostCompanyServicesCreated) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post company services created response has a 3xx status code
|
||||||
|
func (o *PostCompanyServicesCreated) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post company services created response has a 4xx status code
|
||||||
|
func (o *PostCompanyServicesCreated) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post company services created response has a 5xx status code
|
||||||
|
func (o *PostCompanyServicesCreated) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post company services created response a status code equal to that given
|
||||||
|
func (o *PostCompanyServicesCreated) IsCode(code int) bool {
|
||||||
|
return code == 201
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post company services created response
|
||||||
|
func (o *PostCompanyServicesCreated) Code() int {
|
||||||
|
return 201
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesCreated) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesCreated) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesCreated) GetPayload() *sfgate_models.SalesforcePostResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.SalesforcePostResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCompanyServicesUnauthorized creates a PostCompanyServicesUnauthorized with default headers values
|
||||||
|
func NewPostCompanyServicesUnauthorized() *PostCompanyServicesUnauthorized {
|
||||||
|
return &PostCompanyServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostCompanyServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type PostCompanyServicesUnauthorized struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post company services unauthorized response has a 2xx status code
|
||||||
|
func (o *PostCompanyServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post company services unauthorized response has a 3xx status code
|
||||||
|
func (o *PostCompanyServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post company services unauthorized response has a 4xx status code
|
||||||
|
func (o *PostCompanyServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post company services unauthorized response has a 5xx status code
|
||||||
|
func (o *PostCompanyServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post company services unauthorized response a status code equal to that given
|
||||||
|
func (o *PostCompanyServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post company services unauthorized response
|
||||||
|
func (o *PostCompanyServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesUnauthorized) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCompanyServicesForbidden creates a PostCompanyServicesForbidden with default headers values
|
||||||
|
func NewPostCompanyServicesForbidden() *PostCompanyServicesForbidden {
|
||||||
|
return &PostCompanyServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostCompanyServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type PostCompanyServicesForbidden struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post company services forbidden response has a 2xx status code
|
||||||
|
func (o *PostCompanyServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post company services forbidden response has a 3xx status code
|
||||||
|
func (o *PostCompanyServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post company services forbidden response has a 4xx status code
|
||||||
|
func (o *PostCompanyServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post company services forbidden response has a 5xx status code
|
||||||
|
func (o *PostCompanyServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post company services forbidden response a status code equal to that given
|
||||||
|
func (o *PostCompanyServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post company services forbidden response
|
||||||
|
func (o *PostCompanyServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesForbidden) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCompanyServicesNotFound creates a PostCompanyServicesNotFound with default headers values
|
||||||
|
func NewPostCompanyServicesNotFound() *PostCompanyServicesNotFound {
|
||||||
|
return &PostCompanyServicesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostCompanyServicesNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type PostCompanyServicesNotFound struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post company services not found response has a 2xx status code
|
||||||
|
func (o *PostCompanyServicesNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post company services not found response has a 3xx status code
|
||||||
|
func (o *PostCompanyServicesNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post company services not found response has a 4xx status code
|
||||||
|
func (o *PostCompanyServicesNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post company services not found response has a 5xx status code
|
||||||
|
func (o *PostCompanyServicesNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post company services not found response a status code equal to that given
|
||||||
|
func (o *PostCompanyServicesNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post company services not found response
|
||||||
|
func (o *PostCompanyServicesNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesNotFound) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCompanyServicesUnprocessableEntity creates a PostCompanyServicesUnprocessableEntity with default headers values
|
||||||
|
func NewPostCompanyServicesUnprocessableEntity() *PostCompanyServicesUnprocessableEntity {
|
||||||
|
return &PostCompanyServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostCompanyServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type PostCompanyServicesUnprocessableEntity struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post company services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *PostCompanyServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post company services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *PostCompanyServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post company services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *PostCompanyServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post company services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *PostCompanyServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post company services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *PostCompanyServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post company services unprocessable entity response
|
||||||
|
func (o *PostCompanyServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostCompanyServicesInternalServerError creates a PostCompanyServicesInternalServerError with default headers values
|
||||||
|
func NewPostCompanyServicesInternalServerError() *PostCompanyServicesInternalServerError {
|
||||||
|
return &PostCompanyServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostCompanyServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type PostCompanyServicesInternalServerError struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post company services internal server error response has a 2xx status code
|
||||||
|
func (o *PostCompanyServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post company services internal server error response has a 3xx status code
|
||||||
|
func (o *PostCompanyServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post company services internal server error response has a 4xx status code
|
||||||
|
func (o *PostCompanyServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post company services internal server error response has a 5xx status code
|
||||||
|
func (o *PostCompanyServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post company services internal server error response a status code equal to that given
|
||||||
|
func (o *PostCompanyServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post company services internal server error response
|
||||||
|
func (o *PostCompanyServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[POST /companyservices][%d] postCompanyServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesInternalServerError) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostCompanyServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,274 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewGetIndustryServicesParams creates a new GetIndustryServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewGetIndustryServicesParams() *GetIndustryServicesParams {
|
||||||
|
return &GetIndustryServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesParamsWithTimeout creates a new GetIndustryServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewGetIndustryServicesParamsWithTimeout(timeout time.Duration) *GetIndustryServicesParams {
|
||||||
|
return &GetIndustryServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesParamsWithContext creates a new GetIndustryServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewGetIndustryServicesParamsWithContext(ctx context.Context) *GetIndustryServicesParams {
|
||||||
|
return &GetIndustryServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesParamsWithHTTPClient creates a new GetIndustryServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewGetIndustryServicesParamsWithHTTPClient(client *http.Client) *GetIndustryServicesParams {
|
||||||
|
return &GetIndustryServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the get industry services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesParams struct {
|
||||||
|
|
||||||
|
/* Active.
|
||||||
|
|
||||||
|
Only retrieve active records?
|
||||||
|
*/
|
||||||
|
Active *bool
|
||||||
|
|
||||||
|
/* IndustryServiceID.
|
||||||
|
|
||||||
|
IndustryService record ID
|
||||||
|
*/
|
||||||
|
IndustryServiceID *string
|
||||||
|
|
||||||
|
/* Limit.
|
||||||
|
|
||||||
|
How many objects to return at one time
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Limit *int64
|
||||||
|
|
||||||
|
/* Offset.
|
||||||
|
|
||||||
|
How many objects to skip?
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Offset *int64
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the get industry services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetIndustryServicesParams) WithDefaults() *GetIndustryServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the get industry services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetIndustryServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithTimeout(timeout time.Duration) *GetIndustryServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithContext(ctx context.Context) *GetIndustryServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithHTTPClient(client *http.Client) *GetIndustryServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithActive adds the active to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithActive(active *bool) *GetIndustryServicesParams {
|
||||||
|
o.SetActive(active)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetActive adds the active to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetActive(active *bool) {
|
||||||
|
o.Active = active
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithIndustryServiceID adds the industryServiceID to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithIndustryServiceID(industryServiceID *string) *GetIndustryServicesParams {
|
||||||
|
o.SetIndustryServiceID(industryServiceID)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetIndustryServiceID adds the industryServiceId to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetIndustryServiceID(industryServiceID *string) {
|
||||||
|
o.IndustryServiceID = industryServiceID
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithLimit adds the limit to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithLimit(limit *int64) *GetIndustryServicesParams {
|
||||||
|
o.SetLimit(limit)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLimit adds the limit to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetLimit(limit *int64) {
|
||||||
|
o.Limit = limit
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithOffset adds the offset to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) WithOffset(offset *int64) *GetIndustryServicesParams {
|
||||||
|
o.SetOffset(offset)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOffset adds the offset to the get industry services params
|
||||||
|
func (o *GetIndustryServicesParams) SetOffset(offset *int64) {
|
||||||
|
o.Offset = offset
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *GetIndustryServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if o.Active != nil {
|
||||||
|
|
||||||
|
// query param active
|
||||||
|
var qrActive bool
|
||||||
|
|
||||||
|
if o.Active != nil {
|
||||||
|
qrActive = *o.Active
|
||||||
|
}
|
||||||
|
qActive := swag.FormatBool(qrActive)
|
||||||
|
if qActive != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("active", qActive); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.IndustryServiceID != nil {
|
||||||
|
|
||||||
|
// query param industryServiceId
|
||||||
|
var qrIndustryServiceID string
|
||||||
|
|
||||||
|
if o.IndustryServiceID != nil {
|
||||||
|
qrIndustryServiceID = *o.IndustryServiceID
|
||||||
|
}
|
||||||
|
qIndustryServiceID := qrIndustryServiceID
|
||||||
|
if qIndustryServiceID != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("industryServiceId", qIndustryServiceID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
|
||||||
|
// query param limit
|
||||||
|
var qrLimit int64
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
qrLimit = *o.Limit
|
||||||
|
}
|
||||||
|
qLimit := swag.FormatInt64(qrLimit)
|
||||||
|
if qLimit != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
|
||||||
|
// query param offset
|
||||||
|
var qrOffset int64
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
qrOffset = *o.Offset
|
||||||
|
}
|
||||||
|
qOffset := swag.FormatInt64(qrOffset)
|
||||||
|
if qOffset != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,477 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetIndustryServicesReader is a Reader for the GetIndustryServices structure.
|
||||||
|
type GetIndustryServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *GetIndustryServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewGetIndustryServicesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewGetIndustryServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewGetIndustryServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewGetIndustryServicesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewGetIndustryServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewGetIndustryServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesOK creates a GetIndustryServicesOK with default headers values
|
||||||
|
func NewGetIndustryServicesOK() *GetIndustryServicesOK {
|
||||||
|
return &GetIndustryServicesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
Response with IndustryService objects
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesOK struct {
|
||||||
|
Payload *sfgate_models.IndustryServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services o k response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services o k response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services o k response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services o k response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services o k response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services o k response
|
||||||
|
func (o *GetIndustryServicesOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesOK) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesOK) GetPayload() *sfgate_models.IndustryServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.IndustryServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesUnauthorized creates a GetIndustryServicesUnauthorized with default headers values
|
||||||
|
func NewGetIndustryServicesUnauthorized() *GetIndustryServicesUnauthorized {
|
||||||
|
return &GetIndustryServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesUnauthorized struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services unauthorized response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services unauthorized response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services unauthorized response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services unauthorized response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services unauthorized response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services unauthorized response
|
||||||
|
func (o *GetIndustryServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnauthorized) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesForbidden creates a GetIndustryServicesForbidden with default headers values
|
||||||
|
func NewGetIndustryServicesForbidden() *GetIndustryServicesForbidden {
|
||||||
|
return &GetIndustryServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesForbidden struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services forbidden response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services forbidden response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services forbidden response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services forbidden response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services forbidden response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services forbidden response
|
||||||
|
func (o *GetIndustryServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesForbidden) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesNotFound creates a GetIndustryServicesNotFound with default headers values
|
||||||
|
func NewGetIndustryServicesNotFound() *GetIndustryServicesNotFound {
|
||||||
|
return &GetIndustryServicesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesNotFound struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services not found response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services not found response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services not found response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services not found response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services not found response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services not found response
|
||||||
|
func (o *GetIndustryServicesNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesNotFound) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesUnprocessableEntity creates a GetIndustryServicesUnprocessableEntity with default headers values
|
||||||
|
func NewGetIndustryServicesUnprocessableEntity() *GetIndustryServicesUnprocessableEntity {
|
||||||
|
return &GetIndustryServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesUnprocessableEntity struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services unprocessable entity response
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetIndustryServicesInternalServerError creates a GetIndustryServicesInternalServerError with default headers values
|
||||||
|
func NewGetIndustryServicesInternalServerError() *GetIndustryServicesInternalServerError {
|
||||||
|
return &GetIndustryServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type GetIndustryServicesInternalServerError struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get industry services internal server error response has a 2xx status code
|
||||||
|
func (o *GetIndustryServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get industry services internal server error response has a 3xx status code
|
||||||
|
func (o *GetIndustryServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get industry services internal server error response has a 4xx status code
|
||||||
|
func (o *GetIndustryServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get industry services internal server error response has a 5xx status code
|
||||||
|
func (o *GetIndustryServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get industry services internal server error response a status code equal to that given
|
||||||
|
func (o *GetIndustryServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get industry services internal server error response
|
||||||
|
func (o *GetIndustryServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesInternalServerError) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetIndustryServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,129 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// 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 industry services API client.
|
||||||
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||||
|
return &Client{transport: transport, formats: formats}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Client for industry services 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 {
|
||||||
|
GetIndustryServices(params *GetIndustryServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustryServicesOK, error)
|
||||||
|
|
||||||
|
PostIndustryServices(params *PostIndustryServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustryServicesCreated, error)
|
||||||
|
|
||||||
|
SetTransport(transport runtime.ClientTransport)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetIndustryServices gets a list of industry services
|
||||||
|
|
||||||
|
Return a list of all available IndustryServices
|
||||||
|
*/
|
||||||
|
func (a *Client) GetIndustryServices(params *GetIndustryServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIndustryServicesOK, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewGetIndustryServicesParams()
|
||||||
|
}
|
||||||
|
op := &runtime.ClientOperation{
|
||||||
|
ID: "getIndustryServices",
|
||||||
|
Method: "GET",
|
||||||
|
PathPattern: "/industryservices",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"http"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &GetIndustryServicesReader{formats: a.formats},
|
||||||
|
AuthInfo: authInfo,
|
||||||
|
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.(*GetIndustryServicesOK)
|
||||||
|
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 getIndustryServices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||||
|
panic(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServices adds a new industry service
|
||||||
|
|
||||||
|
IndustryService record to be added
|
||||||
|
*/
|
||||||
|
func (a *Client) PostIndustryServices(params *PostIndustryServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostIndustryServicesCreated, error) {
|
||||||
|
// TODO: Validate the params before sending
|
||||||
|
if params == nil {
|
||||||
|
params = NewPostIndustryServicesParams()
|
||||||
|
}
|
||||||
|
op := &runtime.ClientOperation{
|
||||||
|
ID: "postIndustryServices",
|
||||||
|
Method: "POST",
|
||||||
|
PathPattern: "/industryservices",
|
||||||
|
ProducesMediaTypes: []string{"application/json"},
|
||||||
|
ConsumesMediaTypes: []string{"application/json"},
|
||||||
|
Schemes: []string{"http"},
|
||||||
|
Params: params,
|
||||||
|
Reader: &PostIndustryServicesReader{formats: a.formats},
|
||||||
|
AuthInfo: authInfo,
|
||||||
|
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.(*PostIndustryServicesCreated)
|
||||||
|
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 postIndustryServices: 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
|
||||||
|
}
|
|
@ -0,0 +1,157 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewPostIndustryServicesParams creates a new PostIndustryServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewPostIndustryServicesParams() *PostIndustryServicesParams {
|
||||||
|
return &PostIndustryServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesParamsWithTimeout creates a new PostIndustryServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewPostIndustryServicesParamsWithTimeout(timeout time.Duration) *PostIndustryServicesParams {
|
||||||
|
return &PostIndustryServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesParamsWithContext creates a new PostIndustryServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewPostIndustryServicesParamsWithContext(ctx context.Context) *PostIndustryServicesParams {
|
||||||
|
return &PostIndustryServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesParamsWithHTTPClient creates a new PostIndustryServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewPostIndustryServicesParamsWithHTTPClient(client *http.Client) *PostIndustryServicesParams {
|
||||||
|
return &PostIndustryServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the post industry services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesParams struct {
|
||||||
|
|
||||||
|
/* IndustryServiceRequest.
|
||||||
|
|
||||||
|
An array of new IndustryService records
|
||||||
|
*/
|
||||||
|
IndustryServiceRequest *sfgate_models.IndustryServiceRequest
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the post industry services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PostIndustryServicesParams) WithDefaults() *PostIndustryServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the post industry services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PostIndustryServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) WithTimeout(timeout time.Duration) *PostIndustryServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) WithContext(ctx context.Context) *PostIndustryServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) WithHTTPClient(client *http.Client) *PostIndustryServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithIndustryServiceRequest adds the industryServiceRequest to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) WithIndustryServiceRequest(industryServiceRequest *sfgate_models.IndustryServiceRequest) *PostIndustryServicesParams {
|
||||||
|
o.SetIndustryServiceRequest(industryServiceRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetIndustryServiceRequest adds the industryServiceRequest to the post industry services params
|
||||||
|
func (o *PostIndustryServicesParams) SetIndustryServiceRequest(industryServiceRequest *sfgate_models.IndustryServiceRequest) {
|
||||||
|
o.IndustryServiceRequest = industryServiceRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *PostIndustryServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
if o.IndustryServiceRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.IndustryServiceRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,477 @@
|
||||||
|
// 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 industry_services
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PostIndustryServicesReader is a Reader for the PostIndustryServices structure.
|
||||||
|
type PostIndustryServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *PostIndustryServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 201:
|
||||||
|
result := NewPostIndustryServicesCreated()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewPostIndustryServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewPostIndustryServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewPostIndustryServicesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewPostIndustryServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewPostIndustryServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesCreated creates a PostIndustryServicesCreated with default headers values
|
||||||
|
func NewPostIndustryServicesCreated() *PostIndustryServicesCreated {
|
||||||
|
return &PostIndustryServicesCreated{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesCreated describes a response with status code 201, with default header values.
|
||||||
|
|
||||||
|
Response from Salesforce
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesCreated struct {
|
||||||
|
Payload *sfgate_models.SalesforcePostResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services created response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesCreated) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services created response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesCreated) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services created response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesCreated) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services created response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesCreated) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services created response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesCreated) IsCode(code int) bool {
|
||||||
|
return code == 201
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services created response
|
||||||
|
func (o *PostIndustryServicesCreated) Code() int {
|
||||||
|
return 201
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesCreated) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesCreated) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesCreated) GetPayload() *sfgate_models.SalesforcePostResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.SalesforcePostResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesUnauthorized creates a PostIndustryServicesUnauthorized with default headers values
|
||||||
|
func NewPostIndustryServicesUnauthorized() *PostIndustryServicesUnauthorized {
|
||||||
|
return &PostIndustryServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesUnauthorized struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services unauthorized response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services unauthorized response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services unauthorized response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services unauthorized response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services unauthorized response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services unauthorized response
|
||||||
|
func (o *PostIndustryServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnauthorized) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesForbidden creates a PostIndustryServicesForbidden with default headers values
|
||||||
|
func NewPostIndustryServicesForbidden() *PostIndustryServicesForbidden {
|
||||||
|
return &PostIndustryServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesForbidden struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services forbidden response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services forbidden response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services forbidden response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services forbidden response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services forbidden response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services forbidden response
|
||||||
|
func (o *PostIndustryServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesForbidden) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesNotFound creates a PostIndustryServicesNotFound with default headers values
|
||||||
|
func NewPostIndustryServicesNotFound() *PostIndustryServicesNotFound {
|
||||||
|
return &PostIndustryServicesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesNotFound struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services not found response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services not found response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services not found response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services not found response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services not found response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services not found response
|
||||||
|
func (o *PostIndustryServicesNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesNotFound) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesUnprocessableEntity creates a PostIndustryServicesUnprocessableEntity with default headers values
|
||||||
|
func NewPostIndustryServicesUnprocessableEntity() *PostIndustryServicesUnprocessableEntity {
|
||||||
|
return &PostIndustryServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesUnprocessableEntity struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services unprocessable entity response
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostIndustryServicesInternalServerError creates a PostIndustryServicesInternalServerError with default headers values
|
||||||
|
func NewPostIndustryServicesInternalServerError() *PostIndustryServicesInternalServerError {
|
||||||
|
return &PostIndustryServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostIndustryServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type PostIndustryServicesInternalServerError struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post industry services internal server error response has a 2xx status code
|
||||||
|
func (o *PostIndustryServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post industry services internal server error response has a 3xx status code
|
||||||
|
func (o *PostIndustryServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post industry services internal server error response has a 4xx status code
|
||||||
|
func (o *PostIndustryServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post industry services internal server error response has a 5xx status code
|
||||||
|
func (o *PostIndustryServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post industry services internal server error response a status code equal to that given
|
||||||
|
func (o *PostIndustryServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post industry services internal server error response
|
||||||
|
func (o *PostIndustryServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesInternalServerError) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostIndustryServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
// 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 operations
|
||||||
|
|
||||||
|
// 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 operations API client.
|
||||||
|
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||||
|
return &Client{transport: transport, formats: formats}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Client for operations 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 {
|
||||||
|
PutResearchProjectServices(params *PutResearchProjectServicesParams, opts ...ClientOption) (*PutResearchProjectServicesOK, *PutResearchProjectServicesCreated, error)
|
||||||
|
|
||||||
|
SetTransport(transport runtime.ClientTransport)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServices Update ResearchProjectService in the system
|
||||||
|
*/
|
||||||
|
func (a *Client) PutResearchProjectServices(params *PutResearchProjectServicesParams, opts ...ClientOption) (*PutResearchProjectServicesOK, *PutResearchProjectServicesCreated, error) {
|
||||||
|
// TODO: Validate the params 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},
|
||||||
|
Context: params.Context,
|
||||||
|
Client: params.HTTPClient,
|
||||||
|
}
|
||||||
|
for _, opt := range opts {
|
||||||
|
opt(op)
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := a.transport.Submit(op)
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
switch value := result.(type) {
|
||||||
|
case *PutResearchProjectServicesOK:
|
||||||
|
return value, nil, nil
|
||||||
|
case *PutResearchProjectServicesCreated:
|
||||||
|
return nil, value, nil
|
||||||
|
}
|
||||||
|
// 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 operations: 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
|
||||||
|
}
|
|
@ -0,0 +1,157 @@
|
||||||
|
// 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 operations
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesParams creates a new PutResearchProjectServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewPutResearchProjectServicesParams() *PutResearchProjectServicesParams {
|
||||||
|
return &PutResearchProjectServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesParamsWithTimeout creates a new PutResearchProjectServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewPutResearchProjectServicesParamsWithTimeout(timeout time.Duration) *PutResearchProjectServicesParams {
|
||||||
|
return &PutResearchProjectServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesParamsWithContext creates a new PutResearchProjectServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewPutResearchProjectServicesParamsWithContext(ctx context.Context) *PutResearchProjectServicesParams {
|
||||||
|
return &PutResearchProjectServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesParamsWithHTTPClient creates a new PutResearchProjectServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewPutResearchProjectServicesParamsWithHTTPClient(client *http.Client) *PutResearchProjectServicesParams {
|
||||||
|
return &PutResearchProjectServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the put research project services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesParams struct {
|
||||||
|
|
||||||
|
/* ResearchProjectServiceRequest.
|
||||||
|
|
||||||
|
An array of new ResearchProjectService records
|
||||||
|
*/
|
||||||
|
ResearchProjectServiceRequest *sfgate_models.ResearchProjectServiceRequest
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the put research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PutResearchProjectServicesParams) WithDefaults() *PutResearchProjectServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the put research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PutResearchProjectServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) WithTimeout(timeout time.Duration) *PutResearchProjectServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) WithContext(ctx context.Context) *PutResearchProjectServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) WithHTTPClient(client *http.Client) *PutResearchProjectServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithResearchProjectServiceRequest adds the researchProjectServiceRequest to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) WithResearchProjectServiceRequest(researchProjectServiceRequest *sfgate_models.ResearchProjectServiceRequest) *PutResearchProjectServicesParams {
|
||||||
|
o.SetResearchProjectServiceRequest(researchProjectServiceRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetResearchProjectServiceRequest adds the researchProjectServiceRequest to the put research project services params
|
||||||
|
func (o *PutResearchProjectServicesParams) SetResearchProjectServiceRequest(researchProjectServiceRequest *sfgate_models.ResearchProjectServiceRequest) {
|
||||||
|
o.ResearchProjectServiceRequest = researchProjectServiceRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *PutResearchProjectServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
if o.ResearchProjectServiceRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.ResearchProjectServiceRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,329 @@
|
||||||
|
// 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 operations
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PutResearchProjectServicesReader is a Reader for the PutResearchProjectServices structure.
|
||||||
|
type PutResearchProjectServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *PutResearchProjectServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewPutResearchProjectServicesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 201:
|
||||||
|
result := NewPutResearchProjectServicesCreated()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewPutResearchProjectServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewPutResearchProjectServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesOK creates a PutResearchProjectServicesOK with default headers values
|
||||||
|
func NewPutResearchProjectServicesOK() *PutResearchProjectServicesOK {
|
||||||
|
return &PutResearchProjectServicesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
ResearchProjectService Response Object
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesOK struct {
|
||||||
|
Payload *sfgate_models.ResearchProjectServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this put research project services o k response has a 2xx status code
|
||||||
|
func (o *PutResearchProjectServicesOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this put research project services o k response has a 3xx status code
|
||||||
|
func (o *PutResearchProjectServicesOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this put research project services o k response has a 4xx status code
|
||||||
|
func (o *PutResearchProjectServicesOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this put research project services o k response has a 5xx status code
|
||||||
|
func (o *PutResearchProjectServicesOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this put research project services o k response a status code equal to that given
|
||||||
|
func (o *PutResearchProjectServicesOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the put research project services o k response
|
||||||
|
func (o *PutResearchProjectServicesOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesOK) String() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesOK) GetPayload() *sfgate_models.ResearchProjectServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.ResearchProjectServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesCreated creates a PutResearchProjectServicesCreated with default headers values
|
||||||
|
func NewPutResearchProjectServicesCreated() *PutResearchProjectServicesCreated {
|
||||||
|
return &PutResearchProjectServicesCreated{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesCreated describes a response with status code 201, with default header values.
|
||||||
|
|
||||||
|
ResearchProjectService Response Object
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesCreated struct {
|
||||||
|
Payload *sfgate_models.ResearchProjectServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this put research project services created response has a 2xx status code
|
||||||
|
func (o *PutResearchProjectServicesCreated) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this put research project services created response has a 3xx status code
|
||||||
|
func (o *PutResearchProjectServicesCreated) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this put research project services created response has a 4xx status code
|
||||||
|
func (o *PutResearchProjectServicesCreated) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this put research project services created response has a 5xx status code
|
||||||
|
func (o *PutResearchProjectServicesCreated) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this put research project services created response a status code equal to that given
|
||||||
|
func (o *PutResearchProjectServicesCreated) IsCode(code int) bool {
|
||||||
|
return code == 201
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the put research project services created response
|
||||||
|
func (o *PutResearchProjectServicesCreated) Code() int {
|
||||||
|
return 201
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesCreated) Error() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesCreated) String() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesCreated) GetPayload() *sfgate_models.ResearchProjectServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.ResearchProjectServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesUnauthorized creates a PutResearchProjectServicesUnauthorized with default headers values
|
||||||
|
func NewPutResearchProjectServicesUnauthorized() *PutResearchProjectServicesUnauthorized {
|
||||||
|
return &PutResearchProjectServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesUnauthorized struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this put research project services unauthorized response has a 2xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this put research project services unauthorized response has a 3xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this put research project services unauthorized response has a 4xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this put research project services unauthorized response has a 5xx status code
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this put research project services unauthorized response a status code equal to that given
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the put research project services unauthorized response
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPutResearchProjectServicesForbidden creates a PutResearchProjectServicesForbidden with default headers values
|
||||||
|
func NewPutResearchProjectServicesForbidden() *PutResearchProjectServicesForbidden {
|
||||||
|
return &PutResearchProjectServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PutResearchProjectServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type PutResearchProjectServicesForbidden struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this put research project services forbidden response has a 2xx status code
|
||||||
|
func (o *PutResearchProjectServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this put research project services forbidden response has a 3xx status code
|
||||||
|
func (o *PutResearchProjectServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this put research project services forbidden response has a 4xx status code
|
||||||
|
func (o *PutResearchProjectServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this put research project services forbidden response has a 5xx status code
|
||||||
|
func (o *PutResearchProjectServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this put research project services forbidden response a status code equal to that given
|
||||||
|
func (o *PutResearchProjectServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the put research project services forbidden response
|
||||||
|
func (o *PutResearchProjectServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[PUT /researchprojectservices][%d] putResearchProjectServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesForbidden) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PutResearchProjectServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,240 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesParams creates a new GetResearchProjectServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewGetResearchProjectServicesParams() *GetResearchProjectServicesParams {
|
||||||
|
return &GetResearchProjectServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesParamsWithTimeout creates a new GetResearchProjectServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewGetResearchProjectServicesParamsWithTimeout(timeout time.Duration) *GetResearchProjectServicesParams {
|
||||||
|
return &GetResearchProjectServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesParamsWithContext creates a new GetResearchProjectServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewGetResearchProjectServicesParamsWithContext(ctx context.Context) *GetResearchProjectServicesParams {
|
||||||
|
return &GetResearchProjectServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesParamsWithHTTPClient creates a new GetResearchProjectServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewGetResearchProjectServicesParamsWithHTTPClient(client *http.Client) *GetResearchProjectServicesParams {
|
||||||
|
return &GetResearchProjectServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the get research project services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesParams struct {
|
||||||
|
|
||||||
|
/* ID.
|
||||||
|
|
||||||
|
Unique Record ID
|
||||||
|
*/
|
||||||
|
ID *string
|
||||||
|
|
||||||
|
/* Limit.
|
||||||
|
|
||||||
|
How many objects to return at one time
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Limit *int64
|
||||||
|
|
||||||
|
/* Offset.
|
||||||
|
|
||||||
|
How many objects to skip?
|
||||||
|
|
||||||
|
Format: int64
|
||||||
|
*/
|
||||||
|
Offset *int64
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the get research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetResearchProjectServicesParams) WithDefaults() *GetResearchProjectServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the get research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *GetResearchProjectServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithTimeout(timeout time.Duration) *GetResearchProjectServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithContext(ctx context.Context) *GetResearchProjectServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithHTTPClient(client *http.Client) *GetResearchProjectServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithID adds the id to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithID(id *string) *GetResearchProjectServicesParams {
|
||||||
|
o.SetID(id)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetID adds the id to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetID(id *string) {
|
||||||
|
o.ID = id
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithLimit adds the limit to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithLimit(limit *int64) *GetResearchProjectServicesParams {
|
||||||
|
o.SetLimit(limit)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLimit adds the limit to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetLimit(limit *int64) {
|
||||||
|
o.Limit = limit
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithOffset adds the offset to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) WithOffset(offset *int64) *GetResearchProjectServicesParams {
|
||||||
|
o.SetOffset(offset)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOffset adds the offset to the get research project services params
|
||||||
|
func (o *GetResearchProjectServicesParams) SetOffset(offset *int64) {
|
||||||
|
o.Offset = offset
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *GetResearchProjectServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if o.ID != nil {
|
||||||
|
|
||||||
|
// query param id
|
||||||
|
var qrID string
|
||||||
|
|
||||||
|
if o.ID != nil {
|
||||||
|
qrID = *o.ID
|
||||||
|
}
|
||||||
|
qID := qrID
|
||||||
|
if qID != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("id", qID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
|
||||||
|
// query param limit
|
||||||
|
var qrLimit int64
|
||||||
|
|
||||||
|
if o.Limit != nil {
|
||||||
|
qrLimit = *o.Limit
|
||||||
|
}
|
||||||
|
qLimit := swag.FormatInt64(qrLimit)
|
||||||
|
if qLimit != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("limit", qLimit); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
|
||||||
|
// query param offset
|
||||||
|
var qrOffset int64
|
||||||
|
|
||||||
|
if o.Offset != nil {
|
||||||
|
qrOffset = *o.Offset
|
||||||
|
}
|
||||||
|
qOffset := swag.FormatInt64(qrOffset)
|
||||||
|
if qOffset != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("offset", qOffset); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,477 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetResearchProjectServicesReader is a Reader for the GetResearchProjectServices structure.
|
||||||
|
type GetResearchProjectServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *GetResearchProjectServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewGetResearchProjectServicesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewGetResearchProjectServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewGetResearchProjectServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewGetResearchProjectServicesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewGetResearchProjectServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewGetResearchProjectServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesOK creates a GetResearchProjectServicesOK with default headers values
|
||||||
|
func NewGetResearchProjectServicesOK() *GetResearchProjectServicesOK {
|
||||||
|
return &GetResearchProjectServicesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
ResearchProjectService Response Object
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesOK struct {
|
||||||
|
Payload *sfgate_models.ResearchProjectServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services o k response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services o k response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services o k response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services o k response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services o k response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services o k response
|
||||||
|
func (o *GetResearchProjectServicesOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesOK) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesOK) GetPayload() *sfgate_models.ResearchProjectServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.ResearchProjectServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesUnauthorized creates a GetResearchProjectServicesUnauthorized with default headers values
|
||||||
|
func NewGetResearchProjectServicesUnauthorized() *GetResearchProjectServicesUnauthorized {
|
||||||
|
return &GetResearchProjectServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesUnauthorized struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services unauthorized response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services unauthorized response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services unauthorized response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services unauthorized response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services unauthorized response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services unauthorized response
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesForbidden creates a GetResearchProjectServicesForbidden with default headers values
|
||||||
|
func NewGetResearchProjectServicesForbidden() *GetResearchProjectServicesForbidden {
|
||||||
|
return &GetResearchProjectServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesForbidden struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services forbidden response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services forbidden response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services forbidden response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services forbidden response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services forbidden response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services forbidden response
|
||||||
|
func (o *GetResearchProjectServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesForbidden) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesNotFound creates a GetResearchProjectServicesNotFound with default headers values
|
||||||
|
func NewGetResearchProjectServicesNotFound() *GetResearchProjectServicesNotFound {
|
||||||
|
return &GetResearchProjectServicesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesNotFound struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services not found response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services not found response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services not found response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services not found response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services not found response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services not found response
|
||||||
|
func (o *GetResearchProjectServicesNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesNotFound) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesUnprocessableEntity creates a GetResearchProjectServicesUnprocessableEntity with default headers values
|
||||||
|
func NewGetResearchProjectServicesUnprocessableEntity() *GetResearchProjectServicesUnprocessableEntity {
|
||||||
|
return &GetResearchProjectServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesUnprocessableEntity struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services unprocessable entity response
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetResearchProjectServicesInternalServerError creates a GetResearchProjectServicesInternalServerError with default headers values
|
||||||
|
func NewGetResearchProjectServicesInternalServerError() *GetResearchProjectServicesInternalServerError {
|
||||||
|
return &GetResearchProjectServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type GetResearchProjectServicesInternalServerError struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this get research project services internal server error response has a 2xx status code
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this get research project services internal server error response has a 3xx status code
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this get research project services internal server error response has a 4xx status code
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this get research project services internal server error response has a 5xx status code
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this get research project services internal server error response a status code equal to that given
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the get research project services internal server error response
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[GET /researchprojectservices][%d] getResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetResearchProjectServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,157 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
cr "github.com/go-openapi/runtime/client"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesParams creates a new PostResearchProjectServicesParams object,
|
||||||
|
// with the default timeout for this client.
|
||||||
|
//
|
||||||
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||||
|
//
|
||||||
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||||
|
func NewPostResearchProjectServicesParams() *PostResearchProjectServicesParams {
|
||||||
|
return &PostResearchProjectServicesParams{
|
||||||
|
timeout: cr.DefaultTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesParamsWithTimeout creates a new PostResearchProjectServicesParams object
|
||||||
|
// with the ability to set a timeout on a request.
|
||||||
|
func NewPostResearchProjectServicesParamsWithTimeout(timeout time.Duration) *PostResearchProjectServicesParams {
|
||||||
|
return &PostResearchProjectServicesParams{
|
||||||
|
timeout: timeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesParamsWithContext creates a new PostResearchProjectServicesParams object
|
||||||
|
// with the ability to set a context for a request.
|
||||||
|
func NewPostResearchProjectServicesParamsWithContext(ctx context.Context) *PostResearchProjectServicesParams {
|
||||||
|
return &PostResearchProjectServicesParams{
|
||||||
|
Context: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesParamsWithHTTPClient creates a new PostResearchProjectServicesParams object
|
||||||
|
// with the ability to set a custom HTTPClient for a request.
|
||||||
|
func NewPostResearchProjectServicesParamsWithHTTPClient(client *http.Client) *PostResearchProjectServicesParams {
|
||||||
|
return &PostResearchProjectServicesParams{
|
||||||
|
HTTPClient: client,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesParams contains all the parameters to send to the API endpoint
|
||||||
|
|
||||||
|
for the post research project services operation.
|
||||||
|
|
||||||
|
Typically these are written to a http.Request.
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesParams struct {
|
||||||
|
|
||||||
|
/* ResearchProjectServiceRequest.
|
||||||
|
|
||||||
|
An array of new ResearchProjectService records
|
||||||
|
*/
|
||||||
|
ResearchProjectServiceRequest *sfgate_models.ResearchProjectServiceRequest
|
||||||
|
|
||||||
|
timeout time.Duration
|
||||||
|
Context context.Context
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaults hydrates default values in the post research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PostResearchProjectServicesParams) WithDefaults() *PostResearchProjectServicesParams {
|
||||||
|
o.SetDefaults()
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults hydrates default values in the post research project services params (not the query body).
|
||||||
|
//
|
||||||
|
// All values with no default are reset to their zero value.
|
||||||
|
func (o *PostResearchProjectServicesParams) SetDefaults() {
|
||||||
|
// no default values defined for this parameter
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithTimeout adds the timeout to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) WithTimeout(timeout time.Duration) *PostResearchProjectServicesParams {
|
||||||
|
o.SetTimeout(timeout)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetTimeout adds the timeout to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) SetTimeout(timeout time.Duration) {
|
||||||
|
o.timeout = timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext adds the context to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) WithContext(ctx context.Context) *PostResearchProjectServicesParams {
|
||||||
|
o.SetContext(ctx)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetContext adds the context to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) SetContext(ctx context.Context) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithHTTPClient adds the HTTPClient to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) WithHTTPClient(client *http.Client) *PostResearchProjectServicesParams {
|
||||||
|
o.SetHTTPClient(client)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetHTTPClient adds the HTTPClient to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) SetHTTPClient(client *http.Client) {
|
||||||
|
o.HTTPClient = client
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithResearchProjectServiceRequest adds the researchProjectServiceRequest to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) WithResearchProjectServiceRequest(researchProjectServiceRequest *sfgate_models.ResearchProjectServiceRequest) *PostResearchProjectServicesParams {
|
||||||
|
o.SetResearchProjectServiceRequest(researchProjectServiceRequest)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetResearchProjectServiceRequest adds the researchProjectServiceRequest to the post research project services params
|
||||||
|
func (o *PostResearchProjectServicesParams) SetResearchProjectServiceRequest(researchProjectServiceRequest *sfgate_models.ResearchProjectServiceRequest) {
|
||||||
|
o.ResearchProjectServiceRequest = researchProjectServiceRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteToRequest writes these params to a swagger request
|
||||||
|
func (o *PostResearchProjectServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
if err := r.SetTimeout(o.timeout); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
var res []error
|
||||||
|
if o.ResearchProjectServiceRequest != nil {
|
||||||
|
if err := r.SetBodyParam(o.ResearchProjectServiceRequest); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,551 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/go-openapi/runtime"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PostResearchProjectServicesReader is a Reader for the PostResearchProjectServices structure.
|
||||||
|
type PostResearchProjectServicesReader struct {
|
||||||
|
formats strfmt.Registry
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadResponse reads a server response into the received o.
|
||||||
|
func (o *PostResearchProjectServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||||
|
switch response.Code() {
|
||||||
|
case 200:
|
||||||
|
result := NewPostResearchProjectServicesOK()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 201:
|
||||||
|
result := NewPostResearchProjectServicesCreated()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
case 401:
|
||||||
|
result := NewPostResearchProjectServicesUnauthorized()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 403:
|
||||||
|
result := NewPostResearchProjectServicesForbidden()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 404:
|
||||||
|
result := NewPostResearchProjectServicesNotFound()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 422:
|
||||||
|
result := NewPostResearchProjectServicesUnprocessableEntity()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
case 500:
|
||||||
|
result := NewPostResearchProjectServicesInternalServerError()
|
||||||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return nil, result
|
||||||
|
default:
|
||||||
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesOK creates a PostResearchProjectServicesOK with default headers values
|
||||||
|
func NewPostResearchProjectServicesOK() *PostResearchProjectServicesOK {
|
||||||
|
return &PostResearchProjectServicesOK{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesOK describes a response with status code 200, with default header values.
|
||||||
|
|
||||||
|
ResearchProjectService Response Object
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesOK struct {
|
||||||
|
Payload *sfgate_models.ResearchProjectServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services o k response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesOK) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services o k response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesOK) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services o k response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesOK) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services o k response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesOK) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services o k response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesOK) IsCode(code int) bool {
|
||||||
|
return code == 200
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services o k response
|
||||||
|
func (o *PostResearchProjectServicesOK) Code() int {
|
||||||
|
return 200
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesOK) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesOK) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesOK %+v", 200, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesOK) GetPayload() *sfgate_models.ResearchProjectServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.ResearchProjectServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesCreated creates a PostResearchProjectServicesCreated with default headers values
|
||||||
|
func NewPostResearchProjectServicesCreated() *PostResearchProjectServicesCreated {
|
||||||
|
return &PostResearchProjectServicesCreated{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesCreated describes a response with status code 201, with default header values.
|
||||||
|
|
||||||
|
ResearchProjectService Response Object
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesCreated struct {
|
||||||
|
Payload *sfgate_models.ResearchProjectServiceResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services created response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesCreated) IsSuccess() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services created response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesCreated) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services created response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesCreated) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services created response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesCreated) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services created response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesCreated) IsCode(code int) bool {
|
||||||
|
return code == 201
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services created response
|
||||||
|
func (o *PostResearchProjectServicesCreated) Code() int {
|
||||||
|
return 201
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesCreated) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesCreated) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesCreated %+v", 201, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesCreated) GetPayload() *sfgate_models.ResearchProjectServiceResponse {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.ResearchProjectServiceResponse)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesUnauthorized creates a PostResearchProjectServicesUnauthorized with default headers values
|
||||||
|
func NewPostResearchProjectServicesUnauthorized() *PostResearchProjectServicesUnauthorized {
|
||||||
|
return &PostResearchProjectServicesUnauthorized{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesUnauthorized describes a response with status code 401, with default header values.
|
||||||
|
|
||||||
|
Access unauthorized, invalid API-KEY was used
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesUnauthorized struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services unauthorized response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services unauthorized response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services unauthorized response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services unauthorized response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services unauthorized response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) IsCode(code int) bool {
|
||||||
|
return code == 401
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services unauthorized response
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) Code() int {
|
||||||
|
return 401
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnauthorized %+v", 401, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesForbidden creates a PostResearchProjectServicesForbidden with default headers values
|
||||||
|
func NewPostResearchProjectServicesForbidden() *PostResearchProjectServicesForbidden {
|
||||||
|
return &PostResearchProjectServicesForbidden{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesForbidden describes a response with status code 403, with default header values.
|
||||||
|
|
||||||
|
Access forbidden, account lacks access
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesForbidden struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services forbidden response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesForbidden) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services forbidden response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesForbidden) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services forbidden response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesForbidden) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services forbidden response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesForbidden) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services forbidden response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesForbidden) IsCode(code int) bool {
|
||||||
|
return code == 403
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services forbidden response
|
||||||
|
func (o *PostResearchProjectServicesForbidden) Code() int {
|
||||||
|
return 403
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesForbidden) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesForbidden) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesForbidden %+v", 403, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesForbidden) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesNotFound creates a PostResearchProjectServicesNotFound with default headers values
|
||||||
|
func NewPostResearchProjectServicesNotFound() *PostResearchProjectServicesNotFound {
|
||||||
|
return &PostResearchProjectServicesNotFound{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesNotFound describes a response with status code 404, with default header values.
|
||||||
|
|
||||||
|
Resource was not found
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesNotFound struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services not found response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesNotFound) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services not found response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesNotFound) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services not found response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesNotFound) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services not found response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesNotFound) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services not found response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesNotFound) IsCode(code int) bool {
|
||||||
|
return code == 404
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services not found response
|
||||||
|
func (o *PostResearchProjectServicesNotFound) Code() int {
|
||||||
|
return 404
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesNotFound) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesNotFound) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesNotFound %+v", 404, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesNotFound) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesUnprocessableEntity creates a PostResearchProjectServicesUnprocessableEntity with default headers values
|
||||||
|
func NewPostResearchProjectServicesUnprocessableEntity() *PostResearchProjectServicesUnprocessableEntity {
|
||||||
|
return &PostResearchProjectServicesUnprocessableEntity{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||||
|
|
||||||
|
Unprocessable Entity, likely a bad parameter
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesUnprocessableEntity struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services unprocessable entity response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services unprocessable entity response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services unprocessable entity response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsClientError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services unprocessable entity response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsServerError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services unprocessable entity response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) IsCode(code int) bool {
|
||||||
|
return code == 422
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services unprocessable entity response
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) Code() int {
|
||||||
|
return 422
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesUnprocessableEntity %+v", 422, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPostResearchProjectServicesInternalServerError creates a PostResearchProjectServicesInternalServerError with default headers values
|
||||||
|
func NewPostResearchProjectServicesInternalServerError() *PostResearchProjectServicesInternalServerError {
|
||||||
|
return &PostResearchProjectServicesInternalServerError{}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServicesInternalServerError describes a response with status code 500, with default header values.
|
||||||
|
|
||||||
|
Server Internal Error
|
||||||
|
*/
|
||||||
|
type PostResearchProjectServicesInternalServerError struct {
|
||||||
|
Payload *sfgate_models.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsSuccess returns true when this post research project services internal server error response has a 2xx status code
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) IsSuccess() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRedirect returns true when this post research project services internal server error response has a 3xx status code
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) IsRedirect() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsClientError returns true when this post research project services internal server error response has a 4xx status code
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) IsClientError() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsServerError returns true when this post research project services internal server error response has a 5xx status code
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) IsServerError() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsCode returns true when this post research project services internal server error response a status code equal to that given
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) IsCode(code int) bool {
|
||||||
|
return code == 500
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code gets the status code for the post research project services internal server error response
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) Code() int {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) Error() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) String() string {
|
||||||
|
return fmt.Sprintf("[POST /researchprojectservices][%d] postResearchProjectServicesInternalServerError %+v", 500, o.Payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) GetPayload() *sfgate_models.Error {
|
||||||
|
return o.Payload
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *PostResearchProjectServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
o.Payload = new(sfgate_models.Error)
|
||||||
|
|
||||||
|
// response payload
|
||||||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -38,6 +38,8 @@ type ClientService interface {
|
||||||
|
|
||||||
GetResearchProjectProducts(params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error)
|
GetResearchProjectProducts(params *GetResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectProductsOK, error)
|
||||||
|
|
||||||
|
GetResearchProjectServices(params *GetResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectServicesOK, error)
|
||||||
|
|
||||||
GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error)
|
GetResearchProjectTopics(params *GetResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectTopicsOK, error)
|
||||||
|
|
||||||
GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error)
|
GetResearchProjects(params *GetResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectsOK, error)
|
||||||
|
@ -46,6 +48,8 @@ type ClientService interface {
|
||||||
|
|
||||||
PostResearchProjectProducts(params *PostResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectProductsOK, error)
|
PostResearchProjectProducts(params *PostResearchProjectProductsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectProductsOK, error)
|
||||||
|
|
||||||
|
PostResearchProjectServices(params *PostResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectServicesOK, *PostResearchProjectServicesCreated, error)
|
||||||
|
|
||||||
PostResearchProjectTopics(params *PostResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicsOK, error)
|
PostResearchProjectTopics(params *PostResearchProjectTopicsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectTopicsOK, error)
|
||||||
|
|
||||||
PostResearchProjects(params *PostResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectsOK, error)
|
PostResearchProjects(params *PostResearchProjectsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectsOK, error)
|
||||||
|
@ -143,6 +147,47 @@ func (a *Client) GetResearchProjectProducts(params *GetResearchProjectProductsPa
|
||||||
panic(msg)
|
panic(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetResearchProjectServices gets a list of research project services
|
||||||
|
|
||||||
|
Return a list of ResearchProjectService records from the datastore
|
||||||
|
*/
|
||||||
|
func (a *Client) GetResearchProjectServices(params *GetResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetResearchProjectServicesOK, error) {
|
||||||
|
// TODO: Validate the params 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,
|
||||||
|
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.(*GetResearchProjectServicesOK)
|
||||||
|
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 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
|
GetResearchProjectTopics gets a list of research project topics
|
||||||
|
|
||||||
|
@ -307,6 +352,48 @@ func (a *Client) PostResearchProjectProducts(params *PostResearchProjectProducts
|
||||||
panic(msg)
|
panic(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
PostResearchProjectServices creates new research project services
|
||||||
|
|
||||||
|
Create ResearchProjectServices in the system
|
||||||
|
*/
|
||||||
|
func (a *Client) PostResearchProjectServices(params *PostResearchProjectServicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostResearchProjectServicesOK, *PostResearchProjectServicesCreated, error) {
|
||||||
|
// TODO: Validate the params 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,
|
||||||
|
Context: params.Context,
|
||||||
|
Client: params.HTTPClient,
|
||||||
|
}
|
||||||
|
for _, opt := range opts {
|
||||||
|
opt(op)
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := a.transport.Submit(op)
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
switch value := result.(type) {
|
||||||
|
case *PostResearchProjectServicesOK:
|
||||||
|
return value, nil, nil
|
||||||
|
case *PostResearchProjectServicesCreated:
|
||||||
|
return nil, value, nil
|
||||||
|
}
|
||||||
|
// 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 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
|
PostResearchProjectTopics creates new research project topics
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ import (
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/assets"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/assets"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/clusters"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/clusters"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/company_products"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/company_products"
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/company_services"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/contacts"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/contacts"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/contracts"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/contracts"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/courses"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/courses"
|
||||||
|
@ -29,7 +30,9 @@ import (
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industries"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industries"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industry_companies"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industry_companies"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industry_products"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industry_products"
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/industry_services"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/observations"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/observations"
|
||||||
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/operations"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/research_projects"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/research_projects"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/roles"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/roles"
|
||||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/templates"
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_client/templates"
|
||||||
|
@ -84,6 +87,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Sfgate {
|
||||||
cli.Assets = assets.New(transport, formats)
|
cli.Assets = assets.New(transport, formats)
|
||||||
cli.Clusters = clusters.New(transport, formats)
|
cli.Clusters = clusters.New(transport, formats)
|
||||||
cli.CompanyProducts = company_products.New(transport, formats)
|
cli.CompanyProducts = company_products.New(transport, formats)
|
||||||
|
cli.CompanyServices = company_services.New(transport, formats)
|
||||||
cli.Contacts = contacts.New(transport, formats)
|
cli.Contacts = contacts.New(transport, formats)
|
||||||
cli.Contracts = contracts.New(transport, formats)
|
cli.Contracts = contracts.New(transport, formats)
|
||||||
cli.Courses = courses.New(transport, formats)
|
cli.Courses = courses.New(transport, formats)
|
||||||
|
@ -95,7 +99,9 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Sfgate {
|
||||||
cli.Industries = industries.New(transport, formats)
|
cli.Industries = industries.New(transport, formats)
|
||||||
cli.IndustryCompanies = industry_companies.New(transport, formats)
|
cli.IndustryCompanies = industry_companies.New(transport, formats)
|
||||||
cli.IndustryProducts = industry_products.New(transport, formats)
|
cli.IndustryProducts = industry_products.New(transport, formats)
|
||||||
|
cli.IndustryServices = industry_services.New(transport, formats)
|
||||||
cli.Observations = observations.New(transport, formats)
|
cli.Observations = observations.New(transport, formats)
|
||||||
|
cli.Operations = operations.New(transport, formats)
|
||||||
cli.ResearchProjects = research_projects.New(transport, formats)
|
cli.ResearchProjects = research_projects.New(transport, formats)
|
||||||
cli.Roles = roles.New(transport, formats)
|
cli.Roles = roles.New(transport, formats)
|
||||||
cli.Templates = templates.New(transport, formats)
|
cli.Templates = templates.New(transport, formats)
|
||||||
|
@ -154,6 +160,8 @@ type Sfgate struct {
|
||||||
|
|
||||||
CompanyProducts company_products.ClientService
|
CompanyProducts company_products.ClientService
|
||||||
|
|
||||||
|
CompanyServices company_services.ClientService
|
||||||
|
|
||||||
Contacts contacts.ClientService
|
Contacts contacts.ClientService
|
||||||
|
|
||||||
Contracts contracts.ClientService
|
Contracts contracts.ClientService
|
||||||
|
@ -176,8 +184,12 @@ type Sfgate struct {
|
||||||
|
|
||||||
IndustryProducts industry_products.ClientService
|
IndustryProducts industry_products.ClientService
|
||||||
|
|
||||||
|
IndustryServices industry_services.ClientService
|
||||||
|
|
||||||
Observations observations.ClientService
|
Observations observations.ClientService
|
||||||
|
|
||||||
|
Operations operations.ClientService
|
||||||
|
|
||||||
ResearchProjects research_projects.ClientService
|
ResearchProjects research_projects.ClientService
|
||||||
|
|
||||||
Roles roles.ClientService
|
Roles roles.ClientService
|
||||||
|
@ -200,6 +212,7 @@ func (c *Sfgate) SetTransport(transport runtime.ClientTransport) {
|
||||||
c.Assets.SetTransport(transport)
|
c.Assets.SetTransport(transport)
|
||||||
c.Clusters.SetTransport(transport)
|
c.Clusters.SetTransport(transport)
|
||||||
c.CompanyProducts.SetTransport(transport)
|
c.CompanyProducts.SetTransport(transport)
|
||||||
|
c.CompanyServices.SetTransport(transport)
|
||||||
c.Contacts.SetTransport(transport)
|
c.Contacts.SetTransport(transport)
|
||||||
c.Contracts.SetTransport(transport)
|
c.Contracts.SetTransport(transport)
|
||||||
c.Courses.SetTransport(transport)
|
c.Courses.SetTransport(transport)
|
||||||
|
@ -211,7 +224,9 @@ func (c *Sfgate) SetTransport(transport runtime.ClientTransport) {
|
||||||
c.Industries.SetTransport(transport)
|
c.Industries.SetTransport(transport)
|
||||||
c.IndustryCompanies.SetTransport(transport)
|
c.IndustryCompanies.SetTransport(transport)
|
||||||
c.IndustryProducts.SetTransport(transport)
|
c.IndustryProducts.SetTransport(transport)
|
||||||
|
c.IndustryServices.SetTransport(transport)
|
||||||
c.Observations.SetTransport(transport)
|
c.Observations.SetTransport(transport)
|
||||||
|
c.Operations.SetTransport(transport)
|
||||||
c.ResearchProjects.SetTransport(transport)
|
c.ResearchProjects.SetTransport(transport)
|
||||||
c.Roles.SetTransport(transport)
|
c.Roles.SetTransport(transport)
|
||||||
c.Templates.SetTransport(transport)
|
c.Templates.SetTransport(transport)
|
||||||
|
|
|
@ -0,0 +1,177 @@
|
||||||
|
// 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 sfgate_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CompanyService A service performed by a Company
|
||||||
|
//
|
||||||
|
// swagger:model CompanyService
|
||||||
|
type CompanyService struct {
|
||||||
|
|
||||||
|
// ID of the Company that owns this Service
|
||||||
|
AccountID string `json:"AccountID,omitempty"`
|
||||||
|
|
||||||
|
// Salesforce AppExchange URL
|
||||||
|
AppExchange *string `json:"AppExchange,omitempty"`
|
||||||
|
|
||||||
|
// Created By User ID
|
||||||
|
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||||
|
|
||||||
|
// Created Date
|
||||||
|
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||||
|
|
||||||
|
// Description of service
|
||||||
|
Description *string `json:"Description,omitempty"`
|
||||||
|
|
||||||
|
// Full Description of service
|
||||||
|
FullDescription *string `json:"FullDescription,omitempty"`
|
||||||
|
|
||||||
|
// Record Id
|
||||||
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
|
// Image Alt Text
|
||||||
|
ImageAltText *string `json:"ImageAltText,omitempty"`
|
||||||
|
|
||||||
|
// Image URL
|
||||||
|
ImageURL *string `json:"ImageURL,omitempty"`
|
||||||
|
|
||||||
|
// Industries
|
||||||
|
Industries []*Industry `json:"Industries"`
|
||||||
|
|
||||||
|
// Last Modified By User ID
|
||||||
|
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||||
|
|
||||||
|
// Last Modified Date
|
||||||
|
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||||
|
|
||||||
|
// Logo
|
||||||
|
Logo *string `json:"Logo,omitempty"`
|
||||||
|
|
||||||
|
// Service Name
|
||||||
|
Name *string `json:"Name,omitempty"`
|
||||||
|
|
||||||
|
// Published
|
||||||
|
Published *bool `json:"Published,omitempty"`
|
||||||
|
|
||||||
|
// Salesforce Specific
|
||||||
|
SalesforceSpecific *bool `json:"SalesforceSpecific,omitempty"`
|
||||||
|
|
||||||
|
// Service Video ID
|
||||||
|
ServiceVideoID *string `json:"ServiceVideoID,omitempty"`
|
||||||
|
|
||||||
|
// Slug
|
||||||
|
Slug *string `json:"Slug,omitempty"`
|
||||||
|
|
||||||
|
// Tag Line
|
||||||
|
TagLine *string `json:"TagLine,omitempty"`
|
||||||
|
|
||||||
|
// URL
|
||||||
|
URL *string `json:"URL,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this company service
|
||||||
|
func (m *CompanyService) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateIndustries(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyService) validateIndustries(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Industries) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Industries); i++ {
|
||||||
|
if swag.IsZero(m.Industries[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Industries[i] != nil {
|
||||||
|
if err := m.Industries[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this company service based on the context it is used
|
||||||
|
func (m *CompanyService) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateIndustries(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyService) contextValidateIndustries(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Industries); i++ {
|
||||||
|
|
||||||
|
if m.Industries[i] != nil {
|
||||||
|
if err := m.Industries[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Industries" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *CompanyService) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *CompanyService) UnmarshalBinary(b []byte) error {
|
||||||
|
var res CompanyService
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
// 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 sfgate_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CompanyServiceRequest An array of CompanyService objects submitted for processing
|
||||||
|
//
|
||||||
|
// swagger:model CompanyServiceRequest
|
||||||
|
type CompanyServiceRequest struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*CompanyService `json:"Data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this company service request
|
||||||
|
func (m *CompanyServiceRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceRequest) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this company service request based on the context it is used
|
||||||
|
func (m *CompanyServiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *CompanyServiceRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *CompanyServiceRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res CompanyServiceRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,166 @@
|
||||||
|
// 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 sfgate_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CompanyServiceResponse An array of CompanyService objects produced in response to a request
|
||||||
|
//
|
||||||
|
// swagger:model CompanyServiceResponse
|
||||||
|
type CompanyServiceResponse struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*CompanyService `json:"Data"`
|
||||||
|
|
||||||
|
// meta
|
||||||
|
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this company service response
|
||||||
|
func (m *CompanyServiceResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateMeta(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceResponse) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceResponse) validateMeta(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Meta) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this company service response based on the context it is used
|
||||||
|
func (m *CompanyServiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CompanyServiceResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *CompanyServiceResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *CompanyServiceResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res CompanyServiceResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,175 @@
|
||||||
|
// 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 sfgate_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// IndustryService Junction Object bewtwen Industry and CompanyService
|
||||||
|
//
|
||||||
|
// swagger:model IndustryService
|
||||||
|
type IndustryService struct {
|
||||||
|
|
||||||
|
// company service
|
||||||
|
CompanyService *CompanyService `json:"CompanyService,omitempty"`
|
||||||
|
|
||||||
|
// company service ID
|
||||||
|
CompanyServiceID *string `json:"CompanyServiceID,omitempty"`
|
||||||
|
|
||||||
|
// Created By User ID
|
||||||
|
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||||
|
|
||||||
|
// Created Date
|
||||||
|
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||||
|
|
||||||
|
// Record Id
|
||||||
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
|
// industry
|
||||||
|
Industry *Industry `json:"Industry,omitempty"`
|
||||||
|
|
||||||
|
// industry ID
|
||||||
|
IndustryID *string `json:"IndustryID,omitempty"`
|
||||||
|
|
||||||
|
// Last Modified By User ID
|
||||||
|
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||||
|
|
||||||
|
// Last Modified Date
|
||||||
|
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this industry service
|
||||||
|
func (m *IndustryService) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateCompanyService(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateIndustry(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryService) validateCompanyService(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.CompanyService) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.CompanyService != nil {
|
||||||
|
if err := m.CompanyService.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("CompanyService")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("CompanyService")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryService) validateIndustry(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Industry) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Industry != nil {
|
||||||
|
if err := m.Industry.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Industry")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Industry")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this industry service based on the context it is used
|
||||||
|
func (m *IndustryService) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateCompanyService(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.contextValidateIndustry(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryService) contextValidateCompanyService(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if m.CompanyService != nil {
|
||||||
|
if err := m.CompanyService.ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("CompanyService")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("CompanyService")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryService) contextValidateIndustry(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if m.Industry != nil {
|
||||||
|
if err := m.Industry.ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Industry")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Industry")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *IndustryService) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *IndustryService) UnmarshalBinary(b []byte) error {
|
||||||
|
var res IndustryService
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
// 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 sfgate_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// IndustryServiceRequest An array of IndustryService objects submitted for processing
|
||||||
|
//
|
||||||
|
// swagger:model IndustryServiceRequest
|
||||||
|
type IndustryServiceRequest struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*IndustryService `json:"Data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this industry service request
|
||||||
|
func (m *IndustryServiceRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceRequest) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this industry service request based on the context it is used
|
||||||
|
func (m *IndustryServiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *IndustryServiceRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *IndustryServiceRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res IndustryServiceRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,166 @@
|
||||||
|
// 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 sfgate_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// IndustryServiceResponse An array of IndustryService objects produced in response to a request
|
||||||
|
//
|
||||||
|
// swagger:model IndustryServiceResponse
|
||||||
|
type IndustryServiceResponse struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*IndustryService `json:"Data"`
|
||||||
|
|
||||||
|
// meta
|
||||||
|
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this industry service response
|
||||||
|
func (m *IndustryServiceResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateMeta(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceResponse) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceResponse) validateMeta(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Meta) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this industry service response based on the context it is used
|
||||||
|
func (m *IndustryServiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *IndustryServiceResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *IndustryServiceResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *IndustryServiceResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res IndustryServiceResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -39,15 +39,15 @@ type ResearchProjectProduct struct {
|
||||||
// last modified date
|
// last modified date
|
||||||
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||||
|
|
||||||
|
// product name
|
||||||
|
ProductName *string `json:"ProductName,omitempty"`
|
||||||
|
|
||||||
// research project ID
|
// research project ID
|
||||||
ResearchProjectID *string `json:"ResearchProjectID,omitempty"`
|
ResearchProjectID *string `json:"ResearchProjectID,omitempty"`
|
||||||
|
|
||||||
// tenant ID
|
// tenant ID
|
||||||
TenantID *string `json:"TenantID,omitempty"`
|
TenantID *string `json:"TenantID,omitempty"`
|
||||||
|
|
||||||
// title
|
|
||||||
Title *string `json:"Title,omitempty"`
|
|
||||||
|
|
||||||
// user ID
|
// user ID
|
||||||
UserID *string `json:"UserID,omitempty"`
|
UserID *string `json:"UserID,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
// 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 sfgate_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ResearchProjectService research project service
|
||||||
|
//
|
||||||
|
// swagger:model researchProjectService
|
||||||
|
type ResearchProjectService struct {
|
||||||
|
|
||||||
|
// company service ID
|
||||||
|
CompanyServiceID *string `json:"CompanyServiceID,omitempty"`
|
||||||
|
|
||||||
|
// created by ID
|
||||||
|
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||||
|
|
||||||
|
// created date
|
||||||
|
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||||
|
|
||||||
|
// ID
|
||||||
|
ID string `json:"ID,omitempty"`
|
||||||
|
|
||||||
|
// last modified by ID
|
||||||
|
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
||||||
|
|
||||||
|
// last modified date
|
||||||
|
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
||||||
|
|
||||||
|
// research project ID
|
||||||
|
ResearchProjectID *string `json:"ResearchProjectID,omitempty"`
|
||||||
|
|
||||||
|
// service name
|
||||||
|
ServiceName *string `json:"ServiceName,omitempty"`
|
||||||
|
|
||||||
|
// tenant ID
|
||||||
|
TenantID *string `json:"TenantID,omitempty"`
|
||||||
|
|
||||||
|
// user ID
|
||||||
|
UserID *string `json:"UserID,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this research project service
|
||||||
|
func (m *ResearchProjectService) Validate(formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validates this research project service based on context it is used
|
||||||
|
func (m *ResearchProjectService) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectService) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectService) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ResearchProjectService
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
// 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 sfgate_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ResearchProjectServiceRequest An array of ResearchProjectService objects
|
||||||
|
//
|
||||||
|
// swagger:model ResearchProjectServiceRequest
|
||||||
|
type ResearchProjectServiceRequest struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*ResearchProjectService `json:"Data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this research project service request
|
||||||
|
func (m *ResearchProjectServiceRequest) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceRequest) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this research project service request based on the context it is used
|
||||||
|
func (m *ResearchProjectServiceRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectServiceRequest) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectServiceRequest) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ResearchProjectServiceRequest
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -0,0 +1,166 @@
|
||||||
|
// 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 sfgate_models
|
||||||
|
|
||||||
|
// This file was generated by the swagger tool.
|
||||||
|
// Editing this file might prove futile when you re-run the swagger generate command
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/go-openapi/errors"
|
||||||
|
"github.com/go-openapi/strfmt"
|
||||||
|
"github.com/go-openapi/swag"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ResearchProjectServiceResponse An array of ResearchProjectService objects
|
||||||
|
//
|
||||||
|
// swagger:model ResearchProjectServiceResponse
|
||||||
|
type ResearchProjectServiceResponse struct {
|
||||||
|
|
||||||
|
// data
|
||||||
|
Data []*ResearchProjectService `json:"Data"`
|
||||||
|
|
||||||
|
// meta
|
||||||
|
Meta *ResearchProjectCompanyResponseMeta `json:"Meta,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate validates this research project service response
|
||||||
|
func (m *ResearchProjectServiceResponse) Validate(formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.validateData(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.validateMeta(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceResponse) validateData(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Data) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
if swag.IsZero(m.Data[i]) { // not required
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceResponse) validateMeta(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Meta) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContextValidate validate this research project service response based on the context it is used
|
||||||
|
func (m *ResearchProjectServiceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
var res []error
|
||||||
|
|
||||||
|
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(res) > 0 {
|
||||||
|
return errors.CompositeValidationError(res...)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
for i := 0; i < len(m.Data); i++ {
|
||||||
|
|
||||||
|
if m.Data[i] != nil {
|
||||||
|
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ResearchProjectServiceResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectServiceResponse) MarshalBinary() ([]byte, error) {
|
||||||
|
if m == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return swag.WriteJSON(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnmarshalBinary interface implementation
|
||||||
|
func (m *ResearchProjectServiceResponse) UnmarshalBinary(b []byte) error {
|
||||||
|
var res ResearchProjectServiceResponse
|
||||||
|
if err := swag.ReadJSON(b, &res); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*m = res
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -16,6 +16,10 @@ Account:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
AppExchange:
|
||||||
|
description: Salesforce AppExchange URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
BillingAddress:
|
BillingAddress:
|
||||||
$ref: "./address.yaml#/Address"
|
$ref: "./address.yaml#/Address"
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
CompanyProduct:
|
CompanyProduct:
|
||||||
description: A software product or service vended by a Company
|
description: A software product or service vended by a Company
|
||||||
properties:
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
AccountID:
|
AccountID:
|
||||||
description: ID of the Company that owns this Product
|
description: ID of the Company that owns this Product
|
||||||
type: string
|
type: string
|
||||||
|
AppExchange:
|
||||||
|
description: Salesforce AppExchange URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
CreatedByID:
|
CreatedByID:
|
||||||
description: Created By User ID
|
description: Created By User ID
|
||||||
type: string
|
type: string
|
||||||
|
@ -20,9 +27,6 @@ CompanyProduct:
|
||||||
description: Full Description of product
|
description: Full Description of product
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
ID:
|
|
||||||
description: Record Id
|
|
||||||
type: string
|
|
||||||
ImageAltText:
|
ImageAltText:
|
||||||
description: Image Alt Text
|
description: Image Alt Text
|
||||||
type: string
|
type: string
|
||||||
|
@ -71,4 +75,10 @@ CompanyProduct:
|
||||||
description: Website
|
description: Website
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
Industries:
|
||||||
|
description: Industries
|
||||||
|
items:
|
||||||
|
$ref: "./industry.yaml#/Industry"
|
||||||
|
type: array
|
||||||
|
x-nullable: true
|
||||||
type: object
|
type: object
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
CompanyService:
|
||||||
|
description: A service performed by a Company
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
|
AccountID:
|
||||||
|
description: ID of the Company that owns this Service
|
||||||
|
type: string
|
||||||
|
AppExchange:
|
||||||
|
description: Salesforce AppExchange URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedByID:
|
||||||
|
description: Created By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedDate:
|
||||||
|
description: Created Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Description:
|
||||||
|
description: Description of service
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
FullDescription:
|
||||||
|
description: Full Description of service
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ImageAltText:
|
||||||
|
description: Image Alt Text
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ImageURL:
|
||||||
|
description: Image URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedByID:
|
||||||
|
description: Last Modified By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedDate:
|
||||||
|
description: Last Modified Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Logo:
|
||||||
|
description: Logo
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Name:
|
||||||
|
description: Service Name
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Published:
|
||||||
|
description: Published
|
||||||
|
type: boolean
|
||||||
|
x-nullable: true
|
||||||
|
SalesforceSpecific:
|
||||||
|
description: Salesforce Specific
|
||||||
|
type: boolean
|
||||||
|
x-nullable: true
|
||||||
|
ServiceVideoID:
|
||||||
|
description: Service Video ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Slug:
|
||||||
|
description: Slug
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
TagLine:
|
||||||
|
description: Tag Line
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
URL:
|
||||||
|
description: URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
type: object
|
|
@ -1,6 +1,9 @@
|
||||||
IndustryProduct:
|
IndustryProduct:
|
||||||
description: Junction object between Industry and CompanyProduct
|
description: Junction object between Industry and CompanyProduct
|
||||||
properties:
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
CompanyProduct:
|
CompanyProduct:
|
||||||
$ref: "./company-product.yaml#/CompanyProduct"
|
$ref: "./company-product.yaml#/CompanyProduct"
|
||||||
CompanyProductID:
|
CompanyProductID:
|
||||||
|
@ -14,9 +17,6 @@ IndustryProduct:
|
||||||
description: Created Date
|
description: Created Date
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
ID:
|
|
||||||
description: Record Id
|
|
||||||
type: string
|
|
||||||
Industry:
|
Industry:
|
||||||
$ref: "./industry.yaml#/Industry"
|
$ref: "./industry.yaml#/Industry"
|
||||||
IndustryID:
|
IndustryID:
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
IndustryService:
|
||||||
|
description: Junction Object bewtwen Industry and CompanyService
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
|
CompanyService:
|
||||||
|
$ref: "./company-service.yaml#/CompanyService"
|
||||||
|
CompanyServiceID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedByID:
|
||||||
|
description: Created By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedDate:
|
||||||
|
description: Created Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Industry:
|
||||||
|
$ref: "./industry.yaml#/Industry"
|
||||||
|
IndustryID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedByID:
|
||||||
|
description: Last Modified By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedDate:
|
||||||
|
description: Last Modified Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
type: object
|
|
@ -17,15 +17,15 @@ ResearchProjectProduct:
|
||||||
LastModifiedDate:
|
LastModifiedDate:
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
ProductName:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
ResearchProjectID:
|
ResearchProjectID:
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
TenantID:
|
TenantID:
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
Title:
|
|
||||||
type: string
|
|
||||||
x-nullable: true
|
|
||||||
UserID:
|
UserID:
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
ResearchProjectService:
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
type: string
|
||||||
|
CompanyServiceID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedByID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedDate:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedByID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedDate:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ResearchProjectID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ServiceName:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
TenantID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
UserID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
type: object
|
|
@ -160,6 +160,13 @@ parameters:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ResearchProjectProductRequest"
|
$ref: "#/definitions/ResearchProjectProductRequest"
|
||||||
|
ResearchProjectServiceRequest:
|
||||||
|
description: An array of new ResearchProjectService records
|
||||||
|
in: body
|
||||||
|
name: researchProjectServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/ResearchProjectServiceRequest"
|
||||||
ResearchProjectDocumentRequest:
|
ResearchProjectDocumentRequest:
|
||||||
description: An array of new ResearchProjectDocument records
|
description: An array of new ResearchProjectDocument records
|
||||||
in: body
|
in: body
|
||||||
|
@ -433,6 +440,10 @@ responses:
|
||||||
description: ResearchProjectProduct Response Object
|
description: ResearchProjectProduct Response Object
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ResearchProjectProductResponse"
|
$ref: "#/definitions/ResearchProjectProductResponse"
|
||||||
|
ResearchProjectServiceResponse:
|
||||||
|
description: ResearchProjectService Response Object
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/ResearchProjectServiceResponse"
|
||||||
ResearchProjectResponse:
|
ResearchProjectResponse:
|
||||||
description: ResearchProject Response Object
|
description: ResearchProject Response Object
|
||||||
schema:
|
schema:
|
||||||
|
@ -1892,6 +1903,82 @@ paths:
|
||||||
summary: Update ResearchProjectDocuments
|
summary: Update ResearchProjectDocuments
|
||||||
tags:
|
tags:
|
||||||
- ResearchProjects
|
- ResearchProjects
|
||||||
|
/researchprojectservices:
|
||||||
|
get:
|
||||||
|
description: Return a list of ResearchProjectService records from the datastore
|
||||||
|
operationId: getResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/idQuery"
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/Auth0UserIdHeader"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of ResearchProjectServices
|
||||||
|
tags:
|
||||||
|
- ResearchProjects
|
||||||
|
post:
|
||||||
|
description: Create ResearchProjectServices in the system
|
||||||
|
operationId: postResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/ResearchProjectServiceRequest"
|
||||||
|
- $ref: "#/parameters/Auth0UserIdHeader"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create new ResearchProjectServices
|
||||||
|
tags:
|
||||||
|
- ResearchProjects
|
||||||
|
put:
|
||||||
|
description: Update ResearchProjectService in the system
|
||||||
|
operationId: putResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/ResearchProjectServiceRequest"
|
||||||
|
- $ref: "#/parameters/Auth0UserIdHeader"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Update ResearchProjectServices
|
||||||
|
tags:
|
||||||
|
- ResearchProjects
|
||||||
|
|
||||||
/researchprojectproducts:
|
/researchprojectproducts:
|
||||||
get:
|
get:
|
||||||
description: Return a list of ResearchProjectProduct records from the datastore
|
description: Return a list of ResearchProjectProduct records from the datastore
|
||||||
|
@ -2938,6 +3025,24 @@ definitions:
|
||||||
$ref: "../../lib/swagger/defs/research-project-product.yaml#/ResearchProjectProduct"
|
$ref: "../../lib/swagger/defs/research-project-product.yaml#/ResearchProjectProduct"
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
ResearchProjectServiceResponse:
|
||||||
|
description: An array of ResearchProjectService objects
|
||||||
|
properties:
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "../../lib/swagger/defs/research-project-service.yaml#/ResearchProjectService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
ResearchProjectServiceRequest:
|
||||||
|
description: An array of ResearchProjectService objects
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "../../lib/swagger/defs/research-project-service.yaml#/ResearchProjectService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
ResearchProjectTopicRequest:
|
ResearchProjectTopicRequest:
|
||||||
description: An array of ResearchProjectTopic objects
|
description: An array of ResearchProjectTopic objects
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -40,6 +40,12 @@ parameters:
|
||||||
name: companyProductId
|
name: companyProductId
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
companyServiceIdQuery:
|
||||||
|
description: CompanyService record ID
|
||||||
|
in: query
|
||||||
|
name: companyServiceId
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
companyProductRequest:
|
companyProductRequest:
|
||||||
description: An array of new CompanyProduct records
|
description: An array of new CompanyProduct records
|
||||||
in: body
|
in: body
|
||||||
|
@ -47,6 +53,13 @@ parameters:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/CompanyProductRequest"
|
$ref: "#/definitions/CompanyProductRequest"
|
||||||
|
companyServiceRequest:
|
||||||
|
description: An array of new CompanyService records
|
||||||
|
in: body
|
||||||
|
name: companyServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/CompanyServiceRequest"
|
||||||
contactIdQuery:
|
contactIdQuery:
|
||||||
description: Contact record ID
|
description: Contact record ID
|
||||||
in: query
|
in: query
|
||||||
|
@ -123,6 +136,19 @@ parameters:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/IndustryProductRequest"
|
$ref: "#/definitions/IndustryProductRequest"
|
||||||
|
industryServiceIdQuery:
|
||||||
|
description: IndustryService record ID
|
||||||
|
in: query
|
||||||
|
name: industryServiceId
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
industryServiceRequest:
|
||||||
|
description: An array of new IndustryService records
|
||||||
|
in: body
|
||||||
|
name: industryServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/IndustryServiceRequest"
|
||||||
industryRequest:
|
industryRequest:
|
||||||
description: An array of new Industry records
|
description: An array of new Industry records
|
||||||
in: body
|
in: body
|
||||||
|
@ -204,9 +230,13 @@ responses:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Error"
|
$ref: "#/definitions/Error"
|
||||||
CompanyProductResponse:
|
CompanyProductResponse:
|
||||||
description: Response with Company objects
|
description: Response with CompanyProduct objects
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/CompanyProductResponse"
|
$ref: "#/definitions/CompanyProductResponse"
|
||||||
|
CompanyServiceResponse:
|
||||||
|
description: Response with CompanyService objects
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/CompanyServiceResponse"
|
||||||
Conflict:
|
Conflict:
|
||||||
description: Conflict
|
description: Conflict
|
||||||
headers:
|
headers:
|
||||||
|
@ -237,6 +267,10 @@ responses:
|
||||||
description: Response with IndustryProduct objects
|
description: Response with IndustryProduct objects
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/IndustryProductResponse"
|
$ref: "#/definitions/IndustryProductResponse"
|
||||||
|
IndustryServiceResponse:
|
||||||
|
description: Response with IndustryService objects
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/IndustryServiceResponse"
|
||||||
IndustryResponse:
|
IndustryResponse:
|
||||||
description: Response with Industry objects
|
description: Response with Industry objects
|
||||||
schema:
|
schema:
|
||||||
|
@ -312,6 +346,79 @@ paths:
|
||||||
summary: Get a list of company categories
|
summary: Get a list of company categories
|
||||||
tags:
|
tags:
|
||||||
- CompanyCategories
|
- CompanyCategories
|
||||||
|
/companyservices:
|
||||||
|
delete:
|
||||||
|
description: Delete CompanyService record
|
||||||
|
operationId: deleteCompanyService
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/companyServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/DeleteResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Delete a CompanyService
|
||||||
|
tags:
|
||||||
|
- CompanyServices
|
||||||
|
get:
|
||||||
|
description: Return a list of all available CompanyServices
|
||||||
|
operationId: getCompanyServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/slugQuery"
|
||||||
|
- $ref: "#/parameters/companyServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/CompanyServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of company services
|
||||||
|
tags:
|
||||||
|
- CompanyServices
|
||||||
|
post:
|
||||||
|
description: Create a new CompanyService record
|
||||||
|
operationId: createCompanyService
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/companyServiceRequest"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/CompanyServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"409":
|
||||||
|
$ref: "#/responses/Conflict"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create a new CompanyService
|
||||||
|
tags:
|
||||||
|
- CompanyServices
|
||||||
/companyproducts:
|
/companyproducts:
|
||||||
delete:
|
delete:
|
||||||
description: Delete CompanyProduct record
|
description: Delete CompanyProduct record
|
||||||
|
@ -730,6 +837,80 @@ paths:
|
||||||
summary: Add a new industryCompany to SalesforceDevops.net
|
summary: Add a new industryCompany to SalesforceDevops.net
|
||||||
tags:
|
tags:
|
||||||
- IndustryCompanies
|
- IndustryCompanies
|
||||||
|
/industryservices:
|
||||||
|
delete:
|
||||||
|
description: Delete IndustryService record
|
||||||
|
operationId: deleteIndustryService
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/industryServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/DeleteResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Delete An IndustryService
|
||||||
|
tags:
|
||||||
|
- IndustryServices
|
||||||
|
get:
|
||||||
|
description: Return a list of all available IndustryServices
|
||||||
|
operationId: getIndustryServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/industryServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/IndustryServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of industryservices
|
||||||
|
tags:
|
||||||
|
- IndustryServices
|
||||||
|
post:
|
||||||
|
description: IndustryService record to be added
|
||||||
|
operationId: postIndustryServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/industryServiceRequest"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/IndustryServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Add a new industryService to SalesforceDevops.net
|
||||||
|
tags:
|
||||||
|
- IndustryServices
|
||||||
/industryproducts:
|
/industryproducts:
|
||||||
delete:
|
delete:
|
||||||
description: Delete IndustryProduct record
|
description: Delete IndustryProduct record
|
||||||
|
@ -1012,6 +1193,10 @@ definitions:
|
||||||
description: ID of the Company that owns this Product
|
description: ID of the Company that owns this Product
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
AppExchange:
|
||||||
|
description: Salesforce AppExchange URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
CreatedByID:
|
CreatedByID:
|
||||||
description: Created By User ID
|
description: Created By User ID
|
||||||
type: string
|
type: string
|
||||||
|
@ -1104,6 +1289,108 @@ definitions:
|
||||||
Meta:
|
Meta:
|
||||||
$ref: "#/definitions/ResponseMeta"
|
$ref: "#/definitions/ResponseMeta"
|
||||||
type: object
|
type: object
|
||||||
|
CompanyService:
|
||||||
|
description: A service performed by a Company
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
|
AccountID:
|
||||||
|
description: ID of the Company that owns this Service
|
||||||
|
type: string
|
||||||
|
AppExchange:
|
||||||
|
description: Salesforce AppExchange URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedByID:
|
||||||
|
description: Created By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedDate:
|
||||||
|
description: Created Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Description:
|
||||||
|
description: Description of service
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
FullDescription:
|
||||||
|
description: Full Description of service
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ImageAltText:
|
||||||
|
description: Image Alt Text
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ImageURL:
|
||||||
|
description: Image URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Industries:
|
||||||
|
description: Industries
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/Industry"
|
||||||
|
type: array
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedByID:
|
||||||
|
description: Last Modified By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedDate:
|
||||||
|
description: Last Modified Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Logo:
|
||||||
|
description: Logo
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Name:
|
||||||
|
description: Service Name
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Published:
|
||||||
|
description: Published
|
||||||
|
type: boolean
|
||||||
|
x-nullable: true
|
||||||
|
SalesforceSpecific:
|
||||||
|
description: Salesforce Specific
|
||||||
|
type: boolean
|
||||||
|
x-nullable: true
|
||||||
|
ServiceVideoID:
|
||||||
|
description: Service Video ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Slug:
|
||||||
|
description: Slug
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
TagLine:
|
||||||
|
description: Tag Line
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
URL:
|
||||||
|
description: URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
type: object
|
||||||
|
CompanyServiceRequest:
|
||||||
|
description: An array of CompanyService objects submitted for processing
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
CompanyServiceResponse:
|
||||||
|
description: An array of CompanyService objects produced in response to a request
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
type: array
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
|
type: object
|
||||||
DeleteResponse:
|
DeleteResponse:
|
||||||
properties:
|
properties:
|
||||||
Data:
|
Data:
|
||||||
|
@ -1272,6 +1559,12 @@ definitions:
|
||||||
$ref: "#/definitions/CompanyProduct"
|
$ref: "#/definitions/CompanyProduct"
|
||||||
type: array
|
type: array
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
CompanyServices:
|
||||||
|
description: The list of Services in this industry
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
type: array
|
||||||
|
x-nullable: true
|
||||||
CreatedByID:
|
CreatedByID:
|
||||||
description: Created By User ID
|
description: Created By User ID
|
||||||
type: string
|
type: string
|
||||||
|
@ -1436,6 +1729,57 @@ definitions:
|
||||||
Meta:
|
Meta:
|
||||||
$ref: "#/definitions/ResponseMeta"
|
$ref: "#/definitions/ResponseMeta"
|
||||||
type: object
|
type: object
|
||||||
|
IndustryService:
|
||||||
|
description: Junction Object bewtwen Industry and CompanyService
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
|
CompanyService:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
CompanyServiceID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedByID:
|
||||||
|
description: Created By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedDate:
|
||||||
|
description: Created Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Industry:
|
||||||
|
$ref: "#/definitions/Industry"
|
||||||
|
IndustryID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedByID:
|
||||||
|
description: Last Modified By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedDate:
|
||||||
|
description: Last Modified Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
type: object
|
||||||
|
IndustryServiceRequest:
|
||||||
|
description: An array of IndustryService objects submitted for processing
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/IndustryService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
IndustryServiceResponse:
|
||||||
|
description: An array of IndustryService objects produced in response to a request
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/IndustryService"
|
||||||
|
type: array
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
|
type: object
|
||||||
IndustryRequest:
|
IndustryRequest:
|
||||||
description: An array of Industry objects submitted for processing
|
description: An array of Industry objects submitted for processing
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -100,6 +100,32 @@ parameters:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/AssetRequest"
|
$ref: "#/definitions/AssetRequest"
|
||||||
|
companyServiceIdQuery:
|
||||||
|
description: CompanyService record ID
|
||||||
|
in: query
|
||||||
|
name: companyServiceId
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
companyServiceRequest:
|
||||||
|
description: An array of new CompanyService records
|
||||||
|
in: body
|
||||||
|
name: companyServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/CompanyServiceRequest"
|
||||||
|
industryServiceIdQuery:
|
||||||
|
description: IndustryService record ID
|
||||||
|
in: query
|
||||||
|
name: industryServiceId
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
industryServiceRequest:
|
||||||
|
description: An array of new IndustryService records
|
||||||
|
in: body
|
||||||
|
name: industryServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/IndustryServiceRequest"
|
||||||
clusterIdQuery:
|
clusterIdQuery:
|
||||||
description: Record Id of a Cluster
|
description: Record Id of a Cluster
|
||||||
in: query
|
in: query
|
||||||
|
@ -304,6 +330,13 @@ parameters:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ResearchProjectProductRequest"
|
$ref: "#/definitions/ResearchProjectProductRequest"
|
||||||
|
ResearchProjectServiceRequest:
|
||||||
|
description: An array of new ResearchProjectService records
|
||||||
|
in: body
|
||||||
|
name: researchProjectServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/ResearchProjectServiceRequest"
|
||||||
ResearchProjectRequest:
|
ResearchProjectRequest:
|
||||||
description: An array of new ResearchProject records
|
description: An array of new ResearchProject records
|
||||||
in: body
|
in: body
|
||||||
|
@ -389,6 +422,10 @@ responses:
|
||||||
description: Response with an array of CompanyProduct objects
|
description: Response with an array of CompanyProduct objects
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/CompanyProductResponse"
|
$ref: "#/definitions/CompanyProductResponse"
|
||||||
|
CompanyServiceResponse:
|
||||||
|
description: Response with CompanyService objects
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/CompanyServiceResponse"
|
||||||
ContactResponse:
|
ContactResponse:
|
||||||
description: Response with Contact objects
|
description: Response with Contact objects
|
||||||
schema:
|
schema:
|
||||||
|
@ -437,6 +474,10 @@ responses:
|
||||||
description: Response with Industry objects
|
description: Response with Industry objects
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/IndustryResponse"
|
$ref: "#/definitions/IndustryResponse"
|
||||||
|
IndustryServiceResponse:
|
||||||
|
description: Response with IndustryService objects
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/IndustryServiceResponse"
|
||||||
InvalidDataError:
|
InvalidDataError:
|
||||||
description: Invalid data was sent
|
description: Invalid data was sent
|
||||||
schema:
|
schema:
|
||||||
|
@ -457,6 +498,10 @@ responses:
|
||||||
description: ResearchProjectProduct Response Object
|
description: ResearchProjectProduct Response Object
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ResearchProjectProductResponse"
|
$ref: "#/definitions/ResearchProjectProductResponse"
|
||||||
|
ResearchProjectServiceResponse:
|
||||||
|
description: ResearchProjectService Response Object
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/ResearchProjectServiceResponse"
|
||||||
ResearchProjectResponse:
|
ResearchProjectResponse:
|
||||||
description: ResearchProject Response Object
|
description: ResearchProject Response Object
|
||||||
schema:
|
schema:
|
||||||
|
@ -772,6 +817,56 @@ paths:
|
||||||
summary: Add a new companyproduct
|
summary: Add a new companyproduct
|
||||||
tags:
|
tags:
|
||||||
- CompanyProducts
|
- CompanyProducts
|
||||||
|
/companyservices:
|
||||||
|
get:
|
||||||
|
description: Return a list of all available CompanyServices
|
||||||
|
operationId: getCompanyServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/activeQuery"
|
||||||
|
- $ref: "#/parameters/companyServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/CompanyServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of companyservices
|
||||||
|
tags:
|
||||||
|
- CompanyServices
|
||||||
|
post:
|
||||||
|
description: Industry record to be added
|
||||||
|
operationId: postCompanyServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/companyServiceRequest"
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/SalesforcePostResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Add a new companyservice
|
||||||
|
tags:
|
||||||
|
- CompanyServices
|
||||||
/contacts:
|
/contacts:
|
||||||
delete:
|
delete:
|
||||||
description: Delete Contact record from Salesforce
|
description: Delete Contact record from Salesforce
|
||||||
|
@ -1510,6 +1605,56 @@ paths:
|
||||||
summary: Add a new IndustryCompany
|
summary: Add a new IndustryCompany
|
||||||
tags:
|
tags:
|
||||||
- IndustryCompanies
|
- IndustryCompanies
|
||||||
|
/industryservices:
|
||||||
|
get:
|
||||||
|
description: Return a list of all available IndustryServices
|
||||||
|
operationId: getIndustryServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/activeQuery"
|
||||||
|
- $ref: "#/parameters/industryServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/IndustryServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of industryServices
|
||||||
|
tags:
|
||||||
|
- IndustryServices
|
||||||
|
post:
|
||||||
|
description: IndustryService record to be added
|
||||||
|
operationId: postIndustryServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/industryServiceRequest"
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/SalesforcePostResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Add a new IndustryService
|
||||||
|
tags:
|
||||||
|
- IndustryServices
|
||||||
/industryproducts:
|
/industryproducts:
|
||||||
get:
|
get:
|
||||||
description: Return a list of all available IndustryProducts
|
description: Return a list of all available IndustryProducts
|
||||||
|
@ -1682,6 +1827,71 @@ paths:
|
||||||
summary: Update ResearchProjectCompanies
|
summary: Update ResearchProjectCompanies
|
||||||
tags:
|
tags:
|
||||||
- ResearchProjects
|
- ResearchProjects
|
||||||
|
/researchprojectservices:
|
||||||
|
get:
|
||||||
|
description: Return a list of ResearchProjectService records from the datastore
|
||||||
|
operationId: getResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/idQuery"
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of ResearchProjectServices
|
||||||
|
tags:
|
||||||
|
- ResearchProjects
|
||||||
|
post:
|
||||||
|
description: Create ResearchProjectServices in the system
|
||||||
|
operationId: postResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/ResearchProjectServiceRequest"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create new ResearchProjectServices
|
||||||
|
tags:
|
||||||
|
- ResearchProjects
|
||||||
|
put:
|
||||||
|
description: Update ResearchProjectService in the system
|
||||||
|
operationId: putResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/ResearchProjectServiceRequest"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
/researchprojectproducts:
|
/researchprojectproducts:
|
||||||
get:
|
get:
|
||||||
description: Return a list of ResearchProjectProduct records from the datastore
|
description: Return a list of ResearchProjectProduct records from the datastore
|
||||||
|
@ -2823,6 +3033,108 @@ definitions:
|
||||||
meta:
|
meta:
|
||||||
$ref: "#/definitions/ResponseMeta"
|
$ref: "#/definitions/ResponseMeta"
|
||||||
type: object
|
type: object
|
||||||
|
CompanyService:
|
||||||
|
description: A service performed by a Company
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
|
AccountID:
|
||||||
|
description: ID of the Company that owns this Service
|
||||||
|
type: string
|
||||||
|
AppExchange:
|
||||||
|
description: Salesforce AppExchange URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedByID:
|
||||||
|
description: Created By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedDate:
|
||||||
|
description: Created Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Description:
|
||||||
|
description: Description of service
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
FullDescription:
|
||||||
|
description: Full Description of service
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ImageAltText:
|
||||||
|
description: Image Alt Text
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ImageURL:
|
||||||
|
description: Image URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Industries:
|
||||||
|
description: Industries
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/Industry"
|
||||||
|
type: array
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedByID:
|
||||||
|
description: Last Modified By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedDate:
|
||||||
|
description: Last Modified Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Logo:
|
||||||
|
description: Logo
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Name:
|
||||||
|
description: Service Name
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Published:
|
||||||
|
description: Published
|
||||||
|
type: boolean
|
||||||
|
x-nullable: true
|
||||||
|
SalesforceSpecific:
|
||||||
|
description: Salesforce Specific
|
||||||
|
type: boolean
|
||||||
|
x-nullable: true
|
||||||
|
ServiceVideoID:
|
||||||
|
description: Service Video ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Slug:
|
||||||
|
description: Slug
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
TagLine:
|
||||||
|
description: Tag Line
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
URL:
|
||||||
|
description: URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
type: object
|
||||||
|
CompanyServiceRequest:
|
||||||
|
description: An array of CompanyService objects submitted for processing
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
CompanyServiceResponse:
|
||||||
|
description: An array of CompanyService objects produced in response to a request
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
type: array
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
|
type: object
|
||||||
Contact:
|
Contact:
|
||||||
properties:
|
properties:
|
||||||
AccountID:
|
AccountID:
|
||||||
|
@ -3590,6 +3902,57 @@ definitions:
|
||||||
Meta:
|
Meta:
|
||||||
$ref: "#/definitions/ResponseMeta"
|
$ref: "#/definitions/ResponseMeta"
|
||||||
type: object
|
type: object
|
||||||
|
IndustryService:
|
||||||
|
description: Junction Object bewtwen Industry and CompanyService
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
|
CompanyService:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
CompanyServiceID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedByID:
|
||||||
|
description: Created By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedDate:
|
||||||
|
description: Created Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Industry:
|
||||||
|
$ref: "#/definitions/Industry"
|
||||||
|
IndustryID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedByID:
|
||||||
|
description: Last Modified By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedDate:
|
||||||
|
description: Last Modified Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
type: object
|
||||||
|
IndustryServiceRequest:
|
||||||
|
description: An array of IndustryService objects submitted for processing
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/IndustryService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
IndustryServiceResponse:
|
||||||
|
description: An array of IndustryService objects produced in response to a request
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/IndustryService"
|
||||||
|
type: array
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
|
type: object
|
||||||
IndustryRequest:
|
IndustryRequest:
|
||||||
description: An array of Industry objects submitted for processing
|
description: An array of Industry objects submitted for processing
|
||||||
properties:
|
properties:
|
||||||
|
@ -4538,3 +4901,21 @@ definitions:
|
||||||
$ref: "../../lib/swagger/defs/research-project-company.yaml#/ResearchProjectCompany"
|
$ref: "../../lib/swagger/defs/research-project-company.yaml#/ResearchProjectCompany"
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
ResearchProjectServiceRequest:
|
||||||
|
description: An array of ResearchProjectService objects
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "../../lib/swagger/defs/research-project-service.yaml#/ResearchProjectService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
ResearchProjectServiceResponse:
|
||||||
|
description: An array of ResearchProjectService objects
|
||||||
|
properties:
|
||||||
|
Meta:
|
||||||
|
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "../../lib/swagger/defs/research-project-service.yaml#/ResearchProjectService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
|
|
@ -160,6 +160,13 @@ parameters:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ResearchProjectProductRequest"
|
$ref: "#/definitions/ResearchProjectProductRequest"
|
||||||
|
ResearchProjectServiceRequest:
|
||||||
|
description: An array of new ResearchProjectService records
|
||||||
|
in: body
|
||||||
|
name: researchProjectServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/ResearchProjectServiceRequest"
|
||||||
ResearchProjectDocumentRequest:
|
ResearchProjectDocumentRequest:
|
||||||
description: An array of new ResearchProjectDocument records
|
description: An array of new ResearchProjectDocument records
|
||||||
in: body
|
in: body
|
||||||
|
@ -433,6 +440,10 @@ responses:
|
||||||
description: ResearchProjectProduct Response Object
|
description: ResearchProjectProduct Response Object
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ResearchProjectProductResponse"
|
$ref: "#/definitions/ResearchProjectProductResponse"
|
||||||
|
ResearchProjectServiceResponse:
|
||||||
|
description: ResearchProjectService Response Object
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/ResearchProjectServiceResponse"
|
||||||
ResearchProjectResponse:
|
ResearchProjectResponse:
|
||||||
description: ResearchProject Response Object
|
description: ResearchProject Response Object
|
||||||
schema:
|
schema:
|
||||||
|
@ -1892,6 +1903,82 @@ paths:
|
||||||
summary: Update ResearchProjectDocuments
|
summary: Update ResearchProjectDocuments
|
||||||
tags:
|
tags:
|
||||||
- ResearchProjects
|
- ResearchProjects
|
||||||
|
/researchprojectservices:
|
||||||
|
get:
|
||||||
|
description: Return a list of ResearchProjectService records from the datastore
|
||||||
|
operationId: getResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/idQuery"
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/Auth0UserIdHeader"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of ResearchProjectServices
|
||||||
|
tags:
|
||||||
|
- ResearchProjects
|
||||||
|
post:
|
||||||
|
description: Create ResearchProjectServices in the system
|
||||||
|
operationId: postResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/ResearchProjectServiceRequest"
|
||||||
|
- $ref: "#/parameters/Auth0UserIdHeader"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create new ResearchProjectServices
|
||||||
|
tags:
|
||||||
|
- ResearchProjects
|
||||||
|
put:
|
||||||
|
description: Update ResearchProjectService in the system
|
||||||
|
operationId: putResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/ResearchProjectServiceRequest"
|
||||||
|
- $ref: "#/parameters/Auth0UserIdHeader"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Update ResearchProjectServices
|
||||||
|
tags:
|
||||||
|
- ResearchProjects
|
||||||
|
|
||||||
/researchprojectproducts:
|
/researchprojectproducts:
|
||||||
get:
|
get:
|
||||||
description: Return a list of ResearchProjectProduct records from the datastore
|
description: Return a list of ResearchProjectProduct records from the datastore
|
||||||
|
@ -2938,6 +3025,24 @@ definitions:
|
||||||
$ref: "../../lib/swagger/defs/research-project-product.yaml#/ResearchProjectProduct"
|
$ref: "../../lib/swagger/defs/research-project-product.yaml#/ResearchProjectProduct"
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
ResearchProjectServiceResponse:
|
||||||
|
description: An array of ResearchProjectService objects
|
||||||
|
properties:
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "../../lib/swagger/defs/research-project-service.yaml#/ResearchProjectService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
ResearchProjectServiceRequest:
|
||||||
|
description: An array of ResearchProjectService objects
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "../../lib/swagger/defs/research-project-service.yaml#/ResearchProjectService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
ResearchProjectTopicRequest:
|
ResearchProjectTopicRequest:
|
||||||
description: An array of ResearchProjectTopic objects
|
description: An array of ResearchProjectTopic objects
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -40,6 +40,12 @@ parameters:
|
||||||
name: companyProductId
|
name: companyProductId
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
companyServiceIdQuery:
|
||||||
|
description: CompanyService record ID
|
||||||
|
in: query
|
||||||
|
name: companyServiceId
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
companyProductRequest:
|
companyProductRequest:
|
||||||
description: An array of new CompanyProduct records
|
description: An array of new CompanyProduct records
|
||||||
in: body
|
in: body
|
||||||
|
@ -47,6 +53,13 @@ parameters:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/CompanyProductRequest"
|
$ref: "#/definitions/CompanyProductRequest"
|
||||||
|
companyServiceRequest:
|
||||||
|
description: An array of new CompanyService records
|
||||||
|
in: body
|
||||||
|
name: companyServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/CompanyServiceRequest"
|
||||||
contactIdQuery:
|
contactIdQuery:
|
||||||
description: Contact record ID
|
description: Contact record ID
|
||||||
in: query
|
in: query
|
||||||
|
@ -123,6 +136,19 @@ parameters:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/IndustryProductRequest"
|
$ref: "#/definitions/IndustryProductRequest"
|
||||||
|
industryServiceIdQuery:
|
||||||
|
description: IndustryService record ID
|
||||||
|
in: query
|
||||||
|
name: industryServiceId
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
industryServiceRequest:
|
||||||
|
description: An array of new IndustryService records
|
||||||
|
in: body
|
||||||
|
name: industryServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/IndustryServiceRequest"
|
||||||
industryRequest:
|
industryRequest:
|
||||||
description: An array of new Industry records
|
description: An array of new Industry records
|
||||||
in: body
|
in: body
|
||||||
|
@ -204,9 +230,13 @@ responses:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Error"
|
$ref: "#/definitions/Error"
|
||||||
CompanyProductResponse:
|
CompanyProductResponse:
|
||||||
description: Response with Company objects
|
description: Response with CompanyProduct objects
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/CompanyProductResponse"
|
$ref: "#/definitions/CompanyProductResponse"
|
||||||
|
CompanyServiceResponse:
|
||||||
|
description: Response with CompanyService objects
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/CompanyServiceResponse"
|
||||||
Conflict:
|
Conflict:
|
||||||
description: Conflict
|
description: Conflict
|
||||||
headers:
|
headers:
|
||||||
|
@ -237,6 +267,10 @@ responses:
|
||||||
description: Response with IndustryProduct objects
|
description: Response with IndustryProduct objects
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/IndustryProductResponse"
|
$ref: "#/definitions/IndustryProductResponse"
|
||||||
|
IndustryServiceResponse:
|
||||||
|
description: Response with IndustryService objects
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/IndustryServiceResponse"
|
||||||
IndustryResponse:
|
IndustryResponse:
|
||||||
description: Response with Industry objects
|
description: Response with Industry objects
|
||||||
schema:
|
schema:
|
||||||
|
@ -312,6 +346,79 @@ paths:
|
||||||
summary: Get a list of company categories
|
summary: Get a list of company categories
|
||||||
tags:
|
tags:
|
||||||
- CompanyCategories
|
- CompanyCategories
|
||||||
|
/companyservices:
|
||||||
|
delete:
|
||||||
|
description: Delete CompanyService record
|
||||||
|
operationId: deleteCompanyService
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/companyServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/DeleteResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Delete a CompanyService
|
||||||
|
tags:
|
||||||
|
- CompanyServices
|
||||||
|
get:
|
||||||
|
description: Return a list of all available CompanyServices
|
||||||
|
operationId: getCompanyServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/slugQuery"
|
||||||
|
- $ref: "#/parameters/companyServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/CompanyServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of company services
|
||||||
|
tags:
|
||||||
|
- CompanyServices
|
||||||
|
post:
|
||||||
|
description: Create a new CompanyService record
|
||||||
|
operationId: createCompanyService
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/companyServiceRequest"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/CompanyServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"409":
|
||||||
|
$ref: "#/responses/Conflict"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create a new CompanyService
|
||||||
|
tags:
|
||||||
|
- CompanyServices
|
||||||
/companyproducts:
|
/companyproducts:
|
||||||
delete:
|
delete:
|
||||||
description: Delete CompanyProduct record
|
description: Delete CompanyProduct record
|
||||||
|
@ -730,6 +837,80 @@ paths:
|
||||||
summary: Add a new industryCompany to SalesforceDevops.net
|
summary: Add a new industryCompany to SalesforceDevops.net
|
||||||
tags:
|
tags:
|
||||||
- IndustryCompanies
|
- IndustryCompanies
|
||||||
|
/industryservices:
|
||||||
|
delete:
|
||||||
|
description: Delete IndustryService record
|
||||||
|
operationId: deleteIndustryService
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/industryServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/DeleteResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Delete An IndustryService
|
||||||
|
tags:
|
||||||
|
- IndustryServices
|
||||||
|
get:
|
||||||
|
description: Return a list of all available IndustryServices
|
||||||
|
operationId: getIndustryServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/industryServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/IndustryServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of industryservices
|
||||||
|
tags:
|
||||||
|
- IndustryServices
|
||||||
|
post:
|
||||||
|
description: IndustryService record to be added
|
||||||
|
operationId: postIndustryServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/industryServiceRequest"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/IndustryServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Add a new industryService to SalesforceDevops.net
|
||||||
|
tags:
|
||||||
|
- IndustryServices
|
||||||
/industryproducts:
|
/industryproducts:
|
||||||
delete:
|
delete:
|
||||||
description: Delete IndustryProduct record
|
description: Delete IndustryProduct record
|
||||||
|
@ -1012,6 +1193,10 @@ definitions:
|
||||||
description: ID of the Company that owns this Product
|
description: ID of the Company that owns this Product
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
AppExchange:
|
||||||
|
description: Salesforce AppExchange URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
CreatedByID:
|
CreatedByID:
|
||||||
description: Created By User ID
|
description: Created By User ID
|
||||||
type: string
|
type: string
|
||||||
|
@ -1104,6 +1289,108 @@ definitions:
|
||||||
Meta:
|
Meta:
|
||||||
$ref: "#/definitions/ResponseMeta"
|
$ref: "#/definitions/ResponseMeta"
|
||||||
type: object
|
type: object
|
||||||
|
CompanyService:
|
||||||
|
description: A service performed by a Company
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
|
AccountID:
|
||||||
|
description: ID of the Company that owns this Service
|
||||||
|
type: string
|
||||||
|
AppExchange:
|
||||||
|
description: Salesforce AppExchange URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedByID:
|
||||||
|
description: Created By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedDate:
|
||||||
|
description: Created Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Description:
|
||||||
|
description: Description of service
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
FullDescription:
|
||||||
|
description: Full Description of service
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ImageAltText:
|
||||||
|
description: Image Alt Text
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ImageURL:
|
||||||
|
description: Image URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Industries:
|
||||||
|
description: Industries
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/Industry"
|
||||||
|
type: array
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedByID:
|
||||||
|
description: Last Modified By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedDate:
|
||||||
|
description: Last Modified Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Logo:
|
||||||
|
description: Logo
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Name:
|
||||||
|
description: Service Name
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Published:
|
||||||
|
description: Published
|
||||||
|
type: boolean
|
||||||
|
x-nullable: true
|
||||||
|
SalesforceSpecific:
|
||||||
|
description: Salesforce Specific
|
||||||
|
type: boolean
|
||||||
|
x-nullable: true
|
||||||
|
ServiceVideoID:
|
||||||
|
description: Service Video ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Slug:
|
||||||
|
description: Slug
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
TagLine:
|
||||||
|
description: Tag Line
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
URL:
|
||||||
|
description: URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
type: object
|
||||||
|
CompanyServiceRequest:
|
||||||
|
description: An array of CompanyService objects submitted for processing
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
CompanyServiceResponse:
|
||||||
|
description: An array of CompanyService objects produced in response to a request
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
type: array
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
|
type: object
|
||||||
DeleteResponse:
|
DeleteResponse:
|
||||||
properties:
|
properties:
|
||||||
Data:
|
Data:
|
||||||
|
@ -1272,6 +1559,12 @@ definitions:
|
||||||
$ref: "#/definitions/CompanyProduct"
|
$ref: "#/definitions/CompanyProduct"
|
||||||
type: array
|
type: array
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
CompanyServices:
|
||||||
|
description: The list of Services in this industry
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
type: array
|
||||||
|
x-nullable: true
|
||||||
CreatedByID:
|
CreatedByID:
|
||||||
description: Created By User ID
|
description: Created By User ID
|
||||||
type: string
|
type: string
|
||||||
|
@ -1436,6 +1729,57 @@ definitions:
|
||||||
Meta:
|
Meta:
|
||||||
$ref: "#/definitions/ResponseMeta"
|
$ref: "#/definitions/ResponseMeta"
|
||||||
type: object
|
type: object
|
||||||
|
IndustryService:
|
||||||
|
description: Junction Object bewtwen Industry and CompanyService
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
|
CompanyService:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
CompanyServiceID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedByID:
|
||||||
|
description: Created By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedDate:
|
||||||
|
description: Created Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Industry:
|
||||||
|
$ref: "#/definitions/Industry"
|
||||||
|
IndustryID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedByID:
|
||||||
|
description: Last Modified By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedDate:
|
||||||
|
description: Last Modified Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
type: object
|
||||||
|
IndustryServiceRequest:
|
||||||
|
description: An array of IndustryService objects submitted for processing
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/IndustryService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
IndustryServiceResponse:
|
||||||
|
description: An array of IndustryService objects produced in response to a request
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/IndustryService"
|
||||||
|
type: array
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
|
type: object
|
||||||
IndustryRequest:
|
IndustryRequest:
|
||||||
description: An array of Industry objects submitted for processing
|
description: An array of Industry objects submitted for processing
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -100,6 +100,32 @@ parameters:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/AssetRequest"
|
$ref: "#/definitions/AssetRequest"
|
||||||
|
companyServiceIdQuery:
|
||||||
|
description: CompanyService record ID
|
||||||
|
in: query
|
||||||
|
name: companyServiceId
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
companyServiceRequest:
|
||||||
|
description: An array of new CompanyService records
|
||||||
|
in: body
|
||||||
|
name: companyServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/CompanyServiceRequest"
|
||||||
|
industryServiceIdQuery:
|
||||||
|
description: IndustryService record ID
|
||||||
|
in: query
|
||||||
|
name: industryServiceId
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
industryServiceRequest:
|
||||||
|
description: An array of new IndustryService records
|
||||||
|
in: body
|
||||||
|
name: industryServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/IndustryServiceRequest"
|
||||||
clusterIdQuery:
|
clusterIdQuery:
|
||||||
description: Record Id of a Cluster
|
description: Record Id of a Cluster
|
||||||
in: query
|
in: query
|
||||||
|
@ -304,6 +330,13 @@ parameters:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ResearchProjectProductRequest"
|
$ref: "#/definitions/ResearchProjectProductRequest"
|
||||||
|
ResearchProjectServiceRequest:
|
||||||
|
description: An array of new ResearchProjectService records
|
||||||
|
in: body
|
||||||
|
name: researchProjectServiceRequest
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/ResearchProjectServiceRequest"
|
||||||
ResearchProjectRequest:
|
ResearchProjectRequest:
|
||||||
description: An array of new ResearchProject records
|
description: An array of new ResearchProject records
|
||||||
in: body
|
in: body
|
||||||
|
@ -389,6 +422,10 @@ responses:
|
||||||
description: Response with an array of CompanyProduct objects
|
description: Response with an array of CompanyProduct objects
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/CompanyProductResponse"
|
$ref: "#/definitions/CompanyProductResponse"
|
||||||
|
CompanyServiceResponse:
|
||||||
|
description: Response with CompanyService objects
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/CompanyServiceResponse"
|
||||||
ContactResponse:
|
ContactResponse:
|
||||||
description: Response with Contact objects
|
description: Response with Contact objects
|
||||||
schema:
|
schema:
|
||||||
|
@ -437,6 +474,10 @@ responses:
|
||||||
description: Response with Industry objects
|
description: Response with Industry objects
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/IndustryResponse"
|
$ref: "#/definitions/IndustryResponse"
|
||||||
|
IndustryServiceResponse:
|
||||||
|
description: Response with IndustryService objects
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/IndustryServiceResponse"
|
||||||
InvalidDataError:
|
InvalidDataError:
|
||||||
description: Invalid data was sent
|
description: Invalid data was sent
|
||||||
schema:
|
schema:
|
||||||
|
@ -457,6 +498,10 @@ responses:
|
||||||
description: ResearchProjectProduct Response Object
|
description: ResearchProjectProduct Response Object
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ResearchProjectProductResponse"
|
$ref: "#/definitions/ResearchProjectProductResponse"
|
||||||
|
ResearchProjectServiceResponse:
|
||||||
|
description: ResearchProjectService Response Object
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/ResearchProjectServiceResponse"
|
||||||
ResearchProjectResponse:
|
ResearchProjectResponse:
|
||||||
description: ResearchProject Response Object
|
description: ResearchProject Response Object
|
||||||
schema:
|
schema:
|
||||||
|
@ -772,6 +817,56 @@ paths:
|
||||||
summary: Add a new companyproduct
|
summary: Add a new companyproduct
|
||||||
tags:
|
tags:
|
||||||
- CompanyProducts
|
- CompanyProducts
|
||||||
|
/companyservices:
|
||||||
|
get:
|
||||||
|
description: Return a list of all available CompanyServices
|
||||||
|
operationId: getCompanyServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/activeQuery"
|
||||||
|
- $ref: "#/parameters/companyServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/CompanyServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of companyservices
|
||||||
|
tags:
|
||||||
|
- CompanyServices
|
||||||
|
post:
|
||||||
|
description: Industry record to be added
|
||||||
|
operationId: postCompanyServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/companyServiceRequest"
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/SalesforcePostResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Add a new companyservice
|
||||||
|
tags:
|
||||||
|
- CompanyServices
|
||||||
/contacts:
|
/contacts:
|
||||||
delete:
|
delete:
|
||||||
description: Delete Contact record from Salesforce
|
description: Delete Contact record from Salesforce
|
||||||
|
@ -1510,6 +1605,56 @@ paths:
|
||||||
summary: Add a new IndustryCompany
|
summary: Add a new IndustryCompany
|
||||||
tags:
|
tags:
|
||||||
- IndustryCompanies
|
- IndustryCompanies
|
||||||
|
/industryservices:
|
||||||
|
get:
|
||||||
|
description: Return a list of all available IndustryServices
|
||||||
|
operationId: getIndustryServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
- $ref: "#/parameters/activeQuery"
|
||||||
|
- $ref: "#/parameters/industryServiceIdQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/IndustryServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of industryServices
|
||||||
|
tags:
|
||||||
|
- IndustryServices
|
||||||
|
post:
|
||||||
|
description: IndustryService record to be added
|
||||||
|
operationId: postIndustryServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/industryServiceRequest"
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/SalesforcePostResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Add a new IndustryService
|
||||||
|
tags:
|
||||||
|
- IndustryServices
|
||||||
/industryproducts:
|
/industryproducts:
|
||||||
get:
|
get:
|
||||||
description: Return a list of all available IndustryProducts
|
description: Return a list of all available IndustryProducts
|
||||||
|
@ -1682,6 +1827,71 @@ paths:
|
||||||
summary: Update ResearchProjectCompanies
|
summary: Update ResearchProjectCompanies
|
||||||
tags:
|
tags:
|
||||||
- ResearchProjects
|
- ResearchProjects
|
||||||
|
/researchprojectservices:
|
||||||
|
get:
|
||||||
|
description: Return a list of ResearchProjectService records from the datastore
|
||||||
|
operationId: getResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/idQuery"
|
||||||
|
- $ref: "#/parameters/limitQuery"
|
||||||
|
- $ref: "#/parameters/offsetQuery"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get a list of ResearchProjectServices
|
||||||
|
tags:
|
||||||
|
- ResearchProjects
|
||||||
|
post:
|
||||||
|
description: Create ResearchProjectServices in the system
|
||||||
|
operationId: postResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/ResearchProjectServiceRequest"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
|
"404":
|
||||||
|
$ref: "#/responses/NotFound"
|
||||||
|
"422":
|
||||||
|
$ref: "#/responses/UnprocessableEntity"
|
||||||
|
"500":
|
||||||
|
$ref: "#/responses/ServerError"
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Create new ResearchProjectServices
|
||||||
|
tags:
|
||||||
|
- ResearchProjects
|
||||||
|
put:
|
||||||
|
description: Update ResearchProjectService in the system
|
||||||
|
operationId: putResearchProjectServices
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/ResearchProjectServiceRequest"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"201":
|
||||||
|
$ref: "#/responses/ResearchProjectServiceResponse"
|
||||||
|
"401":
|
||||||
|
$ref: "#/responses/Unauthorized"
|
||||||
|
"403":
|
||||||
|
$ref: "#/responses/AccessForbidden"
|
||||||
/researchprojectproducts:
|
/researchprojectproducts:
|
||||||
get:
|
get:
|
||||||
description: Return a list of ResearchProjectProduct records from the datastore
|
description: Return a list of ResearchProjectProduct records from the datastore
|
||||||
|
@ -2823,6 +3033,108 @@ definitions:
|
||||||
meta:
|
meta:
|
||||||
$ref: "#/definitions/ResponseMeta"
|
$ref: "#/definitions/ResponseMeta"
|
||||||
type: object
|
type: object
|
||||||
|
CompanyService:
|
||||||
|
description: A service performed by a Company
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
|
AccountID:
|
||||||
|
description: ID of the Company that owns this Service
|
||||||
|
type: string
|
||||||
|
AppExchange:
|
||||||
|
description: Salesforce AppExchange URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedByID:
|
||||||
|
description: Created By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedDate:
|
||||||
|
description: Created Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Description:
|
||||||
|
description: Description of service
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
FullDescription:
|
||||||
|
description: Full Description of service
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ImageAltText:
|
||||||
|
description: Image Alt Text
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
ImageURL:
|
||||||
|
description: Image URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Industries:
|
||||||
|
description: Industries
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/Industry"
|
||||||
|
type: array
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedByID:
|
||||||
|
description: Last Modified By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedDate:
|
||||||
|
description: Last Modified Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Logo:
|
||||||
|
description: Logo
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Name:
|
||||||
|
description: Service Name
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Published:
|
||||||
|
description: Published
|
||||||
|
type: boolean
|
||||||
|
x-nullable: true
|
||||||
|
SalesforceSpecific:
|
||||||
|
description: Salesforce Specific
|
||||||
|
type: boolean
|
||||||
|
x-nullable: true
|
||||||
|
ServiceVideoID:
|
||||||
|
description: Service Video ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Slug:
|
||||||
|
description: Slug
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
TagLine:
|
||||||
|
description: Tag Line
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
URL:
|
||||||
|
description: URL
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
type: object
|
||||||
|
CompanyServiceRequest:
|
||||||
|
description: An array of CompanyService objects submitted for processing
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
CompanyServiceResponse:
|
||||||
|
description: An array of CompanyService objects produced in response to a request
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
type: array
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
|
type: object
|
||||||
Contact:
|
Contact:
|
||||||
properties:
|
properties:
|
||||||
AccountID:
|
AccountID:
|
||||||
|
@ -3590,6 +3902,57 @@ definitions:
|
||||||
Meta:
|
Meta:
|
||||||
$ref: "#/definitions/ResponseMeta"
|
$ref: "#/definitions/ResponseMeta"
|
||||||
type: object
|
type: object
|
||||||
|
IndustryService:
|
||||||
|
description: Junction Object bewtwen Industry and CompanyService
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
description: Record Id
|
||||||
|
type: string
|
||||||
|
CompanyService:
|
||||||
|
$ref: "#/definitions/CompanyService"
|
||||||
|
CompanyServiceID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedByID:
|
||||||
|
description: Created By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
CreatedDate:
|
||||||
|
description: Created Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
Industry:
|
||||||
|
$ref: "#/definitions/Industry"
|
||||||
|
IndustryID:
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedByID:
|
||||||
|
description: Last Modified By User ID
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
LastModifiedDate:
|
||||||
|
description: Last Modified Date
|
||||||
|
type: string
|
||||||
|
x-nullable: true
|
||||||
|
type: object
|
||||||
|
IndustryServiceRequest:
|
||||||
|
description: An array of IndustryService objects submitted for processing
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/IndustryService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
IndustryServiceResponse:
|
||||||
|
description: An array of IndustryService objects produced in response to a request
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/IndustryService"
|
||||||
|
type: array
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
|
type: object
|
||||||
IndustryRequest:
|
IndustryRequest:
|
||||||
description: An array of Industry objects submitted for processing
|
description: An array of Industry objects submitted for processing
|
||||||
properties:
|
properties:
|
||||||
|
@ -4538,3 +4901,21 @@ definitions:
|
||||||
$ref: "../../lib/swagger/defs/research-project-company.yaml#/ResearchProjectCompany"
|
$ref: "../../lib/swagger/defs/research-project-company.yaml#/ResearchProjectCompany"
|
||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
|
ResearchProjectServiceRequest:
|
||||||
|
description: An array of ResearchProjectService objects
|
||||||
|
properties:
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "../../lib/swagger/defs/research-project-service.yaml#/ResearchProjectService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
ResearchProjectServiceResponse:
|
||||||
|
description: An array of ResearchProjectService objects
|
||||||
|
properties:
|
||||||
|
Meta:
|
||||||
|
$ref: "../../lib/swagger/defs/response-meta.yaml#/ResponseMeta"
|
||||||
|
Data:
|
||||||
|
items:
|
||||||
|
$ref: "../../lib/swagger/defs/research-project-service.yaml#/ResearchProjectService"
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
|
Loading…
Reference in New Issue