1 // Code generated by go-swagger; DO NOT EDIT.
5 // This file was generated by the swagger tool.
6 // Editing this file might prove futile when you re-run the swagger generate command
13 "github.com/go-openapi/errors"
14 "github.com/go-openapi/runtime"
15 cr "github.com/go-openapi/runtime/client"
16 "github.com/go-openapi/strfmt"
19 // NewUnsubscribeParams creates a new UnsubscribeParams object
20 // with the default values initialized.
21 func NewUnsubscribeParams() *UnsubscribeParams {
23 return &UnsubscribeParams{
25 timeout: cr.DefaultTimeout,
29 // NewUnsubscribeParamsWithTimeout creates a new UnsubscribeParams object
30 // with the default values initialized, and the ability to set a timeout on a request
31 func NewUnsubscribeParamsWithTimeout(timeout time.Duration) *UnsubscribeParams {
33 return &UnsubscribeParams{
39 // NewUnsubscribeParamsWithContext creates a new UnsubscribeParams object
40 // with the default values initialized, and the ability to set a context for a request
41 func NewUnsubscribeParamsWithContext(ctx context.Context) *UnsubscribeParams {
43 return &UnsubscribeParams{
49 // NewUnsubscribeParamsWithHTTPClient creates a new UnsubscribeParams object
50 // with the default values initialized, and the ability to set a custom HTTPClient for a request
51 func NewUnsubscribeParamsWithHTTPClient(client *http.Client) *UnsubscribeParams {
53 return &UnsubscribeParams{
58 /*UnsubscribeParams contains all the parameters to send to the API endpoint
59 for the unsubscribe operation typically these are written to a http.Request
61 type UnsubscribeParams struct {
64 The subscriptionId received in the Subscription Response
70 Context context.Context
71 HTTPClient *http.Client
74 // WithTimeout adds the timeout to the unsubscribe params
75 func (o *UnsubscribeParams) WithTimeout(timeout time.Duration) *UnsubscribeParams {
80 // SetTimeout adds the timeout to the unsubscribe params
81 func (o *UnsubscribeParams) SetTimeout(timeout time.Duration) {
85 // WithContext adds the context to the unsubscribe params
86 func (o *UnsubscribeParams) WithContext(ctx context.Context) *UnsubscribeParams {
91 // SetContext adds the context to the unsubscribe params
92 func (o *UnsubscribeParams) SetContext(ctx context.Context) {
96 // WithHTTPClient adds the HTTPClient to the unsubscribe params
97 func (o *UnsubscribeParams) WithHTTPClient(client *http.Client) *UnsubscribeParams {
98 o.SetHTTPClient(client)
102 // SetHTTPClient adds the HTTPClient to the unsubscribe params
103 func (o *UnsubscribeParams) SetHTTPClient(client *http.Client) {
104 o.HTTPClient = client
107 // WithSubscriptionID adds the subscriptionID to the unsubscribe params
108 func (o *UnsubscribeParams) WithSubscriptionID(subscriptionID string) *UnsubscribeParams {
109 o.SetSubscriptionID(subscriptionID)
113 // SetSubscriptionID adds the subscriptionId to the unsubscribe params
114 func (o *UnsubscribeParams) SetSubscriptionID(subscriptionID string) {
115 o.SubscriptionID = subscriptionID
118 // WriteToRequest writes these params to a swagger request
119 func (o *UnsubscribeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
121 if err := r.SetTimeout(o.timeout); err != nil {
126 // path param subscriptionId
127 if err := r.SetPathParam("subscriptionId", o.SubscriptionID); err != nil {
132 return errors.CompositeValidationError(res...)