github.com/kubearmor/cilium@v1.6.12/api/v1/client/endpoint/delete_endpoint_id_parameters.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package endpoint 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 "context" 10 "net/http" 11 "time" 12 13 "github.com/go-openapi/errors" 14 "github.com/go-openapi/runtime" 15 cr "github.com/go-openapi/runtime/client" 16 17 strfmt "github.com/go-openapi/strfmt" 18 ) 19 20 // NewDeleteEndpointIDParams creates a new DeleteEndpointIDParams object 21 // with the default values initialized. 22 func NewDeleteEndpointIDParams() *DeleteEndpointIDParams { 23 var () 24 return &DeleteEndpointIDParams{ 25 26 timeout: cr.DefaultTimeout, 27 } 28 } 29 30 // NewDeleteEndpointIDParamsWithTimeout creates a new DeleteEndpointIDParams object 31 // with the default values initialized, and the ability to set a timeout on a request 32 func NewDeleteEndpointIDParamsWithTimeout(timeout time.Duration) *DeleteEndpointIDParams { 33 var () 34 return &DeleteEndpointIDParams{ 35 36 timeout: timeout, 37 } 38 } 39 40 // NewDeleteEndpointIDParamsWithContext creates a new DeleteEndpointIDParams object 41 // with the default values initialized, and the ability to set a context for a request 42 func NewDeleteEndpointIDParamsWithContext(ctx context.Context) *DeleteEndpointIDParams { 43 var () 44 return &DeleteEndpointIDParams{ 45 46 Context: ctx, 47 } 48 } 49 50 // NewDeleteEndpointIDParamsWithHTTPClient creates a new DeleteEndpointIDParams object 51 // with the default values initialized, and the ability to set a custom HTTPClient for a request 52 func NewDeleteEndpointIDParamsWithHTTPClient(client *http.Client) *DeleteEndpointIDParams { 53 var () 54 return &DeleteEndpointIDParams{ 55 HTTPClient: client, 56 } 57 } 58 59 /*DeleteEndpointIDParams contains all the parameters to send to the API endpoint 60 for the delete endpoint ID operation typically these are written to a http.Request 61 */ 62 type DeleteEndpointIDParams struct { 63 64 /*ID 65 String describing an endpoint with the format ``[prefix:]id``. If no prefix 66 is specified, a prefix of ``cilium-local:`` is assumed. Not all endpoints 67 will be addressable by all endpoint ID prefixes with the exception of the 68 local Cilium UUID which is assigned to all endpoints. 69 70 Supported endpoint id prefixes: 71 - cilium-local: Local Cilium endpoint UUID, e.g. cilium-local:3389595 72 - cilium-global: Global Cilium endpoint UUID, e.g. cilium-global:cluster1:nodeX:452343 73 - container-id: Container runtime ID, e.g. container-id:22222 74 - container-name: Container name, e.g. container-name:foobar 75 - pod-name: pod name for this container if K8s is enabled, e.g. pod-name:default:foobar 76 - docker-endpoint: Docker libnetwork endpoint ID, e.g. docker-endpoint:4444 77 78 79 */ 80 ID string 81 82 timeout time.Duration 83 Context context.Context 84 HTTPClient *http.Client 85 } 86 87 // WithTimeout adds the timeout to the delete endpoint ID params 88 func (o *DeleteEndpointIDParams) WithTimeout(timeout time.Duration) *DeleteEndpointIDParams { 89 o.SetTimeout(timeout) 90 return o 91 } 92 93 // SetTimeout adds the timeout to the delete endpoint ID params 94 func (o *DeleteEndpointIDParams) SetTimeout(timeout time.Duration) { 95 o.timeout = timeout 96 } 97 98 // WithContext adds the context to the delete endpoint ID params 99 func (o *DeleteEndpointIDParams) WithContext(ctx context.Context) *DeleteEndpointIDParams { 100 o.SetContext(ctx) 101 return o 102 } 103 104 // SetContext adds the context to the delete endpoint ID params 105 func (o *DeleteEndpointIDParams) SetContext(ctx context.Context) { 106 o.Context = ctx 107 } 108 109 // WithHTTPClient adds the HTTPClient to the delete endpoint ID params 110 func (o *DeleteEndpointIDParams) WithHTTPClient(client *http.Client) *DeleteEndpointIDParams { 111 o.SetHTTPClient(client) 112 return o 113 } 114 115 // SetHTTPClient adds the HTTPClient to the delete endpoint ID params 116 func (o *DeleteEndpointIDParams) SetHTTPClient(client *http.Client) { 117 o.HTTPClient = client 118 } 119 120 // WithID adds the id to the delete endpoint ID params 121 func (o *DeleteEndpointIDParams) WithID(id string) *DeleteEndpointIDParams { 122 o.SetID(id) 123 return o 124 } 125 126 // SetID adds the id to the delete endpoint ID params 127 func (o *DeleteEndpointIDParams) SetID(id string) { 128 o.ID = id 129 } 130 131 // WriteToRequest writes these params to a swagger request 132 func (o *DeleteEndpointIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { 133 134 if err := r.SetTimeout(o.timeout); err != nil { 135 return err 136 } 137 var res []error 138 139 // path param id 140 if err := r.SetPathParam("id", o.ID); err != nil { 141 return err 142 } 143 144 if len(res) > 0 { 145 return errors.CompositeValidationError(res...) 146 } 147 return nil 148 }