-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(sdk): generate go extend sdk (2024-03-13T03:28:26+00:00)
generated from openapi spec commit: e4d3ca075423a76443f5b4381436220d43e57246
- Loading branch information
Ubuntu
authored and
Gusti Zainokta
committed
Mar 13, 2024
1 parent
4c77729
commit d0c58c0
Showing
215 changed files
with
20,028 additions
and
6,480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
207 changes: 207 additions & 0 deletions
207
ams-sdk/pkg/amsclient/servers/fleet_server_connection_info_parameters.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
// Copyright (c) 2021 AccelByte Inc. All Rights Reserved. | ||
// This is licensed software from AccelByte Inc, for limitations | ||
// and restrictions contact your company contract manager. | ||
|
||
// Code generated; DO NOT EDIT. | ||
|
||
package servers | ||
|
||
import ( | ||
"context" | ||
"net/http" | ||
"time" | ||
|
||
"github.com/AccelByte/accelbyte-go-sdk/services-api/pkg/utils" | ||
"github.com/go-openapi/errors" | ||
"github.com/go-openapi/runtime" | ||
cr "github.com/go-openapi/runtime/client" | ||
"github.com/go-openapi/strfmt" | ||
) | ||
|
||
// NewFleetServerConnectionInfoParams creates a new FleetServerConnectionInfoParams object | ||
// with the default values initialized. | ||
func NewFleetServerConnectionInfoParams() *FleetServerConnectionInfoParams { | ||
var () | ||
return &FleetServerConnectionInfoParams{ | ||
|
||
timeout: cr.DefaultTimeout, | ||
} | ||
} | ||
|
||
// NewFleetServerConnectionInfoParamsWithTimeout creates a new FleetServerConnectionInfoParams object | ||
// with the default values initialized, and the ability to set a timeout on a request | ||
func NewFleetServerConnectionInfoParamsWithTimeout(timeout time.Duration) *FleetServerConnectionInfoParams { | ||
var () | ||
return &FleetServerConnectionInfoParams{ | ||
|
||
timeout: timeout, | ||
} | ||
} | ||
|
||
// NewFleetServerConnectionInfoParamsWithContext creates a new FleetServerConnectionInfoParams object | ||
// with the default values initialized, and the ability to set a context for a request | ||
func NewFleetServerConnectionInfoParamsWithContext(ctx context.Context) *FleetServerConnectionInfoParams { | ||
var () | ||
return &FleetServerConnectionInfoParams{ | ||
|
||
Context: ctx, | ||
} | ||
} | ||
|
||
// NewFleetServerConnectionInfoParamsWithHTTPClient creates a new FleetServerConnectionInfoParams object | ||
// with the default values initialized, and the ability to set a custom HTTPClient for a request | ||
func NewFleetServerConnectionInfoParamsWithHTTPClient(client *http.Client) *FleetServerConnectionInfoParams { | ||
var () | ||
return &FleetServerConnectionInfoParams{ | ||
HTTPClient: client, | ||
} | ||
} | ||
|
||
/*FleetServerConnectionInfoParams contains all the parameters to send to the API endpoint | ||
for the fleet server connection info operation typically these are written to a http.Request | ||
*/ | ||
type FleetServerConnectionInfoParams struct { | ||
|
||
/*RetryPolicy*/ | ||
RetryPolicy *utils.Retry | ||
/*Namespace | ||
namespace of the game | ||
*/ | ||
Namespace string | ||
/*ServerID | ||
the ID of the dedicated server | ||
*/ | ||
ServerID string | ||
|
||
timeout time.Duration | ||
AuthInfoWriter runtime.ClientAuthInfoWriter | ||
Context context.Context | ||
HTTPClient *http.Client | ||
|
||
// XFlightId is an optional parameter from this SDK | ||
XFlightId *string | ||
} | ||
|
||
// WithTimeout adds the timeout to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) WithTimeout(timeout time.Duration) *FleetServerConnectionInfoParams { | ||
o.SetTimeout(timeout) | ||
return o | ||
} | ||
|
||
// SetTimeout adds the timeout to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) SetTimeout(timeout time.Duration) { | ||
o.timeout = timeout | ||
} | ||
|
||
// WithContext adds the context to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) WithContext(ctx context.Context) *FleetServerConnectionInfoParams { | ||
o.SetContext(ctx) | ||
return o | ||
} | ||
|
||
// SetContext adds the context to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) SetContext(ctx context.Context) { | ||
o.Context = ctx | ||
} | ||
|
||
// SetAuthInfoWriter adds the authInfoWriter to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) SetAuthInfoWriter(authInfoWriter runtime.ClientAuthInfoWriter) { | ||
o.AuthInfoWriter = authInfoWriter | ||
} | ||
|
||
// WithHTTPClient adds the HTTPClient to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) WithHTTPClient(client *http.Client) *FleetServerConnectionInfoParams { | ||
o.SetHTTPClient(client) | ||
return o | ||
} | ||
|
||
// SetHTTPClient adds the HTTPClient to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) SetHTTPClient(client *http.Client) { | ||
o.HTTPClient = client | ||
} | ||
|
||
// SetHTTPClient adds the HTTPClient Transport to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) SetHTTPClientTransport(roundTripper http.RoundTripper) { | ||
if o.HTTPClient != nil { | ||
o.HTTPClient.Transport = roundTripper | ||
} else { | ||
o.HTTPClient = &http.Client{Transport: roundTripper} | ||
} | ||
} | ||
|
||
// SetFlightId adds the flightId as the header value for this specific endpoint | ||
func (o *FleetServerConnectionInfoParams) SetFlightId(flightId string) { | ||
if o.XFlightId != nil { | ||
o.XFlightId = &flightId | ||
} else { | ||
o.XFlightId = &utils.GetDefaultFlightID().Value | ||
} | ||
} | ||
|
||
// WithNamespace adds the namespace to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) WithNamespace(namespace string) *FleetServerConnectionInfoParams { | ||
o.SetNamespace(namespace) | ||
return o | ||
} | ||
|
||
// SetNamespace adds the namespace to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) SetNamespace(namespace string) { | ||
o.Namespace = namespace | ||
} | ||
|
||
// WithServerID adds the serverID to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) WithServerID(serverID string) *FleetServerConnectionInfoParams { | ||
o.SetServerID(serverID) | ||
return o | ||
} | ||
|
||
// SetServerID adds the serverId to the fleet server connection info params | ||
func (o *FleetServerConnectionInfoParams) SetServerID(serverID string) { | ||
o.ServerID = serverID | ||
} | ||
|
||
// WriteToRequest writes these params to a swagger request | ||
func (o *FleetServerConnectionInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { | ||
|
||
if err := r.SetTimeout(o.timeout); err != nil { | ||
return err | ||
} | ||
var res []error | ||
|
||
// path param namespace | ||
if err := r.SetPathParam("namespace", o.Namespace); err != nil { | ||
return err | ||
} | ||
|
||
// path param serverID | ||
if err := r.SetPathParam("serverID", o.ServerID); err != nil { | ||
return err | ||
} | ||
|
||
// setting the default header value | ||
if err := r.SetHeaderParam("User-Agent", utils.UserAgentGen()); err != nil { | ||
return err | ||
} | ||
|
||
if err := r.SetHeaderParam("X-Amzn-Trace-Id", utils.AmazonTraceIDGen()); err != nil { | ||
return err | ||
} | ||
|
||
if o.XFlightId == nil { | ||
if err := r.SetHeaderParam("X-Flight-Id", utils.GetDefaultFlightID().Value); err != nil { | ||
return err | ||
} | ||
} else { | ||
if err := r.SetHeaderParam("X-Flight-Id", *o.XFlightId); err != nil { | ||
return err | ||
} | ||
} | ||
|
||
if len(res) > 0 { | ||
return errors.CompositeValidationError(res...) | ||
} | ||
|
||
return nil | ||
} |
Oops, something went wrong.