Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
@@ -0,0 +1,300 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
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"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewGetSubscriptionfeaturesParams creates a new GetSubscriptionfeaturesParams 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 NewGetSubscriptionfeaturesParams() *GetSubscriptionfeaturesParams {
|
||||
return &GetSubscriptionfeaturesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetSubscriptionfeaturesParamsWithTimeout creates a new GetSubscriptionfeaturesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetSubscriptionfeaturesParamsWithTimeout(timeout time.Duration) *GetSubscriptionfeaturesParams {
|
||||
return &GetSubscriptionfeaturesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetSubscriptionfeaturesParamsWithContext creates a new GetSubscriptionfeaturesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetSubscriptionfeaturesParamsWithContext(ctx context.Context) *GetSubscriptionfeaturesParams {
|
||||
return &GetSubscriptionfeaturesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetSubscriptionfeaturesParamsWithHTTPClient creates a new GetSubscriptionfeaturesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetSubscriptionfeaturesParamsWithHTTPClient(client *http.Client) *GetSubscriptionfeaturesParams {
|
||||
return &GetSubscriptionfeaturesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
GetSubscriptionfeaturesParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the get subscriptionfeatures operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetSubscriptionfeaturesParams struct {
|
||||
|
||||
/* Description.
|
||||
|
||||
Subscription feature description
|
||||
*/
|
||||
Description *string
|
||||
|
||||
/* ID.
|
||||
|
||||
Subscription feature id
|
||||
*/
|
||||
ID *string
|
||||
|
||||
/* Limit.
|
||||
|
||||
Max number of records
|
||||
*/
|
||||
Limit *int64
|
||||
|
||||
/* Name.
|
||||
|
||||
Subscription feature name
|
||||
*/
|
||||
Name *string
|
||||
|
||||
/* Offset.
|
||||
|
||||
Records offset
|
||||
*/
|
||||
Offset *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get subscriptionfeatures params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetSubscriptionfeaturesParams) WithDefaults() *GetSubscriptionfeaturesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get subscriptionfeatures params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetSubscriptionfeaturesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) WithTimeout(timeout time.Duration) *GetSubscriptionfeaturesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) WithContext(ctx context.Context) *GetSubscriptionfeaturesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) WithHTTPClient(client *http.Client) *GetSubscriptionfeaturesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithDescription adds the description to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) WithDescription(description *string) *GetSubscriptionfeaturesParams {
|
||||
o.SetDescription(description)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDescription adds the description to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) SetDescription(description *string) {
|
||||
o.Description = description
|
||||
}
|
||||
|
||||
// WithID adds the id to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) WithID(id *string) *GetSubscriptionfeaturesParams {
|
||||
o.SetID(id)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetID adds the id to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) SetID(id *string) {
|
||||
o.ID = id
|
||||
}
|
||||
|
||||
// WithLimit adds the limit to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) WithLimit(limit *int64) *GetSubscriptionfeaturesParams {
|
||||
o.SetLimit(limit)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetLimit adds the limit to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) SetLimit(limit *int64) {
|
||||
o.Limit = limit
|
||||
}
|
||||
|
||||
// WithName adds the name to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) WithName(name *string) *GetSubscriptionfeaturesParams {
|
||||
o.SetName(name)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetName adds the name to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) SetName(name *string) {
|
||||
o.Name = name
|
||||
}
|
||||
|
||||
// WithOffset adds the offset to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) WithOffset(offset *int64) *GetSubscriptionfeaturesParams {
|
||||
o.SetOffset(offset)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetOffset adds the offset to the get subscriptionfeatures params
|
||||
func (o *GetSubscriptionfeaturesParams) SetOffset(offset *int64) {
|
||||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetSubscriptionfeaturesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if o.Description != nil {
|
||||
|
||||
// query param description
|
||||
var qrDescription string
|
||||
|
||||
if o.Description != nil {
|
||||
qrDescription = *o.Description
|
||||
}
|
||||
qDescription := qrDescription
|
||||
if qDescription != "" {
|
||||
|
||||
if err := r.SetQueryParam("description", qDescription); 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.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 {
|
||||
|
||||
// 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
|
||||
}
|
||||
Reference in New Issue
Block a user