github.com/kubearmor/cilium@v1.6.12/api/v1/client/endpoint/get_endpoint_id_labels_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 // NewGetEndpointIDLabelsParams creates a new GetEndpointIDLabelsParams object 21 // with the default values initialized. 22 func NewGetEndpointIDLabelsParams() *GetEndpointIDLabelsParams { 23 var () 24 return &GetEndpointIDLabelsParams{ 25 26 timeout: cr.DefaultTimeout, 27 } 28 } 29 30 // NewGetEndpointIDLabelsParamsWithTimeout creates a new GetEndpointIDLabelsParams object 31 // with the default values initialized, and the ability to set a timeout on a request 32 func NewGetEndpointIDLabelsParamsWithTimeout(timeout time.Duration) *GetEndpointIDLabelsParams { 33 var () 34 return &GetEndpointIDLabelsParams{ 35 36 timeout: timeout, 37 } 38 } 39 40 // NewGetEndpointIDLabelsParamsWithContext creates a new GetEndpointIDLabelsParams object 41 // with the default values initialized, and the ability to set a context for a request 42 func NewGetEndpointIDLabelsParamsWithContext(ctx context.Context) *GetEndpointIDLabelsParams { 43 var () 44 return &GetEndpointIDLabelsParams{ 45 46 Context: ctx, 47 } 48 } 49 50 // NewGetEndpointIDLabelsParamsWithHTTPClient creates a new GetEndpointIDLabelsParams object 51 // with the default values initialized, and the ability to set a custom HTTPClient for a request 52 func NewGetEndpointIDLabelsParamsWithHTTPClient(client *http.Client) *GetEndpointIDLabelsParams { 53 var () 54 return &GetEndpointIDLabelsParams{ 55 HTTPClient: client, 56 } 57 } 58 59 /*GetEndpointIDLabelsParams contains all the parameters to send to the API endpoint 60 for the get endpoint ID labels operation typically these are written to a http.Request 61 */ 62 type GetEndpointIDLabelsParams 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 get endpoint ID labels params 88 func (o *GetEndpointIDLabelsParams) WithTimeout(timeout time.Duration) *GetEndpointIDLabelsParams { 89 o.SetTimeout(timeout) 90 return o 91 } 92 93 // SetTimeout adds the timeout to the get endpoint ID labels params 94 func (o *GetEndpointIDLabelsParams) SetTimeout(timeout time.Duration) { 95 o.timeout = timeout 96 } 97 98 // WithContext adds the context to the get endpoint ID labels params 99 func (o *GetEndpointIDLabelsParams) WithContext(ctx context.Context) *GetEndpointIDLabelsParams { 100 o.SetContext(ctx) 101 return o 102 } 103 104 // SetContext adds the context to the get endpoint ID labels params 105 func (o *GetEndpointIDLabelsParams) SetContext(ctx context.Context) { 106 o.Context = ctx 107 } 108 109 // WithHTTPClient adds the HTTPClient to the get endpoint ID labels params 110 func (o *GetEndpointIDLabelsParams) WithHTTPClient(client *http.Client) *GetEndpointIDLabelsParams { 111 o.SetHTTPClient(client) 112 return o 113 } 114 115 // SetHTTPClient adds the HTTPClient to the get endpoint ID labels params 116 func (o *GetEndpointIDLabelsParams) SetHTTPClient(client *http.Client) { 117 o.HTTPClient = client 118 } 119 120 // WithID adds the id to the get endpoint ID labels params 121 func (o *GetEndpointIDLabelsParams) WithID(id string) *GetEndpointIDLabelsParams { 122 o.SetID(id) 123 return o 124 } 125 126 // SetID adds the id to the get endpoint ID labels params 127 func (o *GetEndpointIDLabelsParams) SetID(id string) { 128 o.ID = id 129 } 130 131 // WriteToRequest writes these params to a swagger request 132 func (o *GetEndpointIDLabelsParams) 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 }