mirror of https://github.com/vernonkeenan/lib
parent
b37836a8f2
commit
6f803abd96
|
@ -92,12 +92,6 @@ type GetCompanyProductsParams struct {
|
||||||
*/
|
*/
|
||||||
Limit *int64
|
Limit *int64
|
||||||
|
|
||||||
/* Name.
|
|
||||||
|
|
||||||
The Name of this Object
|
|
||||||
*/
|
|
||||||
Name *string
|
|
||||||
|
|
||||||
/* Offset.
|
/* Offset.
|
||||||
|
|
||||||
How many objects to skip?
|
How many objects to skip?
|
||||||
|
@ -106,6 +100,12 @@ type GetCompanyProductsParams struct {
|
||||||
*/
|
*/
|
||||||
Offset *int64
|
Offset *int64
|
||||||
|
|
||||||
|
/* Slug.
|
||||||
|
|
||||||
|
The Slug of this Object
|
||||||
|
*/
|
||||||
|
Slug *string
|
||||||
|
|
||||||
timeout time.Duration
|
timeout time.Duration
|
||||||
Context context.Context
|
Context context.Context
|
||||||
HTTPClient *http.Client
|
HTTPClient *http.Client
|
||||||
|
@ -203,17 +203,6 @@ func (o *GetCompanyProductsParams) SetLimit(limit *int64) {
|
||||||
o.Limit = limit
|
o.Limit = limit
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithName adds the name to the get company products params
|
|
||||||
func (o *GetCompanyProductsParams) WithName(name *string) *GetCompanyProductsParams {
|
|
||||||
o.SetName(name)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetName adds the name to the get company products params
|
|
||||||
func (o *GetCompanyProductsParams) SetName(name *string) {
|
|
||||||
o.Name = name
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOffset adds the offset to the get company products params
|
// WithOffset adds the offset to the get company products params
|
||||||
func (o *GetCompanyProductsParams) WithOffset(offset *int64) *GetCompanyProductsParams {
|
func (o *GetCompanyProductsParams) WithOffset(offset *int64) *GetCompanyProductsParams {
|
||||||
o.SetOffset(offset)
|
o.SetOffset(offset)
|
||||||
|
@ -225,6 +214,17 @@ func (o *GetCompanyProductsParams) SetOffset(offset *int64) {
|
||||||
o.Offset = offset
|
o.Offset = offset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithSlug adds the slug to the get company products params
|
||||||
|
func (o *GetCompanyProductsParams) WithSlug(slug *string) *GetCompanyProductsParams {
|
||||||
|
o.SetSlug(slug)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSlug adds the slug to the get company products params
|
||||||
|
func (o *GetCompanyProductsParams) SetSlug(slug *string) {
|
||||||
|
o.Slug = slug
|
||||||
|
}
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
// WriteToRequest writes these params to a swagger request
|
||||||
func (o *GetCompanyProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
func (o *GetCompanyProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
@ -301,23 +301,6 @@ func (o *GetCompanyProductsParams) WriteToRequest(r runtime.ClientRequest, reg s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if o.Name != nil {
|
|
||||||
|
|
||||||
// query param name
|
|
||||||
var qrName string
|
|
||||||
|
|
||||||
if o.Name != nil {
|
|
||||||
qrName = *o.Name
|
|
||||||
}
|
|
||||||
qName := qrName
|
|
||||||
if qName != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("name", qName); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if o.Offset != nil {
|
if o.Offset != nil {
|
||||||
|
|
||||||
// query param offset
|
// query param offset
|
||||||
|
@ -335,6 +318,23 @@ func (o *GetCompanyProductsParams) WriteToRequest(r runtime.ClientRequest, reg s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 {
|
if len(res) > 0 {
|
||||||
return errors.CompositeValidationError(res...)
|
return errors.CompositeValidationError(res...)
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,12 +80,6 @@ type GetIndustriesParams struct {
|
||||||
*/
|
*/
|
||||||
Limit *int64
|
Limit *int64
|
||||||
|
|
||||||
/* Name.
|
|
||||||
|
|
||||||
The Name of this Object
|
|
||||||
*/
|
|
||||||
Name *string
|
|
||||||
|
|
||||||
/* Offset.
|
/* Offset.
|
||||||
|
|
||||||
How many objects to skip?
|
How many objects to skip?
|
||||||
|
@ -94,6 +88,18 @@ type GetIndustriesParams struct {
|
||||||
*/
|
*/
|
||||||
Offset *int64
|
Offset *int64
|
||||||
|
|
||||||
|
/* ProductCategory.
|
||||||
|
|
||||||
|
Is this industry a product category?
|
||||||
|
*/
|
||||||
|
ProductCategory *bool
|
||||||
|
|
||||||
|
/* Slug.
|
||||||
|
|
||||||
|
The Slug of this Object
|
||||||
|
*/
|
||||||
|
Slug *string
|
||||||
|
|
||||||
timeout time.Duration
|
timeout time.Duration
|
||||||
Context context.Context
|
Context context.Context
|
||||||
HTTPClient *http.Client
|
HTTPClient *http.Client
|
||||||
|
@ -169,17 +175,6 @@ func (o *GetIndustriesParams) SetLimit(limit *int64) {
|
||||||
o.Limit = limit
|
o.Limit = limit
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithName adds the name to the get industries params
|
|
||||||
func (o *GetIndustriesParams) WithName(name *string) *GetIndustriesParams {
|
|
||||||
o.SetName(name)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetName adds the name to the get industries params
|
|
||||||
func (o *GetIndustriesParams) SetName(name *string) {
|
|
||||||
o.Name = name
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOffset adds the offset to the get industries params
|
// WithOffset adds the offset to the get industries params
|
||||||
func (o *GetIndustriesParams) WithOffset(offset *int64) *GetIndustriesParams {
|
func (o *GetIndustriesParams) WithOffset(offset *int64) *GetIndustriesParams {
|
||||||
o.SetOffset(offset)
|
o.SetOffset(offset)
|
||||||
|
@ -191,6 +186,28 @@ func (o *GetIndustriesParams) SetOffset(offset *int64) {
|
||||||
o.Offset = offset
|
o.Offset = offset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithProductCategory adds the productCategory to the get industries params
|
||||||
|
func (o *GetIndustriesParams) WithProductCategory(productCategory *bool) *GetIndustriesParams {
|
||||||
|
o.SetProductCategory(productCategory)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetProductCategory adds the productCategory to the get industries params
|
||||||
|
func (o *GetIndustriesParams) SetProductCategory(productCategory *bool) {
|
||||||
|
o.ProductCategory = productCategory
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithSlug adds the slug to the get industries params
|
||||||
|
func (o *GetIndustriesParams) WithSlug(slug *string) *GetIndustriesParams {
|
||||||
|
o.SetSlug(slug)
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSlug adds the slug to the get industries params
|
||||||
|
func (o *GetIndustriesParams) SetSlug(slug *string) {
|
||||||
|
o.Slug = slug
|
||||||
|
}
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
// WriteToRequest writes these params to a swagger request
|
||||||
func (o *GetIndustriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
func (o *GetIndustriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||||
|
|
||||||
|
@ -233,23 +250,6 @@ func (o *GetIndustriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if o.Name != nil {
|
|
||||||
|
|
||||||
// query param name
|
|
||||||
var qrName string
|
|
||||||
|
|
||||||
if o.Name != nil {
|
|
||||||
qrName = *o.Name
|
|
||||||
}
|
|
||||||
qName := qrName
|
|
||||||
if qName != "" {
|
|
||||||
|
|
||||||
if err := r.SetQueryParam("name", qName); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if o.Offset != nil {
|
if o.Offset != nil {
|
||||||
|
|
||||||
// query param offset
|
// query param offset
|
||||||
|
@ -267,6 +267,40 @@ func (o *GetIndustriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if o.ProductCategory != nil {
|
||||||
|
|
||||||
|
// query param productCategory
|
||||||
|
var qrProductCategory bool
|
||||||
|
|
||||||
|
if o.ProductCategory != nil {
|
||||||
|
qrProductCategory = *o.ProductCategory
|
||||||
|
}
|
||||||
|
qProductCategory := swag.FormatBool(qrProductCategory)
|
||||||
|
if qProductCategory != "" {
|
||||||
|
|
||||||
|
if err := r.SetQueryParam("productCategory", qProductCategory); 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 {
|
if len(res) > 0 {
|
||||||
return errors.CompositeValidationError(res...)
|
return errors.CompositeValidationError(res...)
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,6 +65,9 @@ type Industry struct {
|
||||||
// The full path of this industry, including Parent
|
// The full path of this industry, including Parent
|
||||||
Path string `json:"Path,omitempty"`
|
Path string `json:"Path,omitempty"`
|
||||||
|
|
||||||
|
// Is this industry a product category?
|
||||||
|
ProductCategory bool `json:"ProductCategory,omitempty"`
|
||||||
|
|
||||||
// The CMS Slug for this Industry
|
// The CMS Slug for this Industry
|
||||||
Slug string `json:"Slug,omitempty"`
|
Slug string `json:"Slug,omitempty"`
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,12 @@ parameters:
|
||||||
name: industryId
|
name: industryId
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
productCategoryQuery:
|
||||||
|
description: Is this industry a product category?
|
||||||
|
in: query
|
||||||
|
name: productCategory
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
industryProductIdQuery:
|
industryProductIdQuery:
|
||||||
description: IndustryProduct record ID
|
description: IndustryProduct record ID
|
||||||
in: query
|
in: query
|
||||||
|
@ -143,6 +149,12 @@ parameters:
|
||||||
name: name
|
name: name
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
slugQuery:
|
||||||
|
description: The Slug of this Object
|
||||||
|
in: query
|
||||||
|
name: slug
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
observationIdQuery:
|
observationIdQuery:
|
||||||
description: Observation record ID
|
description: Observation record ID
|
||||||
in: query
|
in: query
|
||||||
|
@ -303,7 +315,7 @@ paths:
|
||||||
operationId: getCompanyProducts
|
operationId: getCompanyProducts
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/parameters/limitQuery"
|
- $ref: "#/parameters/limitQuery"
|
||||||
- $ref: "#/parameters/nameQuery"
|
- $ref: "#/parameters/slugQuery"
|
||||||
- $ref: "#/parameters/offsetQuery"
|
- $ref: "#/parameters/offsetQuery"
|
||||||
- $ref: "#/parameters/activeQuery"
|
- $ref: "#/parameters/activeQuery"
|
||||||
- $ref: "#/parameters/accountIdQuery"
|
- $ref: "#/parameters/accountIdQuery"
|
||||||
|
@ -572,9 +584,10 @@ paths:
|
||||||
operationId: getIndustries
|
operationId: getIndustries
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/parameters/limitQuery"
|
- $ref: "#/parameters/limitQuery"
|
||||||
- $ref: "#/parameters/nameQuery"
|
- $ref: "#/parameters/slugQuery"
|
||||||
- $ref: "#/parameters/offsetQuery"
|
- $ref: "#/parameters/offsetQuery"
|
||||||
- $ref: "#/parameters/industryIdQuery"
|
- $ref: "#/parameters/industryIdQuery"
|
||||||
|
- $ref: "#/parameters/productCategoryQuery"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
$ref: "#/responses/IndustryResponse"
|
$ref: "#/responses/IndustryResponse"
|
||||||
|
@ -1203,6 +1216,9 @@ definitions:
|
||||||
Path:
|
Path:
|
||||||
description: The full path of this industry, including Parent
|
description: The full path of this industry, including Parent
|
||||||
type: string
|
type: string
|
||||||
|
ProductCategory:
|
||||||
|
description: Is this industry a product category?
|
||||||
|
type: boolean
|
||||||
Slug:
|
Slug:
|
||||||
description: The CMS Slug for this Industry
|
description: The CMS Slug for this Industry
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -104,6 +104,12 @@ parameters:
|
||||||
name: industryId
|
name: industryId
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
productCategoryQuery:
|
||||||
|
description: Is this industry a product category?
|
||||||
|
in: query
|
||||||
|
name: productCategory
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
industryProductIdQuery:
|
industryProductIdQuery:
|
||||||
description: IndustryProduct record ID
|
description: IndustryProduct record ID
|
||||||
in: query
|
in: query
|
||||||
|
@ -143,6 +149,12 @@ parameters:
|
||||||
name: name
|
name: name
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
slugQuery:
|
||||||
|
description: The Slug of this Object
|
||||||
|
in: query
|
||||||
|
name: slug
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
observationIdQuery:
|
observationIdQuery:
|
||||||
description: Observation record ID
|
description: Observation record ID
|
||||||
in: query
|
in: query
|
||||||
|
@ -303,7 +315,7 @@ paths:
|
||||||
operationId: getCompanyProducts
|
operationId: getCompanyProducts
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/parameters/limitQuery"
|
- $ref: "#/parameters/limitQuery"
|
||||||
- $ref: "#/parameters/nameQuery"
|
- $ref: "#/parameters/slugQuery"
|
||||||
- $ref: "#/parameters/offsetQuery"
|
- $ref: "#/parameters/offsetQuery"
|
||||||
- $ref: "#/parameters/activeQuery"
|
- $ref: "#/parameters/activeQuery"
|
||||||
- $ref: "#/parameters/accountIdQuery"
|
- $ref: "#/parameters/accountIdQuery"
|
||||||
|
@ -572,9 +584,10 @@ paths:
|
||||||
operationId: getIndustries
|
operationId: getIndustries
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/parameters/limitQuery"
|
- $ref: "#/parameters/limitQuery"
|
||||||
- $ref: "#/parameters/nameQuery"
|
- $ref: "#/parameters/slugQuery"
|
||||||
- $ref: "#/parameters/offsetQuery"
|
- $ref: "#/parameters/offsetQuery"
|
||||||
- $ref: "#/parameters/industryIdQuery"
|
- $ref: "#/parameters/industryIdQuery"
|
||||||
|
- $ref: "#/parameters/productCategoryQuery"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
$ref: "#/responses/IndustryResponse"
|
$ref: "#/responses/IndustryResponse"
|
||||||
|
@ -1203,6 +1216,9 @@ definitions:
|
||||||
Path:
|
Path:
|
||||||
description: The full path of this industry, including Parent
|
description: The full path of this industry, including Parent
|
||||||
type: string
|
type: string
|
||||||
|
ProductCategory:
|
||||||
|
description: Is this industry a product category?
|
||||||
|
type: boolean
|
||||||
Slug:
|
Slug:
|
||||||
description: The CMS Slug for this Industry
|
description: The CMS Slug for this Industry
|
||||||
type: string
|
type: string
|
||||||
|
|
Loading…
Reference in New Issue