@@ -164,15 +164,61 @@ func (a *OrgConnectionsApi) DeleteOrgConnections(ctx _context.Context, connectio
164164 return localVarHTTPResponse , nil
165165}
166166
167+ // ListOrgConnectionsOptionalParameters holds optional parameters for ListOrgConnections.
168+ type ListOrgConnectionsOptionalParameters struct {
169+ SinkOrgId * string
170+ SourceOrgId * string
171+ Limit * int64
172+ Offset * int64
173+ }
174+
175+ // NewListOrgConnectionsOptionalParameters creates an empty struct for parameters.
176+ func NewListOrgConnectionsOptionalParameters () * ListOrgConnectionsOptionalParameters {
177+ this := ListOrgConnectionsOptionalParameters {}
178+ return & this
179+ }
180+
181+ // WithSinkOrgId sets the corresponding parameter name and returns the struct.
182+ func (r * ListOrgConnectionsOptionalParameters ) WithSinkOrgId (sinkOrgId string ) * ListOrgConnectionsOptionalParameters {
183+ r .SinkOrgId = & sinkOrgId
184+ return r
185+ }
186+
187+ // WithSourceOrgId sets the corresponding parameter name and returns the struct.
188+ func (r * ListOrgConnectionsOptionalParameters ) WithSourceOrgId (sourceOrgId string ) * ListOrgConnectionsOptionalParameters {
189+ r .SourceOrgId = & sourceOrgId
190+ return r
191+ }
192+
193+ // WithLimit sets the corresponding parameter name and returns the struct.
194+ func (r * ListOrgConnectionsOptionalParameters ) WithLimit (limit int64 ) * ListOrgConnectionsOptionalParameters {
195+ r .Limit = & limit
196+ return r
197+ }
198+
199+ // WithOffset sets the corresponding parameter name and returns the struct.
200+ func (r * ListOrgConnectionsOptionalParameters ) WithOffset (offset int64 ) * ListOrgConnectionsOptionalParameters {
201+ r .Offset = & offset
202+ return r
203+ }
204+
167205// ListOrgConnections List Org Connections.
168206// Returns a list of org connections.
169- func (a * OrgConnectionsApi ) ListOrgConnections (ctx _context.Context ) (OrgConnectionListResponse , * _nethttp.Response , error ) {
207+ func (a * OrgConnectionsApi ) ListOrgConnections (ctx _context.Context , o ... ListOrgConnectionsOptionalParameters ) (OrgConnectionListResponse , * _nethttp.Response , error ) {
170208 var (
171209 localVarHTTPMethod = _nethttp .MethodGet
172210 localVarPostBody interface {}
173211 localVarReturnValue OrgConnectionListResponse
212+ optionalParams ListOrgConnectionsOptionalParameters
174213 )
175214
215+ if len (o ) > 1 {
216+ return localVarReturnValue , nil , datadog .ReportError ("only one argument of type ListOrgConnectionsOptionalParameters is allowed" )
217+ }
218+ if len (o ) == 1 {
219+ optionalParams = o [0 ]
220+ }
221+
176222 localBasePath , err := a .Client .Cfg .ServerURLWithContext (ctx , "v2.OrgConnectionsApi.ListOrgConnections" )
177223 if err != nil {
178224 return localVarReturnValue , nil , datadog.GenericOpenAPIError {ErrorMessage : err .Error ()}
@@ -183,6 +229,18 @@ func (a *OrgConnectionsApi) ListOrgConnections(ctx _context.Context) (OrgConnect
183229 localVarHeaderParams := make (map [string ]string )
184230 localVarQueryParams := _neturl.Values {}
185231 localVarFormParams := _neturl.Values {}
232+ if optionalParams .SinkOrgId != nil {
233+ localVarQueryParams .Add ("sink_org_id" , datadog .ParameterToString (* optionalParams .SinkOrgId , "" ))
234+ }
235+ if optionalParams .SourceOrgId != nil {
236+ localVarQueryParams .Add ("source_org_id" , datadog .ParameterToString (* optionalParams .SourceOrgId , "" ))
237+ }
238+ if optionalParams .Limit != nil {
239+ localVarQueryParams .Add ("limit" , datadog .ParameterToString (* optionalParams .Limit , "" ))
240+ }
241+ if optionalParams .Offset != nil {
242+ localVarQueryParams .Add ("offset" , datadog .ParameterToString (* optionalParams .Offset , "" ))
243+ }
186244 localVarHeaderParams ["Accept" ] = "application/json"
187245
188246 if a .Client .Cfg .DelegatedTokenConfig != nil {
0 commit comments