sensor

package
v0.0.0-...-ef3c1f2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: MIT Imports: 10 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 sensor API

func (*Client) GetOrganizationSensorReadingsHistory

func (a *Client) GetOrganizationSensorReadingsHistory(params *GetOrganizationSensorReadingsHistoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOrganizationSensorReadingsHistoryOK, error)

GetOrganizationSensorReadingsHistory returns all reported readings from sensors in a given timespan sorted by timestamp

Return all reported readings from sensors in a given timespan, sorted by timestamp

func (*Client) GetOrganizationSensorReadingsLatest

func (a *Client) GetOrganizationSensorReadingsLatest(params *GetOrganizationSensorReadingsLatestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOrganizationSensorReadingsLatestOK, error)

GetOrganizationSensorReadingsLatest returns the latest available reading for each metric from each sensor sorted by sensor serial

Return the latest available reading for each metric from each sensor, sorted by sensor serial

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	GetOrganizationSensorReadingsHistory(params *GetOrganizationSensorReadingsHistoryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOrganizationSensorReadingsHistoryOK, error)

	GetOrganizationSensorReadingsLatest(params *GetOrganizationSensorReadingsLatestParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetOrganizationSensorReadingsLatestOK, 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 sensor API client.

type GetOrganizationSensorReadingsHistoryOK

type GetOrganizationSensorReadingsHistoryOK struct {

	/* A comma-separated list of first, last, prev, and next relative links used for subsequent paginated requests.
	 */
	Link string

	Payload []interface{}
}
GetOrganizationSensorReadingsHistoryOK describes a response with status code 200, with default header values.

Successful operation

func NewGetOrganizationSensorReadingsHistoryOK

func NewGetOrganizationSensorReadingsHistoryOK() *GetOrganizationSensorReadingsHistoryOK

NewGetOrganizationSensorReadingsHistoryOK creates a GetOrganizationSensorReadingsHistoryOK with default headers values

func (*GetOrganizationSensorReadingsHistoryOK) Error

func (*GetOrganizationSensorReadingsHistoryOK) GetPayload

func (o *GetOrganizationSensorReadingsHistoryOK) GetPayload() []interface{}

type GetOrganizationSensorReadingsHistoryParams

type GetOrganizationSensorReadingsHistoryParams struct {

	/* EndingBefore.

	   A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
	*/
	EndingBefore *string

	/* Metrics.

	   Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved. Allowed values are temperature, humidity, water, door, tvoc, pm25, noise, indoorAirQuality, button, and battery.
	*/
	Metrics []string

	/* NetworkIds.

	   Optional parameter to filter readings by network.
	*/
	NetworkIds []string

	// OrganizationID.
	OrganizationID string

	/* PerPage.

	   The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
	*/
	PerPage *int64

	/* Serials.

	   Optional parameter to filter readings by sensor.
	*/
	Serials []string

	/* StartingAfter.

	   A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
	*/
	StartingAfter *string

	/* T0.

	   The beginning of the timespan for the data. The maximum lookback period is 365 days and 6 hours from today.
	*/
	T0 *string

	/* T1.

	   The end of the timespan for the data. t1 can be a maximum of 7 days after t0.
	*/
	T1 *string

	/* Timespan.

	   The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 7 days. The default is 2 hours.

	   Format: float
	*/
	Timespan *float32

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

GetOrganizationSensorReadingsHistoryParams contains all the parameters to send to the API endpoint

for the get organization sensor readings history operation.

Typically these are written to a http.Request.

func NewGetOrganizationSensorReadingsHistoryParams

func NewGetOrganizationSensorReadingsHistoryParams() *GetOrganizationSensorReadingsHistoryParams

NewGetOrganizationSensorReadingsHistoryParams creates a new GetOrganizationSensorReadingsHistoryParams 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 NewGetOrganizationSensorReadingsHistoryParamsWithContext

func NewGetOrganizationSensorReadingsHistoryParamsWithContext(ctx context.Context) *GetOrganizationSensorReadingsHistoryParams

NewGetOrganizationSensorReadingsHistoryParamsWithContext creates a new GetOrganizationSensorReadingsHistoryParams object with the ability to set a context for a request.

func NewGetOrganizationSensorReadingsHistoryParamsWithHTTPClient

func NewGetOrganizationSensorReadingsHistoryParamsWithHTTPClient(client *http.Client) *GetOrganizationSensorReadingsHistoryParams

NewGetOrganizationSensorReadingsHistoryParamsWithHTTPClient creates a new GetOrganizationSensorReadingsHistoryParams object with the ability to set a custom HTTPClient for a request.

func NewGetOrganizationSensorReadingsHistoryParamsWithTimeout

func NewGetOrganizationSensorReadingsHistoryParamsWithTimeout(timeout time.Duration) *GetOrganizationSensorReadingsHistoryParams

NewGetOrganizationSensorReadingsHistoryParamsWithTimeout creates a new GetOrganizationSensorReadingsHistoryParams object with the ability to set a timeout on a request.

func (*GetOrganizationSensorReadingsHistoryParams) SetContext

SetContext adds the context to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetDefaults

SetDefaults hydrates default values in the get organization sensor readings history params (not the query body).

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

func (*GetOrganizationSensorReadingsHistoryParams) SetEndingBefore

func (o *GetOrganizationSensorReadingsHistoryParams) SetEndingBefore(endingBefore *string)

SetEndingBefore adds the endingBefore to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetMetrics

func (o *GetOrganizationSensorReadingsHistoryParams) SetMetrics(metrics []string)

SetMetrics adds the metrics to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetNetworkIds

func (o *GetOrganizationSensorReadingsHistoryParams) SetNetworkIds(networkIds []string)

SetNetworkIds adds the networkIds to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetOrganizationID

func (o *GetOrganizationSensorReadingsHistoryParams) SetOrganizationID(organizationID string)

SetOrganizationID adds the organizationId to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetPerPage

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

SetPerPage adds the perPage to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetSerials

func (o *GetOrganizationSensorReadingsHistoryParams) SetSerials(serials []string)

SetSerials adds the serials to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetStartingAfter

func (o *GetOrganizationSensorReadingsHistoryParams) SetStartingAfter(startingAfter *string)

SetStartingAfter adds the startingAfter to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetT0

SetT0 adds the t0 to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetT1

SetT1 adds the t1 to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetTimeout

SetTimeout adds the timeout to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) SetTimespan

func (o *GetOrganizationSensorReadingsHistoryParams) SetTimespan(timespan *float32)

SetTimespan adds the timespan to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithContext

WithContext adds the context to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithDefaults

WithDefaults hydrates default values in the get organization sensor readings history params (not the query body).

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

func (*GetOrganizationSensorReadingsHistoryParams) WithEndingBefore

WithEndingBefore adds the endingBefore to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithMetrics

WithMetrics adds the metrics to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithNetworkIds

WithNetworkIds adds the networkIds to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithOrganizationID

WithOrganizationID adds the organizationID to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithPerPage

WithPerPage adds the perPage to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithSerials

WithSerials adds the serials to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithStartingAfter

WithStartingAfter adds the startingAfter to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithT0

WithT0 adds the t0 to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithT1

WithT1 adds the t1 to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithTimeout

WithTimeout adds the timeout to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WithTimespan

WithTimespan adds the timespan to the get organization sensor readings history params

func (*GetOrganizationSensorReadingsHistoryParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetOrganizationSensorReadingsHistoryReader

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

GetOrganizationSensorReadingsHistoryReader is a Reader for the GetOrganizationSensorReadingsHistory structure.

func (*GetOrganizationSensorReadingsHistoryReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetOrganizationSensorReadingsLatestOK

type GetOrganizationSensorReadingsLatestOK struct {

	/* A comma-separated list of first, last, prev, and next relative links used for subsequent paginated requests.
	 */
	Link string

	Payload []interface{}
}
GetOrganizationSensorReadingsLatestOK describes a response with status code 200, with default header values.

Successful operation

func NewGetOrganizationSensorReadingsLatestOK

func NewGetOrganizationSensorReadingsLatestOK() *GetOrganizationSensorReadingsLatestOK

NewGetOrganizationSensorReadingsLatestOK creates a GetOrganizationSensorReadingsLatestOK with default headers values

func (*GetOrganizationSensorReadingsLatestOK) Error

func (*GetOrganizationSensorReadingsLatestOK) GetPayload

func (o *GetOrganizationSensorReadingsLatestOK) GetPayload() []interface{}

type GetOrganizationSensorReadingsLatestParams

type GetOrganizationSensorReadingsLatestParams struct {

	/* EndingBefore.

	   A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
	*/
	EndingBefore *string

	/* Metrics.

	   Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved. Allowed values are temperature, humidity, water, door, tvoc, pm25, noise, indoorAirQuality, button, and battery.
	*/
	Metrics []string

	/* NetworkIds.

	   Optional parameter to filter readings by network.
	*/
	NetworkIds []string

	// OrganizationID.
	OrganizationID string

	/* PerPage.

	   The number of entries per page returned. Acceptable range is 3 - 100. Default is 100.
	*/
	PerPage *int64

	/* Serials.

	   Optional parameter to filter readings by sensor.
	*/
	Serials []string

	/* StartingAfter.

	   A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
	*/
	StartingAfter *string

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

GetOrganizationSensorReadingsLatestParams contains all the parameters to send to the API endpoint

for the get organization sensor readings latest operation.

Typically these are written to a http.Request.

func NewGetOrganizationSensorReadingsLatestParams

func NewGetOrganizationSensorReadingsLatestParams() *GetOrganizationSensorReadingsLatestParams

NewGetOrganizationSensorReadingsLatestParams creates a new GetOrganizationSensorReadingsLatestParams 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 NewGetOrganizationSensorReadingsLatestParamsWithContext

func NewGetOrganizationSensorReadingsLatestParamsWithContext(ctx context.Context) *GetOrganizationSensorReadingsLatestParams

NewGetOrganizationSensorReadingsLatestParamsWithContext creates a new GetOrganizationSensorReadingsLatestParams object with the ability to set a context for a request.

func NewGetOrganizationSensorReadingsLatestParamsWithHTTPClient

func NewGetOrganizationSensorReadingsLatestParamsWithHTTPClient(client *http.Client) *GetOrganizationSensorReadingsLatestParams

NewGetOrganizationSensorReadingsLatestParamsWithHTTPClient creates a new GetOrganizationSensorReadingsLatestParams object with the ability to set a custom HTTPClient for a request.

func NewGetOrganizationSensorReadingsLatestParamsWithTimeout

func NewGetOrganizationSensorReadingsLatestParamsWithTimeout(timeout time.Duration) *GetOrganizationSensorReadingsLatestParams

NewGetOrganizationSensorReadingsLatestParamsWithTimeout creates a new GetOrganizationSensorReadingsLatestParams object with the ability to set a timeout on a request.

func (*GetOrganizationSensorReadingsLatestParams) SetContext

SetContext adds the context to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) SetDefaults

SetDefaults hydrates default values in the get organization sensor readings latest params (not the query body).

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

func (*GetOrganizationSensorReadingsLatestParams) SetEndingBefore

func (o *GetOrganizationSensorReadingsLatestParams) SetEndingBefore(endingBefore *string)

SetEndingBefore adds the endingBefore to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) SetMetrics

func (o *GetOrganizationSensorReadingsLatestParams) SetMetrics(metrics []string)

SetMetrics adds the metrics to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) SetNetworkIds

func (o *GetOrganizationSensorReadingsLatestParams) SetNetworkIds(networkIds []string)

SetNetworkIds adds the networkIds to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) SetOrganizationID

func (o *GetOrganizationSensorReadingsLatestParams) SetOrganizationID(organizationID string)

SetOrganizationID adds the organizationId to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) SetPerPage

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

SetPerPage adds the perPage to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) SetSerials

func (o *GetOrganizationSensorReadingsLatestParams) SetSerials(serials []string)

SetSerials adds the serials to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) SetStartingAfter

func (o *GetOrganizationSensorReadingsLatestParams) SetStartingAfter(startingAfter *string)

SetStartingAfter adds the startingAfter to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) SetTimeout

SetTimeout adds the timeout to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) WithContext

WithContext adds the context to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) WithDefaults

WithDefaults hydrates default values in the get organization sensor readings latest params (not the query body).

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

func (*GetOrganizationSensorReadingsLatestParams) WithEndingBefore

WithEndingBefore adds the endingBefore to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) WithMetrics

WithMetrics adds the metrics to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) WithNetworkIds

WithNetworkIds adds the networkIds to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) WithOrganizationID

WithOrganizationID adds the organizationID to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) WithPerPage

WithPerPage adds the perPage to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) WithSerials

WithSerials adds the serials to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) WithStartingAfter

WithStartingAfter adds the startingAfter to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) WithTimeout

WithTimeout adds the timeout to the get organization sensor readings latest params

func (*GetOrganizationSensorReadingsLatestParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetOrganizationSensorReadingsLatestReader

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

GetOrganizationSensorReadingsLatestReader is a Reader for the GetOrganizationSensorReadingsLatest structure.

func (*GetOrganizationSensorReadingsLatestReader) ReadResponse

func (o *GetOrganizationSensorReadingsLatestReader) 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