// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

package operations

import (
	"github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils"
	"github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared"
	"net/http"
)

type ListConnectionsRequest struct {
	// The UUIDs of the workspaces you wish to list connections for. Empty list will retrieve all allowed workspaces.
	WorkspaceIds []string `queryParam:"style=form,explode=true,name=workspaceIds"`
	// The UUIDs of the tags you wish to list connections for. Empty list will retrieve all connections.
	TagIds []string `queryParam:"style=form,explode=true,name=tagIds"`
	// Include deleted connections in the returned results.
	IncludeDeleted *bool `default:"false" queryParam:"style=form,explode=true,name=includeDeleted"`
	// Set the limit on the number of Connections returned. The default is 20.
	Limit *int `default:"20" queryParam:"style=form,explode=true,name=limit"`
	// Set the offset to start at when returning Connections. The default is 0
	Offset *int `default:"0" queryParam:"style=form,explode=true,name=offset"`
}

func (l ListConnectionsRequest) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(l, "", false)
}

func (l *ListConnectionsRequest) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &l, "", false, false); err != nil {
		return err
	}
	return nil
}

func (o *ListConnectionsRequest) GetWorkspaceIds() []string {
	if o == nil {
		return nil
	}
	return o.WorkspaceIds
}

func (o *ListConnectionsRequest) GetTagIds() []string {
	if o == nil {
		return nil
	}
	return o.TagIds
}

func (o *ListConnectionsRequest) GetIncludeDeleted() *bool {
	if o == nil {
		return nil
	}
	return o.IncludeDeleted
}

func (o *ListConnectionsRequest) GetLimit() *int {
	if o == nil {
		return nil
	}
	return o.Limit
}

func (o *ListConnectionsRequest) GetOffset() *int {
	if o == nil {
		return nil
	}
	return o.Offset
}

type ListConnectionsResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
	// Successful operation
	ConnectionsResponse *shared.ConnectionsResponse
}

func (o *ListConnectionsResponse) GetContentType() string {
	if o == nil {
		return ""
	}
	return o.ContentType
}

func (o *ListConnectionsResponse) GetStatusCode() int {
	if o == nil {
		return 0
	}
	return o.StatusCode
}

func (o *ListConnectionsResponse) GetRawResponse() *http.Response {
	if o == nil {
		return nil
	}
	return o.RawResponse
}

func (o *ListConnectionsResponse) GetConnectionsResponse() *shared.ConnectionsResponse {
	if o == nil {
		return nil
	}
	return o.ConnectionsResponse
}
