segments

package
v0.0.0-...-c7fed22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for segments API

func (*Client) ExploreSegments

func (a *Client) ExploreSegments(params *ExploreSegmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExploreSegmentsOK, error)

ExploreSegments explores segments

Returns the top 10 segments matching a specified query.

func (*Client) GetLoggedInAthleteStarredSegments

func (a *Client) GetLoggedInAthleteStarredSegments(params *GetLoggedInAthleteStarredSegmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLoggedInAthleteStarredSegmentsOK, error)

GetLoggedInAthleteStarredSegments lists starred segments

List of the authenticated athlete's starred segments. Private segments are filtered out unless requested by a token with read_all scope.

func (*Client) GetSegmentByID

func (a *Client) GetSegmentByID(params *GetSegmentByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSegmentByIDOK, error)

GetSegmentByID gets segment

Returns the specified segment. read_all scope required in order to retrieve athlete-specific segment information, or to retrieve private segments.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

func (*Client) StarSegment

func (a *Client) StarSegment(params *StarSegmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*StarSegmentOK, error)

StarSegment stars segment

Stars/Unstars the given segment for the authenticated athlete. Requires profile:write scope.

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	ExploreSegments(params *ExploreSegmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExploreSegmentsOK, error)

	GetLoggedInAthleteStarredSegments(params *GetLoggedInAthleteStarredSegmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetLoggedInAthleteStarredSegmentsOK, error)

	GetSegmentByID(params *GetSegmentByIDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSegmentByIDOK, error)

	StarSegment(params *StarSegmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*StarSegmentOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new segments API client.

type ExploreSegmentsDefault

type ExploreSegmentsDefault struct {
	Payload *models.Fault
	// contains filtered or unexported fields
}

ExploreSegmentsDefault describes a response with status code -1, with default header values.

Unexpected error.

func NewExploreSegmentsDefault

func NewExploreSegmentsDefault(code int) *ExploreSegmentsDefault

NewExploreSegmentsDefault creates a ExploreSegmentsDefault with default headers values

func (*ExploreSegmentsDefault) Code

func (o *ExploreSegmentsDefault) Code() int

Code gets the status code for the explore segments default response

func (*ExploreSegmentsDefault) Error

func (o *ExploreSegmentsDefault) Error() string

func (*ExploreSegmentsDefault) GetPayload

func (o *ExploreSegmentsDefault) GetPayload() *models.Fault

func (*ExploreSegmentsDefault) IsClientError

func (o *ExploreSegmentsDefault) IsClientError() bool

IsClientError returns true when this explore segments default response has a 4xx status code

func (*ExploreSegmentsDefault) IsCode

func (o *ExploreSegmentsDefault) IsCode(code int) bool

IsCode returns true when this explore segments default response a status code equal to that given

func (*ExploreSegmentsDefault) IsRedirect

func (o *ExploreSegmentsDefault) IsRedirect() bool

IsRedirect returns true when this explore segments default response has a 3xx status code

func (*ExploreSegmentsDefault) IsServerError

func (o *ExploreSegmentsDefault) IsServerError() bool

IsServerError returns true when this explore segments default response has a 5xx status code

func (*ExploreSegmentsDefault) IsSuccess

func (o *ExploreSegmentsDefault) IsSuccess() bool

IsSuccess returns true when this explore segments default response has a 2xx status code

func (*ExploreSegmentsDefault) String

func (o *ExploreSegmentsDefault) String() string

type ExploreSegmentsOK

type ExploreSegmentsOK struct {
	Payload *models.ExplorerResponse
}

ExploreSegmentsOK describes a response with status code 200, with default header values.

List of matching segments.

func NewExploreSegmentsOK

func NewExploreSegmentsOK() *ExploreSegmentsOK

NewExploreSegmentsOK creates a ExploreSegmentsOK with default headers values

func (*ExploreSegmentsOK) Code

func (o *ExploreSegmentsOK) Code() int

Code gets the status code for the explore segments o k response

func (*ExploreSegmentsOK) Error

func (o *ExploreSegmentsOK) Error() string

func (*ExploreSegmentsOK) GetPayload

func (o *ExploreSegmentsOK) GetPayload() *models.ExplorerResponse

func (*ExploreSegmentsOK) IsClientError

func (o *ExploreSegmentsOK) IsClientError() bool

IsClientError returns true when this explore segments o k response has a 4xx status code

func (*ExploreSegmentsOK) IsCode

func (o *ExploreSegmentsOK) IsCode(code int) bool

IsCode returns true when this explore segments o k response a status code equal to that given

func (*ExploreSegmentsOK) IsRedirect

func (o *ExploreSegmentsOK) IsRedirect() bool

IsRedirect returns true when this explore segments o k response has a 3xx status code

func (*ExploreSegmentsOK) IsServerError

func (o *ExploreSegmentsOK) IsServerError() bool

IsServerError returns true when this explore segments o k response has a 5xx status code

func (*ExploreSegmentsOK) IsSuccess

func (o *ExploreSegmentsOK) IsSuccess() bool

IsSuccess returns true when this explore segments o k response has a 2xx status code

func (*ExploreSegmentsOK) String

func (o *ExploreSegmentsOK) String() string

type ExploreSegmentsParams

type ExploreSegmentsParams struct {
	/* ActivityType.

	   Desired activity type.
	*/
	ActivityType *string

	/* Bounds.

	   The latitude and longitude for two points describing a rectangular boundary for the search: [southwest corner latitutde, southwest corner longitude, northeast corner latitude, northeast corner longitude]
	*/
	Bounds []float32

	/* MaxCat.

	   The maximum climbing category.
	*/
	MaxCat *int64

	/* MinCat.

	   The minimum climbing category.
	*/
	MinCat *int64

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

ExploreSegmentsParams contains all the parameters to send to the API endpoint

for the explore segments operation.

Typically these are written to a http.Request.

func NewExploreSegmentsParams

func NewExploreSegmentsParams() *ExploreSegmentsParams

NewExploreSegmentsParams creates a new ExploreSegmentsParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewExploreSegmentsParamsWithContext

func NewExploreSegmentsParamsWithContext(ctx context.Context) *ExploreSegmentsParams

NewExploreSegmentsParamsWithContext creates a new ExploreSegmentsParams object with the ability to set a context for a request.

func NewExploreSegmentsParamsWithHTTPClient

func NewExploreSegmentsParamsWithHTTPClient(client *http.Client) *ExploreSegmentsParams

NewExploreSegmentsParamsWithHTTPClient creates a new ExploreSegmentsParams object with the ability to set a custom HTTPClient for a request.

func NewExploreSegmentsParamsWithTimeout

func NewExploreSegmentsParamsWithTimeout(timeout time.Duration) *ExploreSegmentsParams

NewExploreSegmentsParamsWithTimeout creates a new ExploreSegmentsParams object with the ability to set a timeout on a request.

func (*ExploreSegmentsParams) SetActivityType

func (o *ExploreSegmentsParams) SetActivityType(activityType *string)

SetActivityType adds the activityType to the explore segments params

func (*ExploreSegmentsParams) SetBounds

func (o *ExploreSegmentsParams) SetBounds(bounds []float32)

SetBounds adds the bounds to the explore segments params

func (*ExploreSegmentsParams) SetContext

func (o *ExploreSegmentsParams) SetContext(ctx context.Context)

SetContext adds the context to the explore segments params

func (*ExploreSegmentsParams) SetDefaults

func (o *ExploreSegmentsParams) SetDefaults()

SetDefaults hydrates default values in the explore segments params (not the query body).

All values with no default are reset to their zero value.

func (*ExploreSegmentsParams) SetHTTPClient

func (o *ExploreSegmentsParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the explore segments params

func (*ExploreSegmentsParams) SetMaxCat

func (o *ExploreSegmentsParams) SetMaxCat(maxCat *int64)

SetMaxCat adds the maxCat to the explore segments params

func (*ExploreSegmentsParams) SetMinCat

func (o *ExploreSegmentsParams) SetMinCat(minCat *int64)

SetMinCat adds the minCat to the explore segments params

func (*ExploreSegmentsParams) SetTimeout

func (o *ExploreSegmentsParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the explore segments params

func (*ExploreSegmentsParams) WithActivityType

func (o *ExploreSegmentsParams) WithActivityType(activityType *string) *ExploreSegmentsParams

WithActivityType adds the activityType to the explore segments params

func (*ExploreSegmentsParams) WithBounds

func (o *ExploreSegmentsParams) WithBounds(bounds []float32) *ExploreSegmentsParams

WithBounds adds the bounds to the explore segments params

func (*ExploreSegmentsParams) WithContext

WithContext adds the context to the explore segments params

func (*ExploreSegmentsParams) WithDefaults

func (o *ExploreSegmentsParams) WithDefaults() *ExploreSegmentsParams

WithDefaults hydrates default values in the explore segments params (not the query body).

All values with no default are reset to their zero value.

func (*ExploreSegmentsParams) WithHTTPClient

func (o *ExploreSegmentsParams) WithHTTPClient(client *http.Client) *ExploreSegmentsParams

WithHTTPClient adds the HTTPClient to the explore segments params

func (*ExploreSegmentsParams) WithMaxCat

func (o *ExploreSegmentsParams) WithMaxCat(maxCat *int64) *ExploreSegmentsParams

WithMaxCat adds the maxCat to the explore segments params

func (*ExploreSegmentsParams) WithMinCat

func (o *ExploreSegmentsParams) WithMinCat(minCat *int64) *ExploreSegmentsParams

WithMinCat adds the minCat to the explore segments params

func (*ExploreSegmentsParams) WithTimeout

func (o *ExploreSegmentsParams) WithTimeout(timeout time.Duration) *ExploreSegmentsParams

WithTimeout adds the timeout to the explore segments params

func (*ExploreSegmentsParams) WriteToRequest

func (o *ExploreSegmentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type ExploreSegmentsReader

type ExploreSegmentsReader struct {
	// contains filtered or unexported fields
}

ExploreSegmentsReader is a Reader for the ExploreSegments structure.

func (*ExploreSegmentsReader) ReadResponse

func (o *ExploreSegmentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type GetLoggedInAthleteStarredSegmentsDefault

type GetLoggedInAthleteStarredSegmentsDefault struct {
	Payload *models.Fault
	// contains filtered or unexported fields
}

GetLoggedInAthleteStarredSegmentsDefault describes a response with status code -1, with default header values.

Unexpected error.

func NewGetLoggedInAthleteStarredSegmentsDefault

func NewGetLoggedInAthleteStarredSegmentsDefault(code int) *GetLoggedInAthleteStarredSegmentsDefault

NewGetLoggedInAthleteStarredSegmentsDefault creates a GetLoggedInAthleteStarredSegmentsDefault with default headers values

func (*GetLoggedInAthleteStarredSegmentsDefault) Code

Code gets the status code for the get logged in athlete starred segments default response

func (*GetLoggedInAthleteStarredSegmentsDefault) Error

func (*GetLoggedInAthleteStarredSegmentsDefault) GetPayload

func (*GetLoggedInAthleteStarredSegmentsDefault) IsClientError

IsClientError returns true when this get logged in athlete starred segments default response has a 4xx status code

func (*GetLoggedInAthleteStarredSegmentsDefault) IsCode

IsCode returns true when this get logged in athlete starred segments default response a status code equal to that given

func (*GetLoggedInAthleteStarredSegmentsDefault) IsRedirect

IsRedirect returns true when this get logged in athlete starred segments default response has a 3xx status code

func (*GetLoggedInAthleteStarredSegmentsDefault) IsServerError

IsServerError returns true when this get logged in athlete starred segments default response has a 5xx status code

func (*GetLoggedInAthleteStarredSegmentsDefault) IsSuccess

IsSuccess returns true when this get logged in athlete starred segments default response has a 2xx status code

func (*GetLoggedInAthleteStarredSegmentsDefault) String

type GetLoggedInAthleteStarredSegmentsOK

type GetLoggedInAthleteStarredSegmentsOK struct {
	Payload []*models.SummarySegment
}

GetLoggedInAthleteStarredSegmentsOK describes a response with status code 200, with default header values.

List of the authenticated athlete's starred segments.

func NewGetLoggedInAthleteStarredSegmentsOK

func NewGetLoggedInAthleteStarredSegmentsOK() *GetLoggedInAthleteStarredSegmentsOK

NewGetLoggedInAthleteStarredSegmentsOK creates a GetLoggedInAthleteStarredSegmentsOK with default headers values

func (*GetLoggedInAthleteStarredSegmentsOK) Code

Code gets the status code for the get logged in athlete starred segments o k response

func (*GetLoggedInAthleteStarredSegmentsOK) Error

func (*GetLoggedInAthleteStarredSegmentsOK) GetPayload

func (*GetLoggedInAthleteStarredSegmentsOK) IsClientError

func (o *GetLoggedInAthleteStarredSegmentsOK) IsClientError() bool

IsClientError returns true when this get logged in athlete starred segments o k response has a 4xx status code

func (*GetLoggedInAthleteStarredSegmentsOK) IsCode

IsCode returns true when this get logged in athlete starred segments o k response a status code equal to that given

func (*GetLoggedInAthleteStarredSegmentsOK) IsRedirect

func (o *GetLoggedInAthleteStarredSegmentsOK) IsRedirect() bool

IsRedirect returns true when this get logged in athlete starred segments o k response has a 3xx status code

func (*GetLoggedInAthleteStarredSegmentsOK) IsServerError

func (o *GetLoggedInAthleteStarredSegmentsOK) IsServerError() bool

IsServerError returns true when this get logged in athlete starred segments o k response has a 5xx status code

func (*GetLoggedInAthleteStarredSegmentsOK) IsSuccess

IsSuccess returns true when this get logged in athlete starred segments o k response has a 2xx status code

func (*GetLoggedInAthleteStarredSegmentsOK) String

type GetLoggedInAthleteStarredSegmentsParams

type GetLoggedInAthleteStarredSegmentsParams struct {
	/* Page.

	   Page number. Defaults to 1.
	*/
	Page *int64

	/* PerPage.

	   Number of items per page. Defaults to 30.

	   Default: 30
	*/
	PerPage *int64

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetLoggedInAthleteStarredSegmentsParams contains all the parameters to send to the API endpoint

for the get logged in athlete starred segments operation.

Typically these are written to a http.Request.

func NewGetLoggedInAthleteStarredSegmentsParams

func NewGetLoggedInAthleteStarredSegmentsParams() *GetLoggedInAthleteStarredSegmentsParams

NewGetLoggedInAthleteStarredSegmentsParams creates a new GetLoggedInAthleteStarredSegmentsParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetLoggedInAthleteStarredSegmentsParamsWithContext

func NewGetLoggedInAthleteStarredSegmentsParamsWithContext(ctx context.Context) *GetLoggedInAthleteStarredSegmentsParams

NewGetLoggedInAthleteStarredSegmentsParamsWithContext creates a new GetLoggedInAthleteStarredSegmentsParams object with the ability to set a context for a request.

func NewGetLoggedInAthleteStarredSegmentsParamsWithHTTPClient

func NewGetLoggedInAthleteStarredSegmentsParamsWithHTTPClient(client *http.Client) *GetLoggedInAthleteStarredSegmentsParams

NewGetLoggedInAthleteStarredSegmentsParamsWithHTTPClient creates a new GetLoggedInAthleteStarredSegmentsParams object with the ability to set a custom HTTPClient for a request.

func NewGetLoggedInAthleteStarredSegmentsParamsWithTimeout

func NewGetLoggedInAthleteStarredSegmentsParamsWithTimeout(timeout time.Duration) *GetLoggedInAthleteStarredSegmentsParams

NewGetLoggedInAthleteStarredSegmentsParamsWithTimeout creates a new GetLoggedInAthleteStarredSegmentsParams object with the ability to set a timeout on a request.

func (*GetLoggedInAthleteStarredSegmentsParams) SetContext

SetContext adds the context to the get logged in athlete starred segments params

func (*GetLoggedInAthleteStarredSegmentsParams) SetDefaults

func (o *GetLoggedInAthleteStarredSegmentsParams) SetDefaults()

SetDefaults hydrates default values in the get logged in athlete starred segments params (not the query body).

All values with no default are reset to their zero value.

func (*GetLoggedInAthleteStarredSegmentsParams) SetHTTPClient

func (o *GetLoggedInAthleteStarredSegmentsParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get logged in athlete starred segments params

func (*GetLoggedInAthleteStarredSegmentsParams) SetPage

SetPage adds the page to the get logged in athlete starred segments params

func (*GetLoggedInAthleteStarredSegmentsParams) SetPerPage

func (o *GetLoggedInAthleteStarredSegmentsParams) SetPerPage(perPage *int64)

SetPerPage adds the perPage to the get logged in athlete starred segments params

func (*GetLoggedInAthleteStarredSegmentsParams) SetTimeout

func (o *GetLoggedInAthleteStarredSegmentsParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get logged in athlete starred segments params

func (*GetLoggedInAthleteStarredSegmentsParams) WithContext

WithContext adds the context to the get logged in athlete starred segments params

func (*GetLoggedInAthleteStarredSegmentsParams) WithDefaults

WithDefaults hydrates default values in the get logged in athlete starred segments params (not the query body).

All values with no default are reset to their zero value.

func (*GetLoggedInAthleteStarredSegmentsParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the get logged in athlete starred segments params

func (*GetLoggedInAthleteStarredSegmentsParams) WithPage

WithPage adds the page to the get logged in athlete starred segments params

func (*GetLoggedInAthleteStarredSegmentsParams) WithPerPage

WithPerPage adds the perPage to the get logged in athlete starred segments params

func (*GetLoggedInAthleteStarredSegmentsParams) WithTimeout

WithTimeout adds the timeout to the get logged in athlete starred segments params

func (*GetLoggedInAthleteStarredSegmentsParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetLoggedInAthleteStarredSegmentsReader

type GetLoggedInAthleteStarredSegmentsReader struct {
	// contains filtered or unexported fields
}

GetLoggedInAthleteStarredSegmentsReader is a Reader for the GetLoggedInAthleteStarredSegments structure.

func (*GetLoggedInAthleteStarredSegmentsReader) ReadResponse

func (o *GetLoggedInAthleteStarredSegmentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type GetSegmentByIDDefault

type GetSegmentByIDDefault struct {
	Payload *models.Fault
	// contains filtered or unexported fields
}

GetSegmentByIDDefault describes a response with status code -1, with default header values.

Unexpected error.

func NewGetSegmentByIDDefault

func NewGetSegmentByIDDefault(code int) *GetSegmentByIDDefault

NewGetSegmentByIDDefault creates a GetSegmentByIDDefault with default headers values

func (*GetSegmentByIDDefault) Code

func (o *GetSegmentByIDDefault) Code() int

Code gets the status code for the get segment by Id default response

func (*GetSegmentByIDDefault) Error

func (o *GetSegmentByIDDefault) Error() string

func (*GetSegmentByIDDefault) GetPayload

func (o *GetSegmentByIDDefault) GetPayload() *models.Fault

func (*GetSegmentByIDDefault) IsClientError

func (o *GetSegmentByIDDefault) IsClientError() bool

IsClientError returns true when this get segment by Id default response has a 4xx status code

func (*GetSegmentByIDDefault) IsCode

func (o *GetSegmentByIDDefault) IsCode(code int) bool

IsCode returns true when this get segment by Id default response a status code equal to that given

func (*GetSegmentByIDDefault) IsRedirect

func (o *GetSegmentByIDDefault) IsRedirect() bool

IsRedirect returns true when this get segment by Id default response has a 3xx status code

func (*GetSegmentByIDDefault) IsServerError

func (o *GetSegmentByIDDefault) IsServerError() bool

IsServerError returns true when this get segment by Id default response has a 5xx status code

func (*GetSegmentByIDDefault) IsSuccess

func (o *GetSegmentByIDDefault) IsSuccess() bool

IsSuccess returns true when this get segment by Id default response has a 2xx status code

func (*GetSegmentByIDDefault) String

func (o *GetSegmentByIDDefault) String() string

type GetSegmentByIDOK

type GetSegmentByIDOK struct {
	Payload *models.DetailedSegment
}

GetSegmentByIDOK describes a response with status code 200, with default header values.

Representation of a segment.

func NewGetSegmentByIDOK

func NewGetSegmentByIDOK() *GetSegmentByIDOK

NewGetSegmentByIDOK creates a GetSegmentByIDOK with default headers values

func (*GetSegmentByIDOK) Code

func (o *GetSegmentByIDOK) Code() int

Code gets the status code for the get segment by Id o k response

func (*GetSegmentByIDOK) Error

func (o *GetSegmentByIDOK) Error() string

func (*GetSegmentByIDOK) GetPayload

func (o *GetSegmentByIDOK) GetPayload() *models.DetailedSegment

func (*GetSegmentByIDOK) IsClientError

func (o *GetSegmentByIDOK) IsClientError() bool

IsClientError returns true when this get segment by Id o k response has a 4xx status code

func (*GetSegmentByIDOK) IsCode

func (o *GetSegmentByIDOK) IsCode(code int) bool

IsCode returns true when this get segment by Id o k response a status code equal to that given

func (*GetSegmentByIDOK) IsRedirect

func (o *GetSegmentByIDOK) IsRedirect() bool

IsRedirect returns true when this get segment by Id o k response has a 3xx status code

func (*GetSegmentByIDOK) IsServerError

func (o *GetSegmentByIDOK) IsServerError() bool

IsServerError returns true when this get segment by Id o k response has a 5xx status code

func (*GetSegmentByIDOK) IsSuccess

func (o *GetSegmentByIDOK) IsSuccess() bool

IsSuccess returns true when this get segment by Id o k response has a 2xx status code

func (*GetSegmentByIDOK) String

func (o *GetSegmentByIDOK) String() string

type GetSegmentByIDParams

type GetSegmentByIDParams struct {
	/* ID.

	   The identifier of the segment.

	   Format: int64
	*/
	ID int64

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetSegmentByIDParams contains all the parameters to send to the API endpoint

for the get segment by Id operation.

Typically these are written to a http.Request.

func NewGetSegmentByIDParams

func NewGetSegmentByIDParams() *GetSegmentByIDParams

NewGetSegmentByIDParams creates a new GetSegmentByIDParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetSegmentByIDParamsWithContext

func NewGetSegmentByIDParamsWithContext(ctx context.Context) *GetSegmentByIDParams

NewGetSegmentByIDParamsWithContext creates a new GetSegmentByIDParams object with the ability to set a context for a request.

func NewGetSegmentByIDParamsWithHTTPClient

func NewGetSegmentByIDParamsWithHTTPClient(client *http.Client) *GetSegmentByIDParams

NewGetSegmentByIDParamsWithHTTPClient creates a new GetSegmentByIDParams object with the ability to set a custom HTTPClient for a request.

func NewGetSegmentByIDParamsWithTimeout

func NewGetSegmentByIDParamsWithTimeout(timeout time.Duration) *GetSegmentByIDParams

NewGetSegmentByIDParamsWithTimeout creates a new GetSegmentByIDParams object with the ability to set a timeout on a request.

func (*GetSegmentByIDParams) SetContext

func (o *GetSegmentByIDParams) SetContext(ctx context.Context)

SetContext adds the context to the get segment by Id params

func (*GetSegmentByIDParams) SetDefaults

func (o *GetSegmentByIDParams) SetDefaults()

SetDefaults hydrates default values in the get segment by Id params (not the query body).

All values with no default are reset to their zero value.

func (*GetSegmentByIDParams) SetHTTPClient

func (o *GetSegmentByIDParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get segment by Id params

func (*GetSegmentByIDParams) SetID

func (o *GetSegmentByIDParams) SetID(id int64)

SetID adds the id to the get segment by Id params

func (*GetSegmentByIDParams) SetTimeout

func (o *GetSegmentByIDParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get segment by Id params

func (*GetSegmentByIDParams) WithContext

WithContext adds the context to the get segment by Id params

func (*GetSegmentByIDParams) WithDefaults

func (o *GetSegmentByIDParams) WithDefaults() *GetSegmentByIDParams

WithDefaults hydrates default values in the get segment by Id params (not the query body).

All values with no default are reset to their zero value.

func (*GetSegmentByIDParams) WithHTTPClient

func (o *GetSegmentByIDParams) WithHTTPClient(client *http.Client) *GetSegmentByIDParams

WithHTTPClient adds the HTTPClient to the get segment by Id params

func (*GetSegmentByIDParams) WithID

WithID adds the id to the get segment by Id params

func (*GetSegmentByIDParams) WithTimeout

func (o *GetSegmentByIDParams) WithTimeout(timeout time.Duration) *GetSegmentByIDParams

WithTimeout adds the timeout to the get segment by Id params

func (*GetSegmentByIDParams) WriteToRequest

func (o *GetSegmentByIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetSegmentByIDReader

type GetSegmentByIDReader struct {
	// contains filtered or unexported fields
}

GetSegmentByIDReader is a Reader for the GetSegmentByID structure.

func (*GetSegmentByIDReader) ReadResponse

func (o *GetSegmentByIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type StarSegmentDefault

type StarSegmentDefault struct {
	Payload *models.Fault
	// contains filtered or unexported fields
}

StarSegmentDefault describes a response with status code -1, with default header values.

Unexpected error.

func NewStarSegmentDefault

func NewStarSegmentDefault(code int) *StarSegmentDefault

NewStarSegmentDefault creates a StarSegmentDefault with default headers values

func (*StarSegmentDefault) Code

func (o *StarSegmentDefault) Code() int

Code gets the status code for the star segment default response

func (*StarSegmentDefault) Error

func (o *StarSegmentDefault) Error() string

func (*StarSegmentDefault) GetPayload

func (o *StarSegmentDefault) GetPayload() *models.Fault

func (*StarSegmentDefault) IsClientError

func (o *StarSegmentDefault) IsClientError() bool

IsClientError returns true when this star segment default response has a 4xx status code

func (*StarSegmentDefault) IsCode

func (o *StarSegmentDefault) IsCode(code int) bool

IsCode returns true when this star segment default response a status code equal to that given

func (*StarSegmentDefault) IsRedirect

func (o *StarSegmentDefault) IsRedirect() bool

IsRedirect returns true when this star segment default response has a 3xx status code

func (*StarSegmentDefault) IsServerError

func (o *StarSegmentDefault) IsServerError() bool

IsServerError returns true when this star segment default response has a 5xx status code

func (*StarSegmentDefault) IsSuccess

func (o *StarSegmentDefault) IsSuccess() bool

IsSuccess returns true when this star segment default response has a 2xx status code

func (*StarSegmentDefault) String

func (o *StarSegmentDefault) String() string

type StarSegmentOK

type StarSegmentOK struct {
	Payload *models.DetailedSegment
}

StarSegmentOK describes a response with status code 200, with default header values.

Representation of a segment.

func NewStarSegmentOK

func NewStarSegmentOK() *StarSegmentOK

NewStarSegmentOK creates a StarSegmentOK with default headers values

func (*StarSegmentOK) Code

func (o *StarSegmentOK) Code() int

Code gets the status code for the star segment o k response

func (*StarSegmentOK) Error

func (o *StarSegmentOK) Error() string

func (*StarSegmentOK) GetPayload

func (o *StarSegmentOK) GetPayload() *models.DetailedSegment

func (*StarSegmentOK) IsClientError

func (o *StarSegmentOK) IsClientError() bool

IsClientError returns true when this star segment o k response has a 4xx status code

func (*StarSegmentOK) IsCode

func (o *StarSegmentOK) IsCode(code int) bool

IsCode returns true when this star segment o k response a status code equal to that given

func (*StarSegmentOK) IsRedirect

func (o *StarSegmentOK) IsRedirect() bool

IsRedirect returns true when this star segment o k response has a 3xx status code

func (*StarSegmentOK) IsServerError

func (o *StarSegmentOK) IsServerError() bool

IsServerError returns true when this star segment o k response has a 5xx status code

func (*StarSegmentOK) IsSuccess

func (o *StarSegmentOK) IsSuccess() bool

IsSuccess returns true when this star segment o k response has a 2xx status code

func (*StarSegmentOK) String

func (o *StarSegmentOK) String() string

type StarSegmentParams

type StarSegmentParams struct {
	/* ID.

	   The identifier of the segment to star.

	   Format: int64
	*/
	ID int64

	/* Starred.

	   If true, star the segment; if false, unstar the segment.
	*/
	Starred bool

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

StarSegmentParams contains all the parameters to send to the API endpoint

for the star segment operation.

Typically these are written to a http.Request.

func NewStarSegmentParams

func NewStarSegmentParams() *StarSegmentParams

NewStarSegmentParams creates a new StarSegmentParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewStarSegmentParamsWithContext

func NewStarSegmentParamsWithContext(ctx context.Context) *StarSegmentParams

NewStarSegmentParamsWithContext creates a new StarSegmentParams object with the ability to set a context for a request.

func NewStarSegmentParamsWithHTTPClient

func NewStarSegmentParamsWithHTTPClient(client *http.Client) *StarSegmentParams

NewStarSegmentParamsWithHTTPClient creates a new StarSegmentParams object with the ability to set a custom HTTPClient for a request.

func NewStarSegmentParamsWithTimeout

func NewStarSegmentParamsWithTimeout(timeout time.Duration) *StarSegmentParams

NewStarSegmentParamsWithTimeout creates a new StarSegmentParams object with the ability to set a timeout on a request.

func (*StarSegmentParams) SetContext

func (o *StarSegmentParams) SetContext(ctx context.Context)

SetContext adds the context to the star segment params

func (*StarSegmentParams) SetDefaults

func (o *StarSegmentParams) SetDefaults()

SetDefaults hydrates default values in the star segment params (not the query body).

All values with no default are reset to their zero value.

func (*StarSegmentParams) SetHTTPClient

func (o *StarSegmentParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the star segment params

func (*StarSegmentParams) SetID

func (o *StarSegmentParams) SetID(id int64)

SetID adds the id to the star segment params

func (*StarSegmentParams) SetStarred

func (o *StarSegmentParams) SetStarred(starred bool)

SetStarred adds the starred to the star segment params

func (*StarSegmentParams) SetTimeout

func (o *StarSegmentParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the star segment params

func (*StarSegmentParams) WithContext

func (o *StarSegmentParams) WithContext(ctx context.Context) *StarSegmentParams

WithContext adds the context to the star segment params

func (*StarSegmentParams) WithDefaults

func (o *StarSegmentParams) WithDefaults() *StarSegmentParams

WithDefaults hydrates default values in the star segment params (not the query body).

All values with no default are reset to their zero value.

func (*StarSegmentParams) WithHTTPClient

func (o *StarSegmentParams) WithHTTPClient(client *http.Client) *StarSegmentParams

WithHTTPClient adds the HTTPClient to the star segment params

func (*StarSegmentParams) WithID

func (o *StarSegmentParams) WithID(id int64) *StarSegmentParams

WithID adds the id to the star segment params

func (*StarSegmentParams) WithStarred

func (o *StarSegmentParams) WithStarred(starred bool) *StarSegmentParams

WithStarred adds the starred to the star segment params

func (*StarSegmentParams) WithTimeout

func (o *StarSegmentParams) WithTimeout(timeout time.Duration) *StarSegmentParams

WithTimeout adds the timeout to the star segment params

func (*StarSegmentParams) WriteToRequest

func (o *StarSegmentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type StarSegmentReader

type StarSegmentReader struct {
	// contains filtered or unexported fields
}

StarSegmentReader is a Reader for the StarSegment structure.

func (*StarSegmentReader) ReadResponse

func (o *StarSegmentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL