github.com/sap/cf-mta-plugin@v2.6.3+incompatible/clients/mtaclient/operations/get_operation_actions_parameters.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package operations
     4  
     5  // This file was generated by the swagger tool.
     6  // Editing this file might prove futile when you re-run the swagger generate command
     7  
     8  import (
     9  	"net/http"
    10  	"time"
    11  
    12  	"golang.org/x/net/context"
    13  
    14  	"github.com/go-openapi/errors"
    15  	"github.com/go-openapi/runtime"
    16  	cr "github.com/go-openapi/runtime/client"
    17  
    18  	strfmt "github.com/go-openapi/strfmt"
    19  )
    20  
    21  // NewGetOperationActionsParams creates a new GetOperationActionsParams object
    22  // with the default values initialized.
    23  func NewGetOperationActionsParams() *GetOperationActionsParams {
    24  	var ()
    25  	return &GetOperationActionsParams{
    26  
    27  		timeout: cr.DefaultTimeout,
    28  	}
    29  }
    30  
    31  // NewGetOperationActionsParamsWithTimeout creates a new GetOperationActionsParams object
    32  // with the default values initialized, and the ability to set a timeout on a request
    33  func NewGetOperationActionsParamsWithTimeout(timeout time.Duration) *GetOperationActionsParams {
    34  	var ()
    35  	return &GetOperationActionsParams{
    36  
    37  		timeout: timeout,
    38  	}
    39  }
    40  
    41  // NewGetOperationActionsParamsWithContext creates a new GetOperationActionsParams object
    42  // with the default values initialized, and the ability to set a context for a request
    43  func NewGetOperationActionsParamsWithContext(ctx context.Context) *GetOperationActionsParams {
    44  	var ()
    45  	return &GetOperationActionsParams{
    46  
    47  		Context: ctx,
    48  	}
    49  }
    50  
    51  // NewGetOperationActionsParamsWithHTTPClient creates a new GetOperationActionsParams object
    52  // with the default values initialized, and the ability to set a custom HTTPClient for a request
    53  func NewGetOperationActionsParamsWithHTTPClient(client *http.Client) *GetOperationActionsParams {
    54  	var ()
    55  	return &GetOperationActionsParams{
    56  		HTTPClient: client,
    57  	}
    58  }
    59  
    60  /*GetOperationActionsParams contains all the parameters to send to the API endpoint
    61  for the get operation actions operation typically these are written to a http.Request
    62  */
    63  type GetOperationActionsParams struct {
    64  
    65  	/*OperationID*/
    66  	OperationID string
    67  
    68  	timeout    time.Duration
    69  	Context    context.Context
    70  	HTTPClient *http.Client
    71  }
    72  
    73  // WithTimeout adds the timeout to the get operation actions params
    74  func (o *GetOperationActionsParams) WithTimeout(timeout time.Duration) *GetOperationActionsParams {
    75  	o.SetTimeout(timeout)
    76  	return o
    77  }
    78  
    79  // SetTimeout adds the timeout to the get operation actions params
    80  func (o *GetOperationActionsParams) SetTimeout(timeout time.Duration) {
    81  	o.timeout = timeout
    82  }
    83  
    84  // WithContext adds the context to the get operation actions params
    85  func (o *GetOperationActionsParams) WithContext(ctx context.Context) *GetOperationActionsParams {
    86  	o.SetContext(ctx)
    87  	return o
    88  }
    89  
    90  // SetContext adds the context to the get operation actions params
    91  func (o *GetOperationActionsParams) SetContext(ctx context.Context) {
    92  	o.Context = ctx
    93  }
    94  
    95  // WithHTTPClient adds the HTTPClient to the get operation actions params
    96  func (o *GetOperationActionsParams) WithHTTPClient(client *http.Client) *GetOperationActionsParams {
    97  	o.SetHTTPClient(client)
    98  	return o
    99  }
   100  
   101  // SetHTTPClient adds the HTTPClient to the get operation actions params
   102  func (o *GetOperationActionsParams) SetHTTPClient(client *http.Client) {
   103  	o.HTTPClient = client
   104  }
   105  
   106  // WithOperationID adds the operationID to the get operation actions params
   107  func (o *GetOperationActionsParams) WithOperationID(operationID string) *GetOperationActionsParams {
   108  	o.SetOperationID(operationID)
   109  	return o
   110  }
   111  
   112  // SetOperationID adds the operationId to the get operation actions params
   113  func (o *GetOperationActionsParams) SetOperationID(operationID string) {
   114  	o.OperationID = operationID
   115  }
   116  
   117  // WriteToRequest writes these params to a swagger request
   118  func (o *GetOperationActionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
   119  
   120  	if err := r.SetTimeout(o.timeout); err != nil {
   121  		return err
   122  	}
   123  	var res []error
   124  
   125  	// path param operationId
   126  	if err := r.SetPathParam("operationId", o.OperationID); err != nil {
   127  		return err
   128  	}
   129  
   130  	if len(res) > 0 {
   131  		return errors.CompositeValidationError(res...)
   132  	}
   133  	return nil
   134  }