// 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" ) // NewDeleteSubscriptionconfigParams creates a new DeleteSubscriptionconfigParams 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 NewDeleteSubscriptionconfigParams() *DeleteSubscriptionconfigParams { return &DeleteSubscriptionconfigParams{ timeout: cr.DefaultTimeout, } } // NewDeleteSubscriptionconfigParamsWithTimeout creates a new DeleteSubscriptionconfigParams object // with the ability to set a timeout on a request. func NewDeleteSubscriptionconfigParamsWithTimeout(timeout time.Duration) *DeleteSubscriptionconfigParams { return &DeleteSubscriptionconfigParams{ timeout: timeout, } } // NewDeleteSubscriptionconfigParamsWithContext creates a new DeleteSubscriptionconfigParams object // with the ability to set a context for a request. func NewDeleteSubscriptionconfigParamsWithContext(ctx context.Context) *DeleteSubscriptionconfigParams { return &DeleteSubscriptionconfigParams{ Context: ctx, } } // NewDeleteSubscriptionconfigParamsWithHTTPClient creates a new DeleteSubscriptionconfigParams object // with the ability to set a custom HTTPClient for a request. func NewDeleteSubscriptionconfigParamsWithHTTPClient(client *http.Client) *DeleteSubscriptionconfigParams { return &DeleteSubscriptionconfigParams{ HTTPClient: client, } } /* DeleteSubscriptionconfigParams contains all the parameters to send to the API endpoint for the delete subscriptionconfig operation. Typically these are written to a http.Request. */ type DeleteSubscriptionconfigParams struct { /* Ecu. ECU name */ Ecu string /* FeatureID. Subscription feature id */ FeatureID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the delete subscriptionconfig params (not the query body). // // All values with no default are reset to their zero value. func (o *DeleteSubscriptionconfigParams) WithDefaults() *DeleteSubscriptionconfigParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the delete subscriptionconfig params (not the query body). // // All values with no default are reset to their zero value. func (o *DeleteSubscriptionconfigParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the delete subscriptionconfig params func (o *DeleteSubscriptionconfigParams) WithTimeout(timeout time.Duration) *DeleteSubscriptionconfigParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the delete subscriptionconfig params func (o *DeleteSubscriptionconfigParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the delete subscriptionconfig params func (o *DeleteSubscriptionconfigParams) WithContext(ctx context.Context) *DeleteSubscriptionconfigParams { o.SetContext(ctx) return o } // SetContext adds the context to the delete subscriptionconfig params func (o *DeleteSubscriptionconfigParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the delete subscriptionconfig params func (o *DeleteSubscriptionconfigParams) WithHTTPClient(client *http.Client) *DeleteSubscriptionconfigParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the delete subscriptionconfig params func (o *DeleteSubscriptionconfigParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithEcu adds the ecu to the delete subscriptionconfig params func (o *DeleteSubscriptionconfigParams) WithEcu(ecu string) *DeleteSubscriptionconfigParams { o.SetEcu(ecu) return o } // SetEcu adds the ecu to the delete subscriptionconfig params func (o *DeleteSubscriptionconfigParams) SetEcu(ecu string) { o.Ecu = ecu } // WithFeatureID adds the featureID to the delete subscriptionconfig params func (o *DeleteSubscriptionconfigParams) WithFeatureID(featureID string) *DeleteSubscriptionconfigParams { o.SetFeatureID(featureID) return o } // SetFeatureID adds the featureId to the delete subscriptionconfig params func (o *DeleteSubscriptionconfigParams) SetFeatureID(featureID string) { o.FeatureID = featureID } // WriteToRequest writes these params to a swagger request func (o *DeleteSubscriptionconfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // query param ecu qrEcu := o.Ecu qEcu := qrEcu if qEcu != "" { if err := r.SetQueryParam("ecu", qEcu); err != nil { return err } } // query param feature_id qrFeatureID := o.FeatureID qFeatureID := qrFeatureID if qFeatureID != "" { if err := r.SetQueryParam("feature_id", qFeatureID); err != nil { return err } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }