@@ -42,7 +42,7 @@ func NewEndpointService(opts ...option.RequestOption) (r EndpointService) {
4242// Creates a new dedicated endpoint for serving models. The endpoint will
4343// automatically start after creation. You can deploy any supported model on
4444// hardware configurations that meet the model's requirements.
45- func (r * EndpointService ) New (ctx context.Context , body EndpointNewParams , opts ... option.RequestOption ) (res * EndpointNewResponse , err error ) {
45+ func (r * EndpointService ) New (ctx context.Context , body EndpointNewParams , opts ... option.RequestOption ) (res * DedicatedEndpoint , err error ) {
4646 opts = slices .Concat (r .Options , opts )
4747 path := "endpoints"
4848 err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , body , & res , opts ... )
@@ -51,7 +51,7 @@ func (r *EndpointService) New(ctx context.Context, body EndpointNewParams, opts
5151
5252// Retrieves details about a specific endpoint, including its current state,
5353// configuration, and scaling settings.
54- func (r * EndpointService ) Get (ctx context.Context , endpointID string , opts ... option.RequestOption ) (res * EndpointGetResponse , err error ) {
54+ func (r * EndpointService ) Get (ctx context.Context , endpointID string , opts ... option.RequestOption ) (res * DedicatedEndpoint , err error ) {
5555 opts = slices .Concat (r .Options , opts )
5656 if endpointID == "" {
5757 err = errors .New ("missing required endpointId parameter" )
@@ -64,7 +64,7 @@ func (r *EndpointService) Get(ctx context.Context, endpointID string, opts ...op
6464
6565// Updates an existing endpoint's configuration. You can modify the display name,
6666// autoscaling settings, or change the endpoint's state (start/stop).
67- func (r * EndpointService ) Update (ctx context.Context , endpointID string , body EndpointUpdateParams , opts ... option.RequestOption ) (res * EndpointUpdateResponse , err error ) {
67+ func (r * EndpointService ) Update (ctx context.Context , endpointID string , body EndpointUpdateParams , opts ... option.RequestOption ) (res * DedicatedEndpoint , err error ) {
6868 opts = slices .Concat (r .Options , opts )
6969 if endpointID == "" {
7070 err = errors .New ("missing required endpointId parameter" )
@@ -147,7 +147,7 @@ func (r *AutoscalingParam) UnmarshalJSON(data []byte) error {
147147}
148148
149149// Details about a dedicated endpoint deployment
150- type EndpointNewResponse struct {
150+ type DedicatedEndpoint struct {
151151 // Unique identifier for the endpoint
152152 ID string `json:"id,required"`
153153 // Configuration for automatic scaling of the endpoint
@@ -165,17 +165,17 @@ type EndpointNewResponse struct {
165165 // The type of object
166166 //
167167 // Any of "endpoint".
168- Object EndpointNewResponseObject `json:"object,required"`
168+ Object DedicatedEndpointObject `json:"object,required"`
169169 // The owner of this endpoint
170170 Owner string `json:"owner,required"`
171171 // Current state of the endpoint
172172 //
173173 // Any of "PENDING", "STARTING", "STARTED", "STOPPING", "STOPPED", "ERROR".
174- State EndpointNewResponseState `json:"state,required"`
174+ State DedicatedEndpointState `json:"state,required"`
175175 // The type of endpoint
176176 //
177177 // Any of "dedicated".
178- Type EndpointNewResponseType `json:"type,required"`
178+ Type DedicatedEndpointType `json:"type,required"`
179179 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
180180 JSON struct {
181181 ID respjson.Field
@@ -195,195 +195,35 @@ type EndpointNewResponse struct {
195195}
196196
197197// Returns the unmodified JSON received from the API
198- func (r EndpointNewResponse ) RawJSON () string { return r .JSON .raw }
199- func (r * EndpointNewResponse ) UnmarshalJSON (data []byte ) error {
198+ func (r DedicatedEndpoint ) RawJSON () string { return r .JSON .raw }
199+ func (r * DedicatedEndpoint ) UnmarshalJSON (data []byte ) error {
200200 return apijson .UnmarshalRoot (data , r )
201201}
202202
203203// The type of object
204- type EndpointNewResponseObject string
204+ type DedicatedEndpointObject string
205205
206206const (
207- EndpointNewResponseObjectEndpoint EndpointNewResponseObject = "endpoint"
207+ DedicatedEndpointObjectEndpoint DedicatedEndpointObject = "endpoint"
208208)
209209
210210// Current state of the endpoint
211- type EndpointNewResponseState string
211+ type DedicatedEndpointState string
212212
213213const (
214- EndpointNewResponseStatePending EndpointNewResponseState = "PENDING"
215- EndpointNewResponseStateStarting EndpointNewResponseState = "STARTING"
216- EndpointNewResponseStateStarted EndpointNewResponseState = "STARTED"
217- EndpointNewResponseStateStopping EndpointNewResponseState = "STOPPING"
218- EndpointNewResponseStateStopped EndpointNewResponseState = "STOPPED"
219- EndpointNewResponseStateError EndpointNewResponseState = "ERROR"
214+ DedicatedEndpointStatePending DedicatedEndpointState = "PENDING"
215+ DedicatedEndpointStateStarting DedicatedEndpointState = "STARTING"
216+ DedicatedEndpointStateStarted DedicatedEndpointState = "STARTED"
217+ DedicatedEndpointStateStopping DedicatedEndpointState = "STOPPING"
218+ DedicatedEndpointStateStopped DedicatedEndpointState = "STOPPED"
219+ DedicatedEndpointStateError DedicatedEndpointState = "ERROR"
220220)
221221
222222// The type of endpoint
223- type EndpointNewResponseType string
223+ type DedicatedEndpointType string
224224
225225const (
226- EndpointNewResponseTypeDedicated EndpointNewResponseType = "dedicated"
227- )
228-
229- // Details about a dedicated endpoint deployment
230- type EndpointGetResponse struct {
231- // Unique identifier for the endpoint
232- ID string `json:"id,required"`
233- // Configuration for automatic scaling of the endpoint
234- Autoscaling Autoscaling `json:"autoscaling,required"`
235- // Timestamp when the endpoint was created
236- CreatedAt time.Time `json:"created_at,required" format:"date-time"`
237- // Human-readable name for the endpoint
238- DisplayName string `json:"display_name,required"`
239- // The hardware configuration used for this endpoint
240- Hardware string `json:"hardware,required"`
241- // The model deployed on this endpoint
242- Model string `json:"model,required"`
243- // System name for the endpoint
244- Name string `json:"name,required"`
245- // The type of object
246- //
247- // Any of "endpoint".
248- Object EndpointGetResponseObject `json:"object,required"`
249- // The owner of this endpoint
250- Owner string `json:"owner,required"`
251- // Current state of the endpoint
252- //
253- // Any of "PENDING", "STARTING", "STARTED", "STOPPING", "STOPPED", "ERROR".
254- State EndpointGetResponseState `json:"state,required"`
255- // The type of endpoint
256- //
257- // Any of "dedicated".
258- Type EndpointGetResponseType `json:"type,required"`
259- // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
260- JSON struct {
261- ID respjson.Field
262- Autoscaling respjson.Field
263- CreatedAt respjson.Field
264- DisplayName respjson.Field
265- Hardware respjson.Field
266- Model respjson.Field
267- Name respjson.Field
268- Object respjson.Field
269- Owner respjson.Field
270- State respjson.Field
271- Type respjson.Field
272- ExtraFields map [string ]respjson.Field
273- raw string
274- } `json:"-"`
275- }
276-
277- // Returns the unmodified JSON received from the API
278- func (r EndpointGetResponse ) RawJSON () string { return r .JSON .raw }
279- func (r * EndpointGetResponse ) UnmarshalJSON (data []byte ) error {
280- return apijson .UnmarshalRoot (data , r )
281- }
282-
283- // The type of object
284- type EndpointGetResponseObject string
285-
286- const (
287- EndpointGetResponseObjectEndpoint EndpointGetResponseObject = "endpoint"
288- )
289-
290- // Current state of the endpoint
291- type EndpointGetResponseState string
292-
293- const (
294- EndpointGetResponseStatePending EndpointGetResponseState = "PENDING"
295- EndpointGetResponseStateStarting EndpointGetResponseState = "STARTING"
296- EndpointGetResponseStateStarted EndpointGetResponseState = "STARTED"
297- EndpointGetResponseStateStopping EndpointGetResponseState = "STOPPING"
298- EndpointGetResponseStateStopped EndpointGetResponseState = "STOPPED"
299- EndpointGetResponseStateError EndpointGetResponseState = "ERROR"
300- )
301-
302- // The type of endpoint
303- type EndpointGetResponseType string
304-
305- const (
306- EndpointGetResponseTypeDedicated EndpointGetResponseType = "dedicated"
307- )
308-
309- // Details about a dedicated endpoint deployment
310- type EndpointUpdateResponse struct {
311- // Unique identifier for the endpoint
312- ID string `json:"id,required"`
313- // Configuration for automatic scaling of the endpoint
314- Autoscaling Autoscaling `json:"autoscaling,required"`
315- // Timestamp when the endpoint was created
316- CreatedAt time.Time `json:"created_at,required" format:"date-time"`
317- // Human-readable name for the endpoint
318- DisplayName string `json:"display_name,required"`
319- // The hardware configuration used for this endpoint
320- Hardware string `json:"hardware,required"`
321- // The model deployed on this endpoint
322- Model string `json:"model,required"`
323- // System name for the endpoint
324- Name string `json:"name,required"`
325- // The type of object
326- //
327- // Any of "endpoint".
328- Object EndpointUpdateResponseObject `json:"object,required"`
329- // The owner of this endpoint
330- Owner string `json:"owner,required"`
331- // Current state of the endpoint
332- //
333- // Any of "PENDING", "STARTING", "STARTED", "STOPPING", "STOPPED", "ERROR".
334- State EndpointUpdateResponseState `json:"state,required"`
335- // The type of endpoint
336- //
337- // Any of "dedicated".
338- Type EndpointUpdateResponseType `json:"type,required"`
339- // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
340- JSON struct {
341- ID respjson.Field
342- Autoscaling respjson.Field
343- CreatedAt respjson.Field
344- DisplayName respjson.Field
345- Hardware respjson.Field
346- Model respjson.Field
347- Name respjson.Field
348- Object respjson.Field
349- Owner respjson.Field
350- State respjson.Field
351- Type respjson.Field
352- ExtraFields map [string ]respjson.Field
353- raw string
354- } `json:"-"`
355- }
356-
357- // Returns the unmodified JSON received from the API
358- func (r EndpointUpdateResponse ) RawJSON () string { return r .JSON .raw }
359- func (r * EndpointUpdateResponse ) UnmarshalJSON (data []byte ) error {
360- return apijson .UnmarshalRoot (data , r )
361- }
362-
363- // The type of object
364- type EndpointUpdateResponseObject string
365-
366- const (
367- EndpointUpdateResponseObjectEndpoint EndpointUpdateResponseObject = "endpoint"
368- )
369-
370- // Current state of the endpoint
371- type EndpointUpdateResponseState string
372-
373- const (
374- EndpointUpdateResponseStatePending EndpointUpdateResponseState = "PENDING"
375- EndpointUpdateResponseStateStarting EndpointUpdateResponseState = "STARTING"
376- EndpointUpdateResponseStateStarted EndpointUpdateResponseState = "STARTED"
377- EndpointUpdateResponseStateStopping EndpointUpdateResponseState = "STOPPING"
378- EndpointUpdateResponseStateStopped EndpointUpdateResponseState = "STOPPED"
379- EndpointUpdateResponseStateError EndpointUpdateResponseState = "ERROR"
380- )
381-
382- // The type of endpoint
383- type EndpointUpdateResponseType string
384-
385- const (
386- EndpointUpdateResponseTypeDedicated EndpointUpdateResponseType = "dedicated"
226+ DedicatedEndpointTypeDedicated DedicatedEndpointType = "dedicated"
387227)
388228
389229type EndpointListResponse struct {
0 commit comments