github.com/sap/cf-mta-plugin@v2.6.3+incompatible/clients/mtaclient/operations/get_mta_operation_logs_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 // NewGetMtaOperationLogsParams creates a new GetMtaOperationLogsParams object 22 // with the default values initialized. 23 func NewGetMtaOperationLogsParams() *GetMtaOperationLogsParams { 24 var () 25 return &GetMtaOperationLogsParams{ 26 27 timeout: cr.DefaultTimeout, 28 } 29 } 30 31 // NewGetMtaOperationLogsParamsWithTimeout creates a new GetMtaOperationLogsParams object 32 // with the default values initialized, and the ability to set a timeout on a request 33 func NewGetMtaOperationLogsParamsWithTimeout(timeout time.Duration) *GetMtaOperationLogsParams { 34 var () 35 return &GetMtaOperationLogsParams{ 36 37 timeout: timeout, 38 } 39 } 40 41 // NewGetMtaOperationLogsParamsWithContext creates a new GetMtaOperationLogsParams object 42 // with the default values initialized, and the ability to set a context for a request 43 func NewGetMtaOperationLogsParamsWithContext(ctx context.Context) *GetMtaOperationLogsParams { 44 var () 45 return &GetMtaOperationLogsParams{ 46 47 Context: ctx, 48 } 49 } 50 51 // NewGetMtaOperationLogsParamsWithHTTPClient creates a new GetMtaOperationLogsParams object 52 // with the default values initialized, and the ability to set a custom HTTPClient for a request 53 func NewGetMtaOperationLogsParamsWithHTTPClient(client *http.Client) *GetMtaOperationLogsParams { 54 var () 55 return &GetMtaOperationLogsParams{ 56 HTTPClient: client, 57 } 58 } 59 60 /*GetMtaOperationLogsParams contains all the parameters to send to the API endpoint 61 for the get mta operation logs operation typically these are written to a http.Request 62 */ 63 type GetMtaOperationLogsParams 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 mta operation logs params 74 func (o *GetMtaOperationLogsParams) WithTimeout(timeout time.Duration) *GetMtaOperationLogsParams { 75 o.SetTimeout(timeout) 76 return o 77 } 78 79 // SetTimeout adds the timeout to the get mta operation logs params 80 func (o *GetMtaOperationLogsParams) SetTimeout(timeout time.Duration) { 81 o.timeout = timeout 82 } 83 84 // WithContext adds the context to the get mta operation logs params 85 func (o *GetMtaOperationLogsParams) WithContext(ctx context.Context) *GetMtaOperationLogsParams { 86 o.SetContext(ctx) 87 return o 88 } 89 90 // SetContext adds the context to the get mta operation logs params 91 func (o *GetMtaOperationLogsParams) SetContext(ctx context.Context) { 92 o.Context = ctx 93 } 94 95 // WithHTTPClient adds the HTTPClient to the get mta operation logs params 96 func (o *GetMtaOperationLogsParams) WithHTTPClient(client *http.Client) *GetMtaOperationLogsParams { 97 o.SetHTTPClient(client) 98 return o 99 } 100 101 // SetHTTPClient adds the HTTPClient to the get mta operation logs params 102 func (o *GetMtaOperationLogsParams) SetHTTPClient(client *http.Client) { 103 o.HTTPClient = client 104 } 105 106 // WithOperationID adds the operationID to the get mta operation logs params 107 func (o *GetMtaOperationLogsParams) WithOperationID(operationID string) *GetMtaOperationLogsParams { 108 o.SetOperationID(operationID) 109 return o 110 } 111 112 // SetOperationID adds the operationId to the get mta operation logs params 113 func (o *GetMtaOperationLogsParams) SetOperationID(operationID string) { 114 o.OperationID = operationID 115 } 116 117 // WriteToRequest writes these params to a swagger request 118 func (o *GetMtaOperationLogsParams) 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 }