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"
17 strfmt "github.com/go-openapi/strfmt"
20 // NewUnsubscribeParams creates a new UnsubscribeParams object
21 // with the default values initialized.
22 func NewUnsubscribeParams() *UnsubscribeParams {
24 return &UnsubscribeParams{
26 timeout: cr.DefaultTimeout,
30 // NewUnsubscribeParamsWithTimeout creates a new UnsubscribeParams object
31 // with the default values initialized, and the ability to set a timeout on a request
32 func NewUnsubscribeParamsWithTimeout(timeout time.Duration) *UnsubscribeParams {
34 return &UnsubscribeParams{
40 // NewUnsubscribeParamsWithContext creates a new UnsubscribeParams object
41 // with the default values initialized, and the ability to set a context for a request
42 func NewUnsubscribeParamsWithContext(ctx context.Context) *UnsubscribeParams {
44 return &UnsubscribeParams{
50 // NewUnsubscribeParamsWithHTTPClient creates a new UnsubscribeParams object
51 // with the default values initialized, and the ability to set a custom HTTPClient for a request
52 func NewUnsubscribeParamsWithHTTPClient(client *http.Client) *UnsubscribeParams {
54 return &UnsubscribeParams{
59 /*UnsubscribeParams contains all the parameters to send to the API endpoint
60 for the unsubscribe operation typically these are written to a http.Request
62 type UnsubscribeParams struct {
65 The subscriptionId received in the Subscription Response
71 Context context.Context
72 HTTPClient *http.Client
75 // WithTimeout adds the timeout to the unsubscribe params
76 func (o *UnsubscribeParams) WithTimeout(timeout time.Duration) *UnsubscribeParams {
81 // SetTimeout adds the timeout to the unsubscribe params
82 func (o *UnsubscribeParams) SetTimeout(timeout time.Duration) {
86 // WithContext adds the context to the unsubscribe params
87 func (o *UnsubscribeParams) WithContext(ctx context.Context) *UnsubscribeParams {
92 // SetContext adds the context to the unsubscribe params
93 func (o *UnsubscribeParams) SetContext(ctx context.Context) {
97 // WithHTTPClient adds the HTTPClient to the unsubscribe params
98 func (o *UnsubscribeParams) WithHTTPClient(client *http.Client) *UnsubscribeParams {
99 o.SetHTTPClient(client)
103 // SetHTTPClient adds the HTTPClient to the unsubscribe params
104 func (o *UnsubscribeParams) SetHTTPClient(client *http.Client) {
105 o.HTTPClient = client
108 // WithSubscriptionID adds the subscriptionID to the unsubscribe params
109 func (o *UnsubscribeParams) WithSubscriptionID(subscriptionID string) *UnsubscribeParams {
110 o.SetSubscriptionID(subscriptionID)
114 // SetSubscriptionID adds the subscriptionId to the unsubscribe params
115 func (o *UnsubscribeParams) SetSubscriptionID(subscriptionID string) {
116 o.SubscriptionID = subscriptionID
119 // WriteToRequest writes these params to a swagger request
120 func (o *UnsubscribeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
122 if err := r.SetTimeout(o.timeout); err != nil {
127 // path param subscriptionId
128 if err := r.SetPathParam("subscriptionId", o.SubscriptionID); err != nil {
133 return errors.CompositeValidationError(res...)