Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type Action
- type AdhocMessage
- type AdhocMessageTemplate
- type App
- type AppClassification
- type AppDeviceDetails
- type AppOAuth
- type AppTargetStatus
- type AppType
- type AppUiSettings
- type AppsApiService
- func (a *AppsApiService) CreateApp(ctx _context.Context, authorization string, ...) (CreateAppResponse, *_nethttp.Response, error)
- func (a *AppsApiService) DeleteApp(ctx _context.Context, authorization string, appNameOrId string) (map[string]interface{}, *_nethttp.Response, error)
- func (a *AppsApiService) GenerateAppOauth(ctx _context.Context, authorization string, appNameOrId string, ...) (GenerateAppOAuthResponse, *_nethttp.Response, error)
- func (a *AppsApiService) GetApp(ctx _context.Context, authorization string, appNameOrId string) (App, *_nethttp.Response, error)
- func (a *AppsApiService) GetAppOauth(ctx _context.Context, authorization string, appNameOrId string) (AppOAuth, *_nethttp.Response, error)
- func (a *AppsApiService) GetAppSettings(ctx _context.Context, authorization string, appNameOrId string) (GetAppSettingsResponse, *_nethttp.Response, error)
- func (a *AppsApiService) ListApps(ctx _context.Context, authorization string, localVarOptionals *ListAppsOpts) (PagedApps, *_nethttp.Response, error)
- func (a *AppsApiService) Register(ctx _context.Context, authorization string, appNameOrId string, ...) (map[string]interface{}, *_nethttp.Response, error)
- func (a *AppsApiService) UpdateApp(ctx _context.Context, authorization string, appNameOrId string, ...) (App, *_nethttp.Response, error)
- func (a *AppsApiService) UpdateAppOauth(ctx _context.Context, authorization string, appNameOrId string, ...) (AppOAuth, *_nethttp.Response, error)
- func (a *AppsApiService) UpdateAppSettings(ctx _context.Context, authorization string, appNameOrId string, ...) (UpdateAppSettingsResponse, *_nethttp.Response, error)
- func (a *AppsApiService) UpdateSignatureType(ctx _context.Context, authorization string, appNameOrId string, ...) (map[string]interface{}, *_nethttp.Response, error)
- type Argument
- type ArrayOperand
- type AttributeProperties
- type AttributePropertiesData
- type AttributePropertiesUnit
- type AttributeSchema
- type AttributeState
- type BasicAuth
- type BetweenCondition
- type CapabilityAttribute
- type CapabilityAttributeEnumCommands
- type CapabilityCommand
- type CapabilityReference
- type CapabilitySubscriptionDetail
- type CapabilitySummary
- type ChangesCondition
- type CommandAction
- type ComponentTranslations
- type Condition
- type ConditionAggregationMode
- type ConfigEntry
- type Configuration
- type CreateAppOpts
- type CreateAppRequest
- type CreateAppResponse
- type CreateDeviceProfileOpts
- type CreateDeviceProfileRequest
- type CreateInstalledAppEventsRequest
- type CreateLocationRequest
- type CreateOrUpdateLambdaSmartAppRequest
- type CreateOrUpdateWebhookSmartAppRequest
- type CreateRoomRequest
- type CreateScheduleOpts
- type CronSchedule
- type DashboardCardLifecycle
- type DateOperand
- type DateTimeOperand
- type DayOfWeek
- type DeleteAllSubscriptionsOpts
- type DeleteInstalledAppResponse
- type Device
- type DeviceActivity
- type DeviceCategory
- type DeviceCommand
- type DeviceCommandsEvent
- type DeviceCommandsEventCommand
- type DeviceCommandsRequest
- type DeviceComponent
- type DeviceComponentReference
- type DeviceConfig
- type DeviceEvent
- type DeviceEventsRequest
- type DeviceHealthDetail
- type DeviceHealthEvent
- type DeviceInstallRequest
- type DeviceInstallRequestApp
- type DeviceIntegrationType
- type DeviceLifecycle
- type DeviceLifecycleDetail
- type DeviceLifecycleEvent
- type DeviceLifecycleMove
- type DeviceNetworkSecurityLevel
- type DeviceOperand
- type DeviceProfile
- type DeviceProfileReference
- type DeviceProfileStatus
- type DeviceResults
- type DeviceStateEvent
- type DeviceStatus
- type DeviceSubscriptionDetail
- type DeviceprofilesApiService
- func (a *DeviceprofilesApiService) CreateDeviceProfile(ctx _context.Context, authorization string, ...) (DeviceProfile, *_nethttp.Response, error)
- func (a *DeviceprofilesApiService) DeleteDeviceProfile(ctx _context.Context, authorization string, deviceProfileId string) (map[string]interface{}, *_nethttp.Response, error)
- func (a *DeviceprofilesApiService) GetDeviceProfile(ctx _context.Context, authorization string, deviceProfileId string, ...) (DeviceProfile, *_nethttp.Response, error)
- func (a *DeviceprofilesApiService) ListDeviceProfiles(ctx _context.Context, authorization string, ...) (PagedDeviceProfiles, *_nethttp.Response, error)
- func (a *DeviceprofilesApiService) UpdateDeviceProfile(ctx _context.Context, authorization string, deviceProfileId string, ...) (DeviceProfile, *_nethttp.Response, error)
- type DevicesApiService
- func (a *DevicesApiService) CreateDeviceEvents(ctx _context.Context, authorization string, deviceId string, ...) (map[string]interface{}, *_nethttp.Response, error)
- func (a *DevicesApiService) DeleteDevice(ctx _context.Context, authorization string, deviceId string) (map[string]interface{}, *_nethttp.Response, error)
- func (a *DevicesApiService) ExecuteDeviceCommands(ctx _context.Context, authorization string, deviceId string, ...) (map[string]interface{}, *_nethttp.Response, error)
- func (a *DevicesApiService) GetDevice(ctx _context.Context, authorization string, deviceId string) (Device, *_nethttp.Response, error)
- func (a *DevicesApiService) GetDeviceComponentStatus(ctx _context.Context, authorization string, deviceId string, ...) (map[string]map[string]AttributeState, *_nethttp.Response, error)
- func (a *DevicesApiService) GetDeviceStatus(ctx _context.Context, authorization string, deviceId string) (DeviceStatus, *_nethttp.Response, error)
- func (a *DevicesApiService) GetDeviceStatusByCapability(ctx _context.Context, authorization string, deviceId string, ...) (map[string]AttributeState, *_nethttp.Response, error)
- func (a *DevicesApiService) GetDevices(ctx _context.Context, authorization string, localVarOptionals *GetDevicesOpts) (PagedDevices, *_nethttp.Response, error)
- func (a *DevicesApiService) InstallDevice(ctx _context.Context, authorization string, ...) (Device, *_nethttp.Response, error)
- func (a *DevicesApiService) UpdateDevice(ctx _context.Context, authorization string, deviceId string, ...) (Device, *_nethttp.Response, error)
- type DthDeviceDetails
- type EndpointApp
- type EqualsCondition
- type Error
- type ErrorResponse
- type EventType
- type EveryAction
- type ExecuteSceneOpts
- type ExecutionResult
- type GenerateAppOAuthRequest
- type GenerateAppOAuthResponse
- type GenericOpenAPIError
- type GetAppSettingsResponse
- type GetDeviceProfileOpts
- type GetDevicesOpts
- type GreaterThanCondition
- type GreaterThanOrEqualsCondition
- type HubHealthDetail
- type HubHealthEvent
- type IconImage
- type IfAction
- type IfActionAllOf
- type InstallConfiguration
- type InstallConfigurationDetail
- type InstallConfigurationStatus
- type InstalledApp
- type InstalledAppIconImage
- type InstalledAppLifecycle
- type InstalledAppLifecycleError
- type InstalledAppLifecycleEvent
- type InstalledAppStatus
- type InstalledAppType
- type InstalledAppUi
- type InstalledappsApiService
- func (a *InstalledappsApiService) CreateInstalledAppEvents(ctx _context.Context, authorization string, installedAppId string, ...) (map[string]interface{}, *_nethttp.Response, error)
- func (a *InstalledappsApiService) DeleteInstallation(ctx _context.Context, authorization string, installedAppId string) (DeleteInstalledAppResponse, *_nethttp.Response, error)
- func (a *InstalledappsApiService) GetInstallation(ctx _context.Context, authorization string, installedAppId string) (InstalledApp, *_nethttp.Response, error)
- func (a *InstalledappsApiService) GetInstallationConfig(ctx _context.Context, authorization string, installedAppId string, ...) (InstallConfigurationDetail, *_nethttp.Response, error)
- func (a *InstalledappsApiService) ListInstallationConfig(ctx _context.Context, authorization string, installedAppId string, ...) (PagedInstallConfigurations, *_nethttp.Response, error)
- func (a *InstalledappsApiService) ListInstallations(ctx _context.Context, authorization string, ...) (PagedInstalledApps, *_nethttp.Response, error)
- type Interval
- type IntervalUnit
- type IrDeviceDetails
- type IrDeviceDetailsFunctionCodes
- type IsaResults
- type LambdaSmartApp
- type LessThanCondition
- type LessThanOrEqualsCondition
- type Link
- type Links
- type ListAppsOpts
- type ListDeviceProfilesOpts
- type ListInstallationConfigOpts
- type ListInstallationsOpts
- type ListRulesOpts
- type ListScenesOpts
- type LocaleReference
- type LocaleVariables
- type Location
- type LocationAction
- type LocationAttribute
- type LocationOperand
- type LocationsApiService
- func (a *LocationsApiService) CreateLocation(ctx _context.Context, authorization string, ...) (Location, *_nethttp.Response, error)
- func (a *LocationsApiService) DeleteLocation(ctx _context.Context, authorization string, locationId string) (map[string]interface{}, *_nethttp.Response, error)
- func (a *LocationsApiService) GetLocation(ctx _context.Context, authorization string, locationId string) (Location, *_nethttp.Response, error)
- func (a *LocationsApiService) ListLocations(ctx _context.Context, authorization string) (PagedLocations, *_nethttp.Response, error)
- func (a *LocationsApiService) UpdateLocation(ctx _context.Context, authorization string, locationId string, ...) (Location, *_nethttp.Response, error)
- type Message
- type MessageConfig
- type MessageTemplate
- type MessageType
- type Mode
- type ModeConfig
- type ModeEvent
- type ModeSubscriptionDetail
- type Notice
- type NoticeAction
- type NoticeCode
- type OnceSchedule
- type Operand
- type OperandAggregationMode
- type Owner
- type PagedApp
- type PagedApps
- type PagedDeviceProfiles
- type PagedDevices
- type PagedInstallConfigurations
- type PagedInstalledApps
- type PagedLocation
- type PagedLocations
- type PagedMessageTemplate
- type PagedRooms
- type PagedRules
- type PagedSchedules
- type PagedSubscriptions
- type ParentType
- type PermissionConfig
- type PredefinedMessage
- type PrincipalType
- type Room
- type RoomsApiService
- func (a *RoomsApiService) CreateRoom(ctx _context.Context, authorization string, locationId string, ...) (Room, *_nethttp.Response, error)
- func (a *RoomsApiService) DeleteRoom(ctx _context.Context, authorization string, locationId string, roomId string) (map[string]interface{}, *_nethttp.Response, error)
- func (a *RoomsApiService) GetRoom(ctx _context.Context, authorization string, locationId string, roomId string) (Room, *_nethttp.Response, error)
- func (a *RoomsApiService) ListRooms(ctx _context.Context, authorization string, locationId string) (PagedRooms, *_nethttp.Response, error)
- func (a *RoomsApiService) UpdateRoom(ctx _context.Context, authorization string, locationId string, roomId string, ...) (Room, *_nethttp.Response, error)
- type Rule
- type RuleAllOf
- type RuleExecutionResponse
- type RuleMetadata
- type RuleRequest
- type RulesApiService
- func (a *RulesApiService) CreateRule(ctx _context.Context, authorization string, locationId string, ...) (map[string]interface{}, *_nethttp.Response, error)
- func (a *RulesApiService) DeleteRule(ctx _context.Context, authorization string, ruleId string, locationId string) (Rule, *_nethttp.Response, error)
- func (a *RulesApiService) ExecuteRule(ctx _context.Context, authorization string, ruleId string, locationId string) (RuleExecutionResponse, *_nethttp.Response, error)
- func (a *RulesApiService) GetRule(ctx _context.Context, authorization string, ruleId string, locationId string) (Rule, *_nethttp.Response, error)
- func (a *RulesApiService) ListRules(ctx _context.Context, authorization string, locationId string, ...) (PagedRules, *_nethttp.Response, error)
- func (a *RulesApiService) UpdateRule(ctx _context.Context, authorization string, ruleId string, locationId string, ...) (Rule, *_nethttp.Response, error)
- type SaveSubscriptionOpts
- type SceneAction
- type SceneArgument
- type SceneCapability
- type SceneCommand
- type SceneComponent
- type SceneConfig
- type SceneDevice
- type SceneDeviceGroup
- type SceneDeviceGroupRequest
- type SceneDeviceRequest
- type SceneLifecycle
- type SceneLifecycleDetail
- type SceneLifecycleEvent
- type SceneMode
- type SceneModeRequest
- type ScenePagedResult
- type SceneRequest
- type SceneSecurityModeRequest
- type SceneSleepRequest
- type SceneSummary
- type ScenesApiService
- func (a *ScenesApiService) ExecuteScene(ctx _context.Context, authorization string, sceneId string, ...) (StandardSuccessResponse, *_nethttp.Response, error)
- func (a *ScenesApiService) ListScenes(ctx _context.Context, authorization string, localVarOptionals *ListScenesOpts) (ScenePagedResult, *_nethttp.Response, error)
- type Schedule
- type ScheduleRequest
- type SchedulesApiService
- func (a *SchedulesApiService) CreateSchedule(ctx _context.Context, installedAppId string, authorization string, ...) (Schedule, *_nethttp.Response, error)
- func (a *SchedulesApiService) DeleteSchedule(ctx _context.Context, installedAppId string, scheduleName string, ...) (map[string]interface{}, *_nethttp.Response, error)
- func (a *SchedulesApiService) DeleteSchedules(ctx _context.Context, installedAppId string, authorization string) (map[string]interface{}, *_nethttp.Response, error)
- func (a *SchedulesApiService) GetSchedule(ctx _context.Context, installedAppId string, scheduleName string, ...) (Schedule, *_nethttp.Response, error)
- func (a *SchedulesApiService) GetSchedules(ctx _context.Context, installedAppId string, authorization string) (PagedSchedules, *_nethttp.Response, error)
- type SecurityArmStateDetail
- type SecurityArmStateEvent
- type ServerConfiguration
- type ServerVariable
- type SignatureType
- type SimpleCondition
- type SimpleValue
- type SingleOperandCondition
- type SleepAction
- type SmartAppDashboardCardEventRequest
- type SmartAppEventRequest
- type StandardSuccessResponse
- type StringConfig
- type Subscription
- type SubscriptionDelete
- type SubscriptionFilter
- type SubscriptionFilterTypes
- type SubscriptionMode
- type SubscriptionRequest
- type SubscriptionSource
- type SubscriptionTarget
- type SubscriptionsApiService
- func (a *SubscriptionsApiService) DeleteAllSubscriptions(ctx _context.Context, installedAppId string, authorization string, ...) (SubscriptionDelete, *_nethttp.Response, error)
- func (a *SubscriptionsApiService) DeleteSubscription(ctx _context.Context, installedAppId string, subscriptionId string, ...) (SubscriptionDelete, *_nethttp.Response, error)
- func (a *SubscriptionsApiService) GetSubscription(ctx _context.Context, installedAppId string, subscriptionId string, ...) (Subscription, *_nethttp.Response, error)
- func (a *SubscriptionsApiService) ListSubscriptions(ctx _context.Context, installedAppId string, authorization string) (PagedSubscriptions, *_nethttp.Response, error)
- func (a *SubscriptionsApiService) SaveSubscription(ctx _context.Context, installedAppId string, authorization string, ...) (Subscription, *_nethttp.Response, error)
- type TimeOperand
- type TimeReference
- type TimerEvent
- type TimerType
- type UpdateAppOAuthRequest
- type UpdateAppOpts
- type UpdateAppRequest
- type UpdateAppSettingsRequest
- type UpdateAppSettingsResponse
- type UpdateDeviceProfileOpts
- type UpdateDeviceProfileRequest
- type UpdateDeviceRequest
- type UpdateDeviceRequestComponents
- type UpdateLocationRequest
- type UpdateRoomRequest
- type UpdateSignatureTypeRequest
- type ViperDeviceDetails
- type WebhookSmartApp
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { AppsApi *AppsApiService DeviceprofilesApi *DeviceprofilesApiService DevicesApi *DevicesApiService InstalledappsApi *InstalledappsApiService LocationsApi *LocationsApiService RoomsApi *RoomsApiService RulesApi *RulesApiService ScenesApi *ScenesApiService SchedulesApi *SchedulesApiService SubscriptionsApi *SubscriptionsApiService // contains filtered or unexported fields }
APIClient manages communication with the SmartThings API API v1.0-PREVIEW In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
ChangeBasePath changes base path to allow switching to mocks
func (*APIClient) GetConfig ¶
func (c *APIClient) GetConfig() *Configuration
Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
APIResponse stores the API response returned by the server.
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
NewAPIResponse returns a new APIResonse object.
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
type Action ¶
type Action struct { If IfAction `json:"if,omitempty"` Sleep SleepAction `json:"sleep,omitempty"` Command CommandAction `json:"command,omitempty"` Every EveryAction `json:"every,omitempty"` Location LocationAction `json:"location,omitempty"` }
Action struct for Action
type AdhocMessage ¶
type AdhocMessage struct { // The tag of the locale as defined in [RFC bcp47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt). FallbackLocale string `json:"fallbackLocale"` // A map<string,string> with the key representing the variable name, and the value representing the verbiage to be replaced in template string. `defaultVariables` will only be used if there are no matching locale-level (template) variables for that key. DefaultVariables map[string]string `json:"defaultVariables,omitempty"` // A list of templates representing the same message in different languages. Templates []AdhocMessageTemplate `json:"templates"` }
AdhocMessage An adhoc message contains a list of message templates representing the same message in different locales. The system will serve the template with the locale that best matches the Recipient's language preferences. If the user's language preferences do not correlate to any message templates, the template defined by the `fallbackLocale` will be used. Variables from the template matching the locale of the Message will be assigned first, then `defaultVariables`.
type AdhocMessageTemplate ¶
type AdhocMessageTemplate struct { // The tag of the locale as defined in [RFC bcp47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt). LocaleTag string `json:"localeTag"` // A map<string,string> with the key representing the variable name, and the value representing the verbiage to be replaced in template string. Variables map[string]string `json:"variables,omitempty"` // A message template string. Specify variables using the double curly braces convention. i.e. \"Hello, {{ firstName }}!\" Template string `json:"template"` }
AdhocMessageTemplate A message template definition, representing a message in a specific locale and it's variables.
type App ¶
type App struct { // A user defined unique identifier for an app. It is alpha-numeric, may contain dashes, underscores, periods, and be less then 250 characters long. It must be unique within your account. AppName string `json:"appName,omitempty"` // A globally unique identifier for an app. AppId string `json:"appId,omitempty"` AppType AppType `json:"appType,omitempty"` PrincipalType PrincipalType `json:"principalType,omitempty"` // An App maybe associated to many classifications. A classification drives how the integration is presented to the user in the SmartThings mobile clients. These classifications include: * AUTOMATION - Denotes an integration that should display under the \"Automation\" tab in mobile clients. * SERVICE - Denotes an integration that is classified as a \"Service\". * DEVICE - Denotes an integration that should display under the \"Device\" tab in mobile clients. * CONNECTED_SERVICE - Denotes an integration that should display under the \"Connected Services\" menu in mobile clients. * HIDDEN - Denotes an integration that should not display in mobile clients Classifications []AppClassification `json:"classifications,omitempty"` // A default display name for an app. DisplayName string `json:"displayName,omitempty"` // A default description for an app. Description string `json:"description,omitempty"` // Inform the installation systems that a particular app can only be installed once within a user's account. SingleInstance bool `json:"singleInstance,omitempty"` IconImage IconImage `json:"iconImage,omitempty"` // System generated metadata that impacts eligibility requirements around installing an App. InstallMetadata map[string]string `json:"installMetadata,omitempty"` Owner Owner `json:"owner,omitempty"` // A UTC ISO-8601 Date-Time String CreatedDate time.Time `json:"createdDate,omitempty"` // A UTC ISO-8601 Date-Time String LastUpdatedDate time.Time `json:"lastUpdatedDate,omitempty"` LambdaSmartApp LambdaSmartApp `json:"lambdaSmartApp,omitempty"` WebhookSmartApp WebhookSmartApp `json:"webhookSmartApp,omitempty"` Ui AppUiSettings `json:"ui,omitempty"` }
App struct for App
type AppClassification ¶
type AppClassification string
AppClassification An App maybe associated to many classifications. A classification drives how the integration is presented to the user in the SmartThings mobile clients. These classifications include: * AUTOMATION - Denotes an integration that should display under the \"Automation\" tab in mobile clients. * SERVICE - Denotes an integration that is classified as a \"Service\". * DEVICE - Denotes an integration that should display under the \"Device\" tab in mobile clients. * CONNECTED_SERVICE - Denotes an integration that should display under the \"Connected Services\" menu in mobile clients. * HIDDEN - Denotes an integration that should not display in mobile clients
const ( APPCLASSIFICATION_AUTOMATION AppClassification = "AUTOMATION" APPCLASSIFICATION_SERVICE AppClassification = "SERVICE" APPCLASSIFICATION_DEVICE AppClassification = "DEVICE" APPCLASSIFICATION_CONNECTED_SERVICE AppClassification = "CONNECTED_SERVICE" APPCLASSIFICATION_HIDDEN AppClassification = "HIDDEN" )
List of AppClassification
type AppDeviceDetails ¶
type AppDeviceDetails struct { // The ID of the installed app that integrates this device. InstalledAppId string `json:"installedAppId,omitempty"` // A field to store an ID from a system external to SmartThings. ExternalId string `json:"externalId,omitempty"` Profile DeviceProfileReference `json:"profile,omitempty"` }
AppDeviceDetails struct for AppDeviceDetails
type AppOAuth ¶
type AppOAuth struct { // A name given to the OAuth Client. ClientName string `json:"clientName,omitempty"` // A list of SmartThings API OAuth scope identifiers that maybe required to execute your integration. Scope []string `json:"scope,omitempty"` // A list of redirect URIs. RedirectUris []string `json:"redirectUris,omitempty"` }
AppOAuth struct for AppOAuth
type AppTargetStatus ¶
type AppTargetStatus string
AppTargetStatus The registration status of a target url.
const ( APPTARGETSTATUS_PENDING AppTargetStatus = "PENDING" APPTARGETSTATUS_CONFIRMED AppTargetStatus = "CONFIRMED" )
List of AppTargetStatus
type AppUiSettings ¶
type AppUiSettings struct { PluginId string `json:"pluginId,omitempty"` PluginUri string `json:"pluginUri,omitempty"` DashboardCardsEnabled bool `json:"dashboardCardsEnabled"` PreInstallDashboardCardsEnabled bool `json:"preInstallDashboardCardsEnabled"` }
AppUiSettings A collection of settings to drive user interface in SmartThings clients. Currently, only applicable for LAMBDA_SMART_APP and WEBHOOK_SMART_APP app types.
type AppsApiService ¶
type AppsApiService service
AppsApiService AppsApi service
func (*AppsApiService) CreateApp ¶
func (a *AppsApiService) CreateApp(ctx _context.Context, authorization string, createOrUpdateAppRequest CreateAppRequest, localVarOptionals *CreateAppOpts) (CreateAppResponse, *_nethttp.Response, error)
CreateApp Create an app. Create an app integration. A single developer account is allowed to contain a maximum of 100 apps. Upon hitting that limit a 422 error response is returned with an error code of LimitError.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param createOrUpdateAppRequest
- @param optional nil or *CreateAppOpts - Optional Parameters:
- @param "SignatureType" (optional.String) - The Signature Type of the application. For WEBHOOK_SMART_APP only.
- @param "RequireConfirmation" (optional.Bool) - Override default configuration to use either PING or CONFIRMATION lifecycle. For WEBHOOK_SMART_APP only.
@return CreateAppResponse
func (*AppsApiService) DeleteApp ¶
func (a *AppsApiService) DeleteApp(ctx _context.Context, authorization string, appNameOrId string) (map[string]interface{}, *_nethttp.Response, error)
DeleteApp Delete an app. Delete an app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param appNameOrId The appName or appId field of an app.
@return map[string]interface{}
func (*AppsApiService) GenerateAppOauth ¶
func (a *AppsApiService) GenerateAppOauth(ctx _context.Context, authorization string, appNameOrId string, generateAppOAuthRequest GenerateAppOAuthRequest) (GenerateAppOAuthResponse, *_nethttp.Response, error)
GenerateAppOauth Generate an app's oauth client/secret. When an app is first created an OAuth client/secret are automatically generated for the integration. However, there are times when it maybe useful to re-generate a client/secret. Such as in cases where a secret becomes compromised.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param appNameOrId The appName or appId field of an app.
- @param generateAppOAuthRequest
@return GenerateAppOAuthResponse
func (*AppsApiService) GetApp ¶
func (a *AppsApiService) GetApp(ctx _context.Context, authorization string, appNameOrId string) (App, *_nethttp.Response, error)
GetApp Get an app. Get a single app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param appNameOrId The appName or appId field of an app.
@return App
func (*AppsApiService) GetAppOauth ¶
func (a *AppsApiService) GetAppOauth(ctx _context.Context, authorization string, appNameOrId string) (AppOAuth, *_nethttp.Response, error)
GetAppOauth Get an app's oauth settings. Get an app's oauth settings.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param appNameOrId The appName or appId field of an app.
@return AppOAuth
func (*AppsApiService) GetAppSettings ¶
func (a *AppsApiService) GetAppSettings(ctx _context.Context, authorization string, appNameOrId string) (GetAppSettingsResponse, *_nethttp.Response, error)
GetAppSettings Get settings. Get settings for an app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param appNameOrId The appName or appId field of an app.
@return GetAppSettingsResponse
func (*AppsApiService) ListApps ¶
func (a *AppsApiService) ListApps(ctx _context.Context, authorization string, localVarOptionals *ListAppsOpts) (PagedApps, *_nethttp.Response, error)
ListApps List apps. List all apps configured in an account.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param optional nil or *ListAppsOpts - Optional Parameters:
- @param "AppType" (optional.String) - The App Type of the application.
- @param "Classification" (optional.String) - An App maybe associated to many classifications. A classification drives how the integration is presented to the user in the SmartThings mobile clients. These classifications include: * AUTOMATION - Denotes an integration that should display under the \"Automation\" tab in mobile clients. * SERVICE - Denotes an integration that is classified as a \"Service\". * DEVICE - Denotes an integration that should display under the \"Device\" tab in mobile clients. * CONNECTED_SERVICE - Denotes an integration that should display under the \"Connected Services\" menu in mobile clients.
- @param "Tag" (optional.String) - May be used to filter a resource by it's assigned user-tags. Multiple tag query params are automatically joined with OR. Example usage in query string: ``` ?tag:key_name=value1&tag:key_name=value2 ```
@return PagedApps
func (*AppsApiService) Register ¶
func (a *AppsApiService) Register(ctx _context.Context, authorization string, appNameOrId string, appRegisterRequest map[string]interface{}) (map[string]interface{}, *_nethttp.Response, error)
Register Sends a confirmation request to App. Prepares to register an App by sending the endpoint a confirmation message.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param appNameOrId The appName or appId field of an app.
- @param appRegisterRequest
@return map[string]interface{}
func (*AppsApiService) UpdateApp ¶
func (a *AppsApiService) UpdateApp(ctx _context.Context, authorization string, appNameOrId string, updateAppRequest UpdateAppRequest, localVarOptionals *UpdateAppOpts) (App, *_nethttp.Response, error)
UpdateApp Update an app. Update an app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param appNameOrId The appName or appId field of an app.
- @param updateAppRequest
- @param optional nil or *UpdateAppOpts - Optional Parameters:
- @param "SignatureType" (optional.String) - The Signature Type of the application. For WEBHOOK_SMART_APP only.
- @param "RequireConfirmation" (optional.Bool) - Override default configuration to use either PING or CONFIRMATION lifecycle. For WEBHOOK_SMART_APP only.
@return App
func (*AppsApiService) UpdateAppOauth ¶
func (a *AppsApiService) UpdateAppOauth(ctx _context.Context, authorization string, appNameOrId string, updateAppOAuthRequest UpdateAppOAuthRequest) (AppOAuth, *_nethttp.Response, error)
UpdateAppOauth Update an app's oauth settings. Update an app's oauth settings.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param appNameOrId The appName or appId field of an app.
- @param updateAppOAuthRequest
@return AppOAuth
func (*AppsApiService) UpdateAppSettings ¶
func (a *AppsApiService) UpdateAppSettings(ctx _context.Context, authorization string, appNameOrId string, updateAppSettingsRequest UpdateAppSettingsRequest) (UpdateAppSettingsResponse, *_nethttp.Response, error)
UpdateAppSettings Update settings. Update settings for an app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param appNameOrId The appName or appId field of an app.
- @param updateAppSettingsRequest
@return UpdateAppSettingsResponse
func (*AppsApiService) UpdateSignatureType ¶
func (a *AppsApiService) UpdateSignatureType(ctx _context.Context, authorization string, appNameOrId string, updateSignatureTypeRequest UpdateSignatureTypeRequest) (map[string]interface{}, *_nethttp.Response, error)
UpdateSignatureType Update an app's signature type. Updates the signature type of an App. Signature options: * APP_RSA - Legacy signing mechanism comprised of a public / private key generated for an App during registration. This mechanism requires an App to download the public key and deploy along side their integration to verify the signature in the authorization header. * ST_PADLOCK - App callbacks are signed with a SmartThings certificate which is publicly available at https://key.smartthings.com. App's authorize callbacks by fetching the certificate over HTTPS and using it to validate the signature in the authorization header. Note that when upgrading an App from APP_RSA to ST_PADLOCK it is recommended to implement both verification methods. This will provide the ability to seamlessly switch between mechanisms in case a rollback is needed.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param appNameOrId The appName or appId field of an app.
- @param updateSignatureTypeRequest
@return map[string]interface{}
type Argument ¶
type Argument struct { // A name that is unique within the command. Used for i18n and named argument command execution. Name string `json:"name"` // Whether or not the argument must be supplied. If the argument is at the end of the arguments array then it can be completely ignored. If the argument is followed by another argument `null` must be supplied. Optional bool `json:"optional,omitempty"` // [JSON schema](http://json-schema.org/specification-links.html#draft-4) for the argument. Schema map[string]interface{} `json:"schema"` }
Argument struct for Argument
type ArrayOperand ¶
type ArrayOperand struct { Operands []Operand `json:"operands"` Aggregation OperandAggregationMode `json:"aggregation,omitempty"` }
ArrayOperand struct for ArrayOperand
type AttributeProperties ¶
type AttributeProperties struct { Value map[string]map[string]interface{} `json:"value"` Unit AttributePropertiesUnit `json:"unit,omitempty"` Data AttributePropertiesData `json:"data,omitempty"` }
AttributeProperties struct for AttributeProperties
type AttributePropertiesData ¶
type AttributePropertiesData struct { Type string `json:"type"` AdditionalProperties bool `json:"additionalProperties,omitempty"` Required []string `json:"required,omitempty"` Properties map[string]interface{} `json:"properties,omitempty"` }
AttributePropertiesData struct for AttributePropertiesData
type AttributePropertiesUnit ¶
type AttributePropertiesUnit struct { Type string `json:"type,omitempty"` Enum []string `json:"enum,omitempty"` Default string `json:"default,omitempty"` }
AttributePropertiesUnit struct for AttributePropertiesUnit
type AttributeSchema ¶
type AttributeSchema struct { Title string `json:"title,omitempty"` Type string `json:"type"` Properties AttributeProperties `json:"properties"` AdditionalProperties bool `json:"additionalProperties"` Required []string `json:"required,omitempty"` }
AttributeSchema [JSON schema](http://json-schema.org/specification-links.html#draft-4) for the attribute.
type AttributeState ¶
type AttributeState struct { Value map[string]interface{} `json:"value,omitempty"` Unit string `json:"unit,omitempty"` Data map[string]map[string]interface{} `json:"data,omitempty"` // Will always be 0 timezone offset Timestamp time.Time `json:"timestamp,omitempty"` }
AttributeState struct for AttributeState
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type BetweenCondition ¶
type BetweenCondition struct { // Unique id for the condition Id string `json:"id,omitempty"` Value Operand `json:"value"` Start Operand `json:"start"` End Operand `json:"end"` Aggregation ConditionAggregationMode `json:"aggregation,omitempty"` }
BetweenCondition struct for BetweenCondition
type CapabilityAttribute ¶
type CapabilityAttribute struct { Schema AttributeSchema `json:"schema,omitempty"` // The name of the command that sets this attribute Setter string `json:"setter,omitempty"` // a list of objects that specify which commands set this attribute EnumCommands []CapabilityAttributeEnumCommands `json:"enumCommands,omitempty"` }
CapabilityAttribute struct for CapabilityAttribute
type CapabilityAttributeEnumCommands ¶
type CapabilityAttributeEnumCommands struct { // the command that sets this attribute to the associated value Command string `json:"command,omitempty"` // the value that this command will set the attribute to Value string `json:"value,omitempty"` }
CapabilityAttributeEnumCommands struct for CapabilityAttributeEnumCommands
type CapabilityCommand ¶
type CapabilityCommand struct { // The name of the command. Unique for the capability Name string `json:"name"` // An array of argument definitions. The arguments must be supplied in the order specified. Arguments []Argument `json:"arguments,omitempty"` }
CapabilityCommand struct for CapabilityCommand
type CapabilityReference ¶
CapabilityReference struct for CapabilityReference
type CapabilitySubscriptionDetail ¶
type CapabilitySubscriptionDetail struct { // The id of the location that both the app and source device are in. LocationId string `json:"locationId"` // Name of the capability that is subscribed to. Capability string `json:"capability"` // Name of the capabilities attribute or * for all. Attribute string `json:"attribute,omitempty"` // A particular value for the attribute that will trigger the subscription or * for all. Value map[string]interface{} `json:"value,omitempty"` // Only execute the subscription if the subscribed event is a state change from previous events. StateChangeOnly bool `json:"stateChangeOnly,omitempty"` // A name for the subscription that will be passed to the installed app. Must be unique per installed app. SubscriptionName string `json:"subscriptionName,omitempty"` // List of modes that the subscription will execute for. If not provided then all modes will be supported. Modes []string `json:"modes,omitempty"` }
CapabilitySubscriptionDetail Details of a subscription of source type CAPABILITY. The combination of subscribed values must be unique per installed app.
type CapabilitySummary ¶
type CapabilitySummary struct { // A URL safe unique identifier for the capability. Id string `json:"id,omitempty"` // The version number of the capability. Version int32 `json:"version,omitempty"` // The status of the capability. * __proposed__ - The capability is under a review and refinement process. The capability definition may go through changes, some of which may be breaking. * __live__ - The capability has been through review and the definition has been solidified. Live capabilities can no longer be altered. * __deprecated__ - The capability is marked for removal and should only be used during a period of migration to allow for existing integrations and automations to continue to work. * __dead__ - The usage of a deprecated capability has dropped to a sufficiently low level to warrant removal. The capability definition still exists but can no longer be used by automations or implemented by devices. Status string `json:"status,omitempty"` }
CapabilitySummary struct for CapabilitySummary
type ChangesCondition ¶
type ChangesCondition struct { // Unique id for the condition Id string `json:"id,omitempty"` Left Operand `json:"left"` Aggregation ConditionAggregationMode `json:"aggregation,omitempty"` }
ChangesCondition struct for ChangesCondition
type CommandAction ¶
type CommandAction struct { // Unique id for the action Id string `json:"id,omitempty"` Devices []string `json:"devices"` Commands []DeviceCommand `json:"commands"` }
CommandAction struct for CommandAction
type ComponentTranslations ¶
type ComponentTranslations struct { // Short UTF-8 text used when displaying the component. Label string `json:"label,omitempty"` // UTF-8 text describing the component. Description string `json:"description,omitempty"` }
ComponentTranslations A map of i18n translations.
type Condition ¶
type Condition struct { And []Condition `json:"and,omitempty"` Or []Condition `json:"or,omitempty"` //Not Condition `json:"not,omitempty"` Equals EqualsCondition `json:"equals,omitempty"` GreaterThan GreaterThanCondition `json:"greater_than,omitempty"` GreaterThanOrEquals GreaterThanOrEqualsCondition `json:"greater_than_or_equals,omitempty"` LessThan LessThanCondition `json:"less_than,omitempty"` LessThanOrEquals LessThanOrEqualsCondition `json:"less_than_or_equals,omitempty"` Between BetweenCondition `json:"between,omitempty"` Changes ChangesCondition `json:"changes,omitempty"` }
Condition struct for Condition
type ConditionAggregationMode ¶
type ConditionAggregationMode string
ConditionAggregationMode the model 'ConditionAggregationMode'
const ( CONDITIONAGGREGATIONMODE_ANY ConditionAggregationMode = "Any" CONDITIONAGGREGATIONMODE_ALL ConditionAggregationMode = "All" )
List of ConditionAggregationMode
type ConfigEntry ¶
type ConfigEntry struct { // The value type. ValueType string `json:"valueType,omitempty"` StringConfig StringConfig `json:"stringConfig,omitempty"` DeviceConfig DeviceConfig `json:"deviceConfig,omitempty"` PermissionConfig PermissionConfig `json:"permissionConfig,omitempty"` ModeConfig ModeConfig `json:"modeConfig,omitempty"` SceneConfig SceneConfig `json:"sceneConfig,omitempty"` MessageConfig MessageConfig `json:"messageConfig,omitempty"` }
ConfigEntry A configuration value type and the correspodning configuration.
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` Debug bool `json:"debug,omitempty"` Servers []ServerConfiguration HTTPClient *http.Client }
Configuration stores the configuration of the API client
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration returns a new Configuration object
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
AddDefaultHeader adds a new HTTP header to the default header in the request
type CreateAppOpts ¶
CreateAppOpts Optional parameters for the method 'CreateApp'
type CreateAppRequest ¶
type CreateAppRequest struct { // A globally unique, developer-defined identifier for an app. It is alpha-numeric, may contain dashes, underscores, periods, and must be less then 250 characters long. AppName string `json:"appName"` // A default display name for an app. DisplayName string `json:"displayName"` // A default description for an app. Description string `json:"description"` // Inform the installation systems that a particular app can only be installed once within a user's account. SingleInstance bool `json:"singleInstance,omitempty"` IconImage IconImage `json:"iconImage,omitempty"` AppType AppType `json:"appType"` PrincipalType PrincipalType `json:"principalType,omitempty"` // An App maybe associated to many classifications. A classification drives how the integration is presented to the user in the SmartThings mobile clients. These classifications include: * AUTOMATION - Denotes an integration that should display under the \"Automation\" tab in mobile clients. * SERVICE - Denotes an integration that is classified as a \"Service\". * DEVICE - Denotes an integration that should display under the \"Device\" tab in mobile clients. * CONNECTED_SERVICE - Denotes an integration that should display under the \"Connected Services\" menu in mobile clients. * HIDDEN - Denotes an integration that should not display in mobile clients Classifications []AppClassification `json:"classifications"` LambdaSmartApp CreateOrUpdateLambdaSmartAppRequest `json:"lambdaSmartApp,omitempty"` WebhookSmartApp CreateOrUpdateWebhookSmartAppRequest `json:"webhookSmartApp,omitempty"` Oauth AppOAuth `json:"oauth,omitempty"` Ui AppUiSettings `json:"ui,omitempty"` }
CreateAppRequest struct for CreateAppRequest
type CreateAppResponse ¶
type CreateAppResponse struct { App App `json:"app,omitempty"` // The OAuth Client ID. OauthClientId string `json:"oauthClientId,omitempty"` // The OAuth Client Secret. OauthClientSecret string `json:"oauthClientSecret,omitempty"` }
CreateAppResponse A response object containing the newly created App and OAuth client details.
type CreateDeviceProfileOpts ¶
CreateDeviceProfileOpts Optional parameters for the method 'CreateDeviceProfile'
type CreateDeviceProfileRequest ¶
type CreateDeviceProfileRequest struct { // A name for the device profile. Name string `json:"name"` // A list of components for this profile. Exactly 1 component ID must be `main`. Components []DeviceComponentReference `json:"components"` // Additional information about the device profile, limited to 10 entries. Metadata map[string]string `json:"metadata,omitempty"` }
CreateDeviceProfileRequest struct for CreateDeviceProfileRequest
type CreateInstalledAppEventsRequest ¶
type CreateInstalledAppEventsRequest struct { // An array of smartapp events used to trigger client behavior in loaded web plugin detail pages. Events will be delivered to JavaScript event handler of all active client processes related to parameterized installed app. SmartAppEvents []SmartAppEventRequest `json:"smartAppEvents,omitempty"` // An array of smartapp dashboard card events used to trigger client behavior for dashboard cards. Dashboard card events are directives to a SmartThings client to take actions in relation to lifecycle changes to a specific dashboard card. These events are not delivered to the web plugin event handler. SmartAppDashboardCardEvents []SmartAppDashboardCardEventRequest `json:"smartAppDashboardCardEvents,omitempty"` }
CreateInstalledAppEventsRequest struct for CreateInstalledAppEventsRequest
type CreateLocationRequest ¶
type CreateLocationRequest struct { // A nickname given for the location (eg. Home) Name string `json:"name"` // An ISO Alpha-3 country code. (i.e. GBR, USA) CountryCode string `json:"countryCode"` // A geographical latitude. Latitude float32 `json:"latitude,omitempty"` // A geographical longitude. Longitude float32 `json:"longitude,omitempty"` // The radius in meters around latitude and longitude which defines this location. RegionRadius int32 `json:"regionRadius,omitempty"` // The desired temperature scale used within location. Value can be F or C. TemperatureScale string `json:"temperatureScale,omitempty"` // An IETF BCP 47 language tag representing the chosen locale for this location. Locale string `json:"locale,omitempty"` // Additional information about the location that allows SmartThings to further define your location. AdditionalProperties map[string]string `json:"additionalProperties,omitempty"` }
CreateLocationRequest struct for CreateLocationRequest
type CreateOrUpdateLambdaSmartAppRequest ¶
type CreateOrUpdateLambdaSmartAppRequest struct { // A list of AWS arns referencing a Lambda function. Functions []string `json:"functions"` }
CreateOrUpdateLambdaSmartAppRequest Details related to a Lambda Smart App implementation. This model should only be specified for apps of type LAMBDA_SMART_APP.
type CreateOrUpdateWebhookSmartAppRequest ¶
type CreateOrUpdateWebhookSmartAppRequest struct { // A URL that should be invoked during execution. TargetUrl string `json:"targetUrl"` }
CreateOrUpdateWebhookSmartAppRequest Details related to a Webhook Smart App implementation. This model should only be specified for apps of type WEBHOOK_SMART_APP.
type CreateRoomRequest ¶
type CreateRoomRequest struct { // A name given for the room (eg. Living Room) Name string `json:"name"` }
CreateRoomRequest struct for CreateRoomRequest
type CreateScheduleOpts ¶
CreateScheduleOpts Optional parameters for the method 'CreateSchedule'
type CronSchedule ¶
type CronSchedule struct { // The cron expression for the schedule for CRON schedules. The format matches that specified by the [Quartz scheduler](http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/crontrigger.html) but should not include the seconds (1st) field. The exact second will be chosen at random but will remain consistent. The years part must be les than 2 years from now. Expression string `json:"expression"` // The timezone id for CRON schedules. Timezone string `json:"timezone"` }
CronSchedule struct for CronSchedule
type DashboardCardLifecycle ¶
type DashboardCardLifecycle string
DashboardCardLifecycle the model 'DashboardCardLifecycle'
const ( DASHBOARDCARDLIFECYCLE_UPDATE DashboardCardLifecycle = "UPDATE" DASHBOARDCARDLIFECYCLE_DELETE DashboardCardLifecycle = "DELETE" )
List of DashboardCardLifecycle
type DateOperand ¶
type DateOperand struct { // A java time zone ID reference TimeZoneId string `json:"timeZoneId,omitempty"` DaysOfWeek []DayOfWeek `json:"daysOfWeek,omitempty"` Year int32 `json:"year,omitempty"` Month int32 `json:"month,omitempty"` Day int32 `json:"day,omitempty"` }
DateOperand struct for DateOperand
type DateTimeOperand ¶
type DateTimeOperand struct { // A java time zone ID reference TimeZoneId string `json:"timeZoneId,omitempty"` DaysOfWeek []DayOfWeek `json:"daysOfWeek,omitempty"` Year int32 `json:"year,omitempty"` Month int32 `json:"month,omitempty"` Day int32 `json:"day,omitempty"` Reference TimeReference `json:"reference"` Offset Interval `json:"offset,omitempty"` }
DateTimeOperand struct for DateTimeOperand
type DeleteAllSubscriptionsOpts ¶
DeleteAllSubscriptionsOpts Optional parameters for the method 'DeleteAllSubscriptions'
type DeleteInstalledAppResponse ¶
type DeleteInstalledAppResponse struct {
Count int32 `json:"count,omitempty"`
}
DeleteInstalledAppResponse The number of deleted installed apps.
type Device ¶
type Device struct { // The identifier for the device instance. DeviceId string `json:"deviceId,omitempty"` // The name that the device integration (Device Handler or SmartApp) defines for the device. Name string `json:"name,omitempty"` // The name that a user chooses for the device. This defaults to the same value as name. Label string `json:"label,omitempty"` // The device manufacturer code. DeviceManufacturerCode string `json:"deviceManufacturerCode,omitempty"` // The ID of the Location with which the device is associated. LocationId string `json:"locationId,omitempty"` // The ID of the Room with which the device is associated. If the device is not associated with any room, then this field will be null. RoomId string `json:"roomId,omitempty"` // Deprecated please look under \"dth\". DeviceTypeId string `json:"deviceTypeId,omitempty"` // Deprecated please look under \"dth\". DeviceTypeName string `json:"deviceTypeName,omitempty"` // Deprecated please look under \"dth\". DeviceNetworkType string `json:"deviceNetworkType,omitempty"` // The IDs of all compenents on the device. Components []DeviceComponent `json:"components,omitempty"` // Device details for all child devices of the device. ChildDevices []Device `json:"childDevices,omitempty"` Profile DeviceProfileReference `json:"profile,omitempty"` App AppDeviceDetails `json:"app,omitempty"` Dth DthDeviceDetails `json:"dth,omitempty"` Ir IrDeviceDetails `json:"ir,omitempty"` IrOcf IrDeviceDetails `json:"irOcf,omitempty"` Viper ViperDeviceDetails `json:"viper,omitempty"` Type DeviceIntegrationType `json:"type,omitempty"` }
Device struct for Device
type DeviceActivity ¶
type DeviceActivity struct { // Device ID DeviceId string `json:"deviceId,omitempty"` // Device nick name DeviceName string `json:"deviceName,omitempty"` // Location ID LocationId string `json:"locationId,omitempty"` // Location name LocationName string `json:"locationName,omitempty"` // The IS0-8601 date time strings in UTC of the activity Time time.Time `json:"time,omitempty"` // Translated human readable string (localized) Text string `json:"text,omitempty"` // device component ID. Not nullable. Component string `json:"component"` // device component label. Nullable. ComponentLabel string `json:"componentLabel,omitempty"` // capability name Capability string `json:"capability,omitempty"` // attribute name Attribute string `json:"attribute,omitempty"` // attribute value Value map[string]interface{} `json:"value,omitempty"` Unit string `json:"unit,omitempty"` Data map[string]map[string]interface{} `json:"data,omitempty"` }
DeviceActivity struct for DeviceActivity
type DeviceCategory ¶
type DeviceCategory struct {
Name string `json:"name"`
}
DeviceCategory A case-sensitive string from the pre-defined list of valid categories [/devicecategories](#/operation/listCategories).
type DeviceCommand ¶
type DeviceCommand struct { // The name of the component on this device, default is 'main'. The component must be valid for the device. Component string `json:"component,omitempty"` // Capability that this command relates to. This must be a capability of the component. Capability string `json:"capability"` // Name of the command, this must be valid for the capability. Command string `json:"command"` // Arguments of the command. All the required arguments defined in the capability's command argument definition must be provided. The type of the arguments are dependent on the type of the capability's command argument. Please refer to the capabilities definition at https://smartthings.developer.samsung.com/develop/api-ref/capabilities.html Arguments []map[string]interface{} `json:"arguments,omitempty"` }
DeviceCommand struct for DeviceCommand
type DeviceCommandsEvent ¶
type DeviceCommandsEvent struct { // The id of the event. EventId string `json:"eventId,omitempty"` // The guid of the device that the commands are for. DeviceId string `json:"deviceId,omitempty"` // The device profile ID of the device instance. ProfileId string `json:"profileId,omitempty"` // The external ID that was set during install of a device. ExternalId string `json:"externalId,omitempty"` Commands []DeviceCommandsEventCommand `json:"commands,omitempty"` }
DeviceCommandsEvent An event that contains commands for devices that were created by this app.
type DeviceCommandsEventCommand ¶
type DeviceCommandsEventCommand struct { ComponentId string `json:"componentId,omitempty"` Capability string `json:"capability,omitempty"` Command string `json:"command,omitempty"` Arguments []map[string]interface{} `json:"arguments,omitempty"` }
DeviceCommandsEventCommand struct for DeviceCommandsEventCommand
type DeviceCommandsRequest ¶
type DeviceCommandsRequest struct { // An array of commands to execute on the Device. Commands []DeviceCommand `json:"commands,omitempty"` }
DeviceCommandsRequest struct for DeviceCommandsRequest
type DeviceComponent ¶
type DeviceComponent struct { Id string `json:"id,omitempty"` // UTF-8 label for the component. Label string `json:"label,omitempty"` Capabilities []CapabilityReference `json:"capabilities,omitempty"` }
DeviceComponent struct for DeviceComponent
type DeviceComponentReference ¶
type DeviceComponentReference struct { Id string `json:"id"` // A list of `[ 1..20 ]` capabilities for this component. Capabilities []CapabilityReference `json:"capabilities"` Categories []DeviceCategory `json:"categories,omitempty"` }
DeviceComponentReference struct for DeviceComponentReference
type DeviceConfig ¶
type DeviceConfig struct { // The ID of the device. DeviceId string `json:"deviceId,omitempty"` // The component ID on the device. ComponentId string `json:"componentId,omitempty"` Permissions []string `json:"permissions,omitempty"` }
DeviceConfig A device and component configuration with any required permissions.
type DeviceEvent ¶
type DeviceEvent struct { // The ID of the event. EventId string `json:"eventId,omitempty"` // The ID of the location in which the event was triggered. LocationId string `json:"locationId,omitempty"` // The ID of the device associated with the DEVICE_EVENT. DeviceId string `json:"deviceId,omitempty"` // The name of the component on the device that the event is associated with. ComponentId string `json:"componentId,omitempty"` // The name of the capability associated with the DEVICE_EVENT. Capability string `json:"capability,omitempty"` // The name of the DEVICE_EVENT. This typically corresponds to an attribute name of the device-handler’s capabilities. Attribute string `json:"attribute,omitempty"` // The value of the event. The type of the value is dependent on the capability's attribute type. Value map[string]interface{} `json:"value,omitempty"` // The root level data type of the value field. The data types are representitive of standard JSON data types. ValueType string `json:"valueType,omitempty"` // Whether or not the state of the device has changed as a result of the DEVICE_EVENT. StateChange bool `json:"stateChange,omitempty"` // json map as defined by capability data schema Data map[string]interface{} `json:"data,omitempty"` // The name of subscription that caused delivery. SubscriptionName string `json:"subscriptionName,omitempty"` }
DeviceEvent An event on a device that matched a subscription for this app.
type DeviceEventsRequest ¶
type DeviceEventsRequest struct { // An array of attribute state updates. DeviceEvents []DeviceStateEvent `json:"deviceEvents,omitempty"` }
DeviceEventsRequest struct for DeviceEventsRequest
type DeviceHealthDetail ¶
type DeviceHealthDetail struct { // An array of GUIDs of devices being subscribed to. A max of 20 GUIDs are allowed. DeviceIds []string `json:"deviceIds,omitempty"` // A name for the subscription that will be passed to the installed app. SubscriptionName string `json:"subscriptionName,omitempty"` // The id of the location that both the app and source device are in. LocationId string `json:"locationId,omitempty"` }
DeviceHealthDetail Details of a subscription of source type DEVICE_HEALTH. Only one of deviceIds or locationId should be supplied.
type DeviceHealthEvent ¶
type DeviceHealthEvent struct { // The id of the event. EventId string `json:"eventId,omitempty"` // The id of the location in which the event was triggered. LocationId string `json:"locationId,omitempty"` // The id of the device. DeviceId string `json:"deviceId,omitempty"` // The id of the hub. HubId string `json:"hubId,omitempty"` // The status of the device. Status string `json:"status,omitempty"` // The reason the device is offline. Reason string `json:"reason,omitempty"` }
DeviceHealthEvent An event that represents a change in the health of the a device.
type DeviceInstallRequest ¶
type DeviceInstallRequest struct { // The label for the device. Label string `json:"label,omitempty"` // The ID of the Location with which the device is associated. LocationId string `json:"locationId"` App DeviceInstallRequestApp `json:"app"` }
DeviceInstallRequest struct for DeviceInstallRequest
type DeviceInstallRequestApp ¶
type DeviceInstallRequestApp struct { // The device profile Id ProfileId string `json:"profileId"` // The ID of the installed application InstalledAppId string `json:"installedAppId"` // A field to store an ID from a system external to SmartThings. ExternalId string `json:"externalId,omitempty"` }
DeviceInstallRequestApp struct for DeviceInstallRequestApp
type DeviceIntegrationType ¶
type DeviceIntegrationType string
DeviceIntegrationType The type of device integration (may be null). If the type is DTH, the device implementation is a groovy Device Handler and the details are in the \"dth\" field. If the type is ENDPOINT_APP, the device implementation is a SmartApp and the details are in the \"app\" field. If the type is IR, the details are in the \"ir\" field. If the type is IR_OCF, the details are in the \"irOcf\" field. If the type is VIPER, the details are in the \"viper\" field.
const ( DEVICEINTEGRATIONTYPE_BLE DeviceIntegrationType = "BLE" DEVICEINTEGRATIONTYPE_BLE_D2_D DeviceIntegrationType = "BLE_D2D" DEVICEINTEGRATIONTYPE_DTH DeviceIntegrationType = "DTH" DEVICEINTEGRATIONTYPE_ENDPOINT_APP DeviceIntegrationType = "ENDPOINT_APP" DEVICEINTEGRATIONTYPE_HUB DeviceIntegrationType = "HUB" DEVICEINTEGRATIONTYPE_IR DeviceIntegrationType = "IR" DEVICEINTEGRATIONTYPE_IR_OCF DeviceIntegrationType = "IR_OCF" DEVICEINTEGRATIONTYPE_MQTT DeviceIntegrationType = "MQTT" DEVICEINTEGRATIONTYPE_OCF DeviceIntegrationType = "OCF" DEVICEINTEGRATIONTYPE_PENGYOU DeviceIntegrationType = "PENGYOU" DEVICEINTEGRATIONTYPE_VIDEO DeviceIntegrationType = "VIDEO" DEVICEINTEGRATIONTYPE_VIPER DeviceIntegrationType = "VIPER" )
List of DeviceIntegrationType
type DeviceLifecycle ¶
type DeviceLifecycle string
DeviceLifecycle The device lifecycle. The lifecycle will be one of: * CREATE - Invoked when a device is created. * DELETE - Invoked when a device is deleted. * UPDATE - Invoked when a device is updated. * MOVE_FROM - Invoked when a device is moved from a location. * MOVE_TO - Invoked when a device is moved to a location.
const ( DEVICELIFECYCLE_CREATE DeviceLifecycle = "CREATE" DEVICELIFECYCLE_DELETE DeviceLifecycle = "DELETE" DEVICELIFECYCLE_UPDATE DeviceLifecycle = "UPDATE" DEVICELIFECYCLE_MOVE_FROM DeviceLifecycle = "MOVE_FROM" DEVICELIFECYCLE_MOVE_TO DeviceLifecycle = "MOVE_TO" )
List of DeviceLifecycle
type DeviceLifecycleDetail ¶
type DeviceLifecycleDetail struct { // An array of GUIDs of devices being subscribed to. A max of 20 GUIDs are allowed. DeviceIds []string `json:"deviceIds,omitempty"` // A name for the subscription that will be passed to the installed app. SubscriptionName string `json:"subscriptionName,omitempty"` // The id of the location that both the app and source device are in. LocationId string `json:"locationId,omitempty"` }
DeviceLifecycleDetail Details of a subscription of source type DEVICE_LIFECYCLE. Only one of deviceIds or locationId should be supplied.
type DeviceLifecycleEvent ¶
type DeviceLifecycleEvent struct { Lifecycle DeviceLifecycle `json:"lifecycle,omitempty"` // The id of the event. EventId string `json:"eventId,omitempty"` // The id of the location in which the event was triggered. LocationId string `json:"locationId,omitempty"` // The id of the device. DeviceId string `json:"deviceId,omitempty"` // The name of the device DeviceName string `json:"deviceName,omitempty"` // The principal that made the change Principal string `json:"principal,omitempty"` // Create device lifecycle. Create map[string]interface{} `json:"create,omitempty"` // Delete device lifecycle. Delete map[string]interface{} `json:"delete,omitempty"` // Update device lifecycle. Update map[string]interface{} `json:"update,omitempty"` MoveFrom DeviceLifecycleMove `json:"moveFrom,omitempty"` MoveTo DeviceLifecycleMove `json:"moveTo,omitempty"` }
DeviceLifecycleEvent A device lifecycle event.
type DeviceLifecycleMove ¶
type DeviceLifecycleMove struct {
LocationId string `json:"locationId,omitempty"`
}
DeviceLifecycleMove Move device lifecycle.
type DeviceNetworkSecurityLevel ¶
type DeviceNetworkSecurityLevel string
DeviceNetworkSecurityLevel For hub-connected devices on protocols with multiple security levels, the security level the device was added with. Values ZWAVE_S2_FAILED, ZWAVE_S0_FAILED, ZWAVE_S2_DOWNGRADE, and ZWAVE_S0_DOWNGRADE should be treated as failures and prompt the user to remove and re-add the device. Other Z-Wave values are success cases.
const ( DEVICENETWORKSECURITYLEVEL_UNKNOWN DeviceNetworkSecurityLevel = "UNKNOWN" DEVICENETWORKSECURITYLEVEL_ZWAVE_LEGACY_NON_SECURE DeviceNetworkSecurityLevel = "ZWAVE_LEGACY_NON_SECURE" DEVICENETWORKSECURITYLEVEL_ZWAVE_S0_LEGACY DeviceNetworkSecurityLevel = "ZWAVE_S0_LEGACY" DEVICENETWORKSECURITYLEVEL_ZWAVE_S0_FALLBACK DeviceNetworkSecurityLevel = "ZWAVE_S0_FALLBACK" DEVICENETWORKSECURITYLEVEL_ZWAVE_S2_UNAUTHENTICATED DeviceNetworkSecurityLevel = "ZWAVE_S2_UNAUTHENTICATED" DEVICENETWORKSECURITYLEVEL_ZWAVE_S2_AUTHENTICATED DeviceNetworkSecurityLevel = "ZWAVE_S2_AUTHENTICATED" DEVICENETWORKSECURITYLEVEL_ZWAVE_S2_ACCESS_CONTROL DeviceNetworkSecurityLevel = "ZWAVE_S2_ACCESS_CONTROL" DEVICENETWORKSECURITYLEVEL_ZWAVE_S2_FAILED DeviceNetworkSecurityLevel = "ZWAVE_S2_FAILED" DEVICENETWORKSECURITYLEVEL_ZWAVE_S0_FAILED DeviceNetworkSecurityLevel = "ZWAVE_S0_FAILED" DEVICENETWORKSECURITYLEVEL_ZWAVE_S2_DOWNGRADE DeviceNetworkSecurityLevel = "ZWAVE_S2_DOWNGRADE" DEVICENETWORKSECURITYLEVEL_ZWAVE_S0_DOWNGRADE DeviceNetworkSecurityLevel = "ZWAVE_S0_DOWNGRADE" )
List of DeviceNetworkSecurityLevel
type DeviceOperand ¶
type DeviceOperand struct { Devices []string `json:"devices,omitempty"` Component string `json:"component"` Capability string `json:"capability"` Attribute string `json:"attribute"` Path string `json:"path,omitempty"` Aggregation OperandAggregationMode `json:"aggregation,omitempty"` SubscriptionMode SubscriptionMode `json:"subscriptionMode,omitempty"` }
DeviceOperand struct for DeviceOperand
type DeviceProfile ¶
type DeviceProfile struct { Id string `json:"id,omitempty"` Name string `json:"name,omitempty"` Owner Owner `json:"owner,omitempty"` Components []DeviceComponent `json:"components,omitempty"` // Additional information about the device profile, limited to 10 entries. Metadata map[string]string `json:"metadata,omitempty"` Status DeviceProfileStatus `json:"status,omitempty"` }
DeviceProfile struct for DeviceProfile
type DeviceProfileReference ¶
type DeviceProfileReference struct { // The device profile Id Id string `json:"id,omitempty"` }
DeviceProfileReference struct for DeviceProfileReference
type DeviceProfileStatus ¶
type DeviceProfileStatus string
DeviceProfileStatus The lifecycle status of a device profile. 'DEVELOPMENT' - Device profile can be modified. The profile is only available to the developer and can only be used with a self-published app. 'PUBLISHED' - Device profile can be shared with other users, but cannot be modified.
const ( DEVICEPROFILESTATUS_DEVELOPMENT DeviceProfileStatus = "DEVELOPMENT" DEVICEPROFILESTATUS_PUBLISHED DeviceProfileStatus = "PUBLISHED" )
List of DeviceProfileStatus
type DeviceResults ¶
type DeviceResults struct { // deviceId created by DM DeviceId string `json:"deviceId,omitempty"` // initial device name from the partner Name string `json:"name,omitempty"` }
DeviceResults struct for DeviceResults
type DeviceStateEvent ¶
type DeviceStateEvent struct { // The name of the component on this device, default is 'main'. Component string `json:"component,omitempty"` // Capability that this event relates to. Capability string `json:"capability,omitempty"` // Name of the capability attribute that this event relates to. Attribute string `json:"attribute,omitempty"` // Value associated with the event. The valid value depends on the capability. Value map[string]interface{} `json:"value"` // Unit of the value field. Unit string `json:"unit,omitempty"` // Key value pairs about the state of the device. Valid values depend on the capability. Data map[string]map[string]interface{} `json:"data,omitempty"` }
DeviceStateEvent struct for DeviceStateEvent
type DeviceStatus ¶
type DeviceStatus struct { // A map of componentId to Component status. Components map[string]map[string]map[string]AttributeState `json:"components,omitempty"` }
DeviceStatus The status of a Device.
type DeviceSubscriptionDetail ¶
type DeviceSubscriptionDetail struct { // The GUID of the device that is subscribed to. DeviceId string `json:"deviceId"` // The component ID on the device that is subscribed to or * for all. ComponentId string `json:"componentId,omitempty"` // Name of the capability that is subscribed to or * for all. Capability string `json:"capability,omitempty"` // Name of the capabilities attribute or * for all. Attribute string `json:"attribute,omitempty"` // A particular value for the attribute that will trigger the subscription or * for all. Value map[string]interface{} `json:"value,omitempty"` // Only execute the subscription if the subscribed event is a state change from previous events. StateChangeOnly bool `json:"stateChangeOnly,omitempty"` // A name for the subscription that will be passed to the installed app. Must be unique per installed app. SubscriptionName string `json:"subscriptionName,omitempty"` // List of mode ID's that the subscription will execute for. If not provided then all modes will be supported. Modes []string `json:"modes,omitempty"` }
DeviceSubscriptionDetail Details of a subscription of source type DEVICE. The combination of subscribed values must be unique per installed app.
type DeviceprofilesApiService ¶
type DeviceprofilesApiService service
DeviceprofilesApiService DeviceprofilesApi service
func (*DeviceprofilesApiService) CreateDeviceProfile ¶
func (a *DeviceprofilesApiService) CreateDeviceProfile(ctx _context.Context, authorization string, localVarOptionals *CreateDeviceProfileOpts) (DeviceProfile, *_nethttp.Response, error)
CreateDeviceProfile Create a device profile Create a device profile.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param optional nil or *CreateDeviceProfileOpts - Optional Parameters:
- @param "Request" (optional.Interface of CreateDeviceProfileRequest) - The device profile to be created.
@return DeviceProfile
func (*DeviceprofilesApiService) DeleteDeviceProfile ¶
func (a *DeviceprofilesApiService) DeleteDeviceProfile(ctx _context.Context, authorization string, deviceProfileId string) (map[string]interface{}, *_nethttp.Response, error)
DeleteDeviceProfile Delete a device profile Delete a device profile by ID. Admin use only.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param deviceProfileId the device profile ID
@return map[string]interface{}
func (*DeviceprofilesApiService) GetDeviceProfile ¶
func (a *DeviceprofilesApiService) GetDeviceProfile(ctx _context.Context, authorization string, deviceProfileId string, localVarOptionals *GetDeviceProfileOpts) (DeviceProfile, *_nethttp.Response, error)
GetDeviceProfile GET a device profile GET a device profile.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param deviceProfileId the device profile ID
- @param optional nil or *GetDeviceProfileOpts - Optional Parameters:
- @param "AcceptLanguage" (optional.String) - Language header representing the client's preferred language. The format of the `Accept-Language` header follows what is defined in [RFC 7231, section 5.3.5](https://tools.ietf.org/html/rfc7231#section-5.3.5)
@return DeviceProfile
func (*DeviceprofilesApiService) ListDeviceProfiles ¶
func (a *DeviceprofilesApiService) ListDeviceProfiles(ctx _context.Context, authorization string, localVarOptionals *ListDeviceProfilesOpts) (PagedDeviceProfiles, *_nethttp.Response, error)
ListDeviceProfiles List all device profiles for the authenticated user List device profiles.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param optional nil or *ListDeviceProfilesOpts - Optional Parameters:
- @param "ProfileId" (optional.Interface of []string) - The device profiles IDs to filter the results by.
@return PagedDeviceProfiles
func (*DeviceprofilesApiService) UpdateDeviceProfile ¶
func (a *DeviceprofilesApiService) UpdateDeviceProfile(ctx _context.Context, authorization string, deviceProfileId string, localVarOptionals *UpdateDeviceProfileOpts) (DeviceProfile, *_nethttp.Response, error)
UpdateDeviceProfile Update a device profile. Update a device profile. The device profile has to be in development status
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param deviceProfileId the device profile ID
- @param optional nil or *UpdateDeviceProfileOpts - Optional Parameters:
- @param "Request" (optional.Interface of UpdateDeviceProfileRequest) - The device profile to be updated.
@return DeviceProfile
type DevicesApiService ¶
type DevicesApiService service
DevicesApiService DevicesApi service
func (*DevicesApiService) CreateDeviceEvents ¶
func (a *DevicesApiService) CreateDeviceEvents(ctx _context.Context, authorization string, deviceId string, deviceEventRequest DeviceEventsRequest) (map[string]interface{}, *_nethttp.Response, error)
CreateDeviceEvents Create Device Events. Create events for a device. When a device is managed by a SmartApp then it is responsible for creating events to update the attributes of the device in the SmartThings platform. The token must be for a SmartApp and it must be the SmartApp that created the Device.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param deviceId the device ID
- @param deviceEventRequest
@return map[string]interface{}
func (*DevicesApiService) DeleteDevice ¶
func (a *DevicesApiService) DeleteDevice(ctx _context.Context, authorization string, deviceId string) (map[string]interface{}, *_nethttp.Response, error)
DeleteDevice Delete a Device. Delete a device by device id. If the token is for a SmartApp that created the device then it implicitly has permission for this api.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param deviceId the device ID
@return map[string]interface{}
func (*DevicesApiService) ExecuteDeviceCommands ¶
func (a *DevicesApiService) ExecuteDeviceCommands(ctx _context.Context, authorization string, deviceId string, executeCapabilityCommand DeviceCommandsRequest) (map[string]interface{}, *_nethttp.Response, error)
ExecuteDeviceCommands Execute commands on device. Execute commands on a device.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param deviceId the device ID
- @param executeCapabilityCommand
@return map[string]interface{}
func (*DevicesApiService) GetDevice ¶
func (a *DevicesApiService) GetDevice(ctx _context.Context, authorization string, deviceId string) (Device, *_nethttp.Response, error)
GetDevice Get a device's description. Get a device's description.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param deviceId the device ID
@return Device
func (*DevicesApiService) GetDeviceComponentStatus ¶
func (a *DevicesApiService) GetDeviceComponentStatus(ctx _context.Context, authorization string, deviceId string, componentId string) (map[string]map[string]AttributeState, *_nethttp.Response, error)
GetDeviceComponentStatus Get a device component's status. Get the status of all attributes of a the component. The results may be filtered if the requester only has permission to view a subset of the component's capabilities. If the token is for a SmartApp that created the device then it implicitly has permission for this api.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param deviceId the device ID
- @param componentId The name of the component.
@return map[string]map[string]AttributeState
func (*DevicesApiService) GetDeviceStatus ¶
func (a *DevicesApiService) GetDeviceStatus(ctx _context.Context, authorization string, deviceId string) (DeviceStatus, *_nethttp.Response, error)
GetDeviceStatus Get the full status of a device. Get the current status of all of a device's component's attributes. The results may be filtered if the requester only has permission to view a subset of the device's components or capabilities. If the token is for a SmartApp that created the device then it implicitly has permission for this api.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param deviceId the device ID
@return DeviceStatus
func (*DevicesApiService) GetDeviceStatusByCapability ¶
func (a *DevicesApiService) GetDeviceStatusByCapability(ctx _context.Context, authorization string, deviceId string, componentId string, capabilityId string) (map[string]AttributeState, *_nethttp.Response, error)
GetDeviceStatusByCapability Get a capability's status. Get the current status of a device component's capability. If the token is for a SmartApp that created the device then it implicitly has permission for this api.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param deviceId the device ID
- @param componentId The name of the component.
- @param capabilityId The ID of the capability
@return map[string]AttributeState
func (*DevicesApiService) GetDevices ¶
func (a *DevicesApiService) GetDevices(ctx _context.Context, authorization string, localVarOptionals *GetDevicesOpts) (PagedDevices, *_nethttp.Response, error)
GetDevices List devices. Get a list of devices.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param optional nil or *GetDevicesOpts - Optional Parameters:
- @param "Capability" (optional.Interface of []string) - The device capabilities to filter the results by. The capabilities are treated as an \"and\" so all capabilities must be present.
- @param "LocationId" (optional.Interface of []string) - The device locations to filter the results by.
- @param "DeviceId" (optional.Interface of []string) - The device ids to filter the results by.
- @param "CapabilitiesMode" (optional.String) - Treat all capability filter query params as a logical \"or\" or \"and\" with a default of \"and\".
@return PagedDevices
func (*DevicesApiService) InstallDevice ¶
func (a *DevicesApiService) InstallDevice(ctx _context.Context, authorization string, installationRequest DeviceInstallRequest) (Device, *_nethttp.Response, error)
InstallDevice Install a Device. Install a device. This is only available for SmartApp managed devices. The SmartApp that creates the device is responsible for handling commands for the device and updating the status of the device by creating events.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param installationRequest Installation Request
@return Device
func (*DevicesApiService) UpdateDevice ¶
func (a *DevicesApiService) UpdateDevice(ctx _context.Context, authorization string, deviceId string, updateDeviceRequest UpdateDeviceRequest) (Device, *_nethttp.Response, error)
UpdateDevice Update a device. Update the properties of a device. If the token is for a SmartApp that created the device then it implicitly has permission for this api.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param deviceId the device ID
- @param updateDeviceRequest
@return Device
type DthDeviceDetails ¶
type DthDeviceDetails struct { // The identifier for the device's DeviceType. DeviceTypeId string `json:"deviceTypeId"` // The name for the device's DeviceType. DeviceTypeName string `json:"deviceTypeName"` // The device network type. DeviceNetworkType string `json:"deviceNetworkType,omitempty"` // True if the device setup has been completed so the device is ready to use. CompletedSetup bool `json:"completedSetup"` NetworkSecurityLevel DeviceNetworkSecurityLevel `json:"networkSecurityLevel,omitempty"` // The hub that the device is connected to. HubId string `json:"hubId,omitempty"` }
DthDeviceDetails struct for DthDeviceDetails
type EndpointApp ¶
type EndpointApp struct { // The name of the endpoint app AppName string `json:"appName,omitempty"` // The name of the partner/brand PartnerName string `json:"partnerName,omitempty"` // oAuth authorization url of the partner OAuthAuthorizationUrl string `json:"oAuthAuthorizationUrl,omitempty"` // lambda arn of the partner for US region (default) LambdaArn string `json:"lambdaArn,omitempty"` // lambda arn of the partner for EU region LambdaArnEU string `json:"lambdaArnEU,omitempty"` // lambda arn of the partner for AP region LambdaArnAP string `json:"lambdaArnAP,omitempty"` // lambda arn of the partner for CN region LambdaArnCN string `json:"lambdaArnCN,omitempty"` // url of partner icon Icon string `json:"icon,omitempty"` // url of partner icon in 2x dimensions Icon2x string `json:"icon2x,omitempty"` // url of partner icon in 3x dimensions Icon3x string `json:"icon3x,omitempty"` // Viper endpoint app id for the partner EndpointAppId string `json:"endpointAppId,omitempty"` // Client id for the partner oAuth OAuthClientId string `json:"oAuthClientId,omitempty"` // Client secret for the partner oAuth OAuthClientSecret string `json:"oAuthClientSecret,omitempty"` // oAuth token refresh url of the partner OAuthTokenUrl string `json:"oAuthTokenUrl,omitempty"` // oAuth scope for the partner. Example \"remote_control:all\" for Lifx OAuthScope string `json:"oAuthScope,omitempty"` // user id for the partner UserId string `json:"userId,omitempty"` // Possible values - \"lambda\" or \"webhook\" HostingType string `json:"hostingType,omitempty"` // Possible values - \"alexa-schema\", \"st-schema\", \"google-schema\" SchemaType string `json:"schemaType,omitempty"` // webhook url for the partner WebhookUrl string `json:"webhookUrl,omitempty"` // Possible values - \"\", \"cst\", \"wwst\" CertificationStatus string `json:"certificationStatus,omitempty"` }
EndpointApp struct for EndpointApp
type EqualsCondition ¶
type EqualsCondition struct { // Unique id for the condition Id string `json:"id,omitempty"` Left Operand `json:"left"` Right Operand `json:"right"` Aggregation ConditionAggregationMode `json:"aggregation,omitempty"` }
EqualsCondition struct for EqualsCondition
type Error ¶
type Error struct { // Machine readable error code. Code string `json:"code,omitempty"` // Human readable error message. Message string `json:"message,omitempty"` // Optional field used to point to a problamatic part of the request. Target string `json:"target,omitempty"` Details []Error `json:"details,omitempty"` }
Error Details about the error.
type ErrorResponse ¶
type ErrorResponse struct { // A correlation id used for reference when contacting support. RequestId string `json:"requestId,omitempty"` Error Error `json:"error,omitempty"` }
ErrorResponse struct for ErrorResponse
type EventType ¶
type EventType string
EventType The type of event passed to the app being executed. The type will be one of: * DEVICE_COMMANDS_EVENT - _Only applicable for cloud-to-cloud device integration apps._ An event as a result of a device command execution request. * DEVICE_EVENT - A device event as a result of a subscription the app created. * DEVICE_HEALTH_EVENT - A device health event as a result of a change in a device's health. * DEVICE_LIFECYCLE_EVENT - A device lifecycle event as the result of a life change to the device. * HUB_HEALTH_EVENT - A hub health event as a result of a change in a hub's health. * MODE_EVENT - A mode event is triggered when the location's mode is changed. * SCENE_LIFECYCLE_EVENT - A scene lifecycle event as a result of a life change to the scene. * SECURITY_ARM_STATE_EVENT - A security arm state event as a result of a change in the arm state of a security system. * TIMER_EVENT - An event as a result of a scheduled app execution.
const ( EVENTTYPE_DEVICE_COMMANDS_EVENT EventType = "DEVICE_COMMANDS_EVENT" EVENTTYPE_DEVICE_EVENT EventType = "DEVICE_EVENT" EVENTTYPE_DEVICE_HEALTH_EVENT EventType = "DEVICE_HEALTH_EVENT" EVENTTYPE_DEVICE_LIFECYCLE_EVENT EventType = "DEVICE_LIFECYCLE_EVENT" EVENTTYPE_HUB_HEALTH_EVENT EventType = "HUB_HEALTH_EVENT" EVENTTYPE_MODE_EVENT EventType = "MODE_EVENT" EVENTTYPE_SCENE_LIFECYCLE_EVENT EventType = "SCENE_LIFECYCLE_EVENT" EVENTTYPE_SECURITY_ARM_STATE_EVENT EventType = "SECURITY_ARM_STATE_EVENT" EVENTTYPE_TIMER_EVENT EventType = "TIMER_EVENT" EVENTTYPE_INSTALLED_APP_LIFECYCLE_EVENT EventType = "INSTALLED_APP_LIFECYCLE_EVENT" )
List of EventType
type EveryAction ¶
type EveryAction struct { // Unique id for the action Id string `json:"id,omitempty"` Interval Interval `json:"interval,omitempty"` Specific TimeOperand `json:"specific,omitempty"` Actions []Action `json:"actions"` }
EveryAction struct for EveryAction
type ExecuteSceneOpts ¶
ExecuteSceneOpts Optional parameters for the method 'ExecuteScene'
type ExecutionResult ¶
type ExecutionResult string
ExecutionResult the model 'ExecutionResult'
const ( EXECUTIONRESULT_SUCCESS ExecutionResult = "Success" EXECUTIONRESULT_FAILURE ExecutionResult = "Failure" )
List of ExecutionResult
type GenerateAppOAuthRequest ¶
type GenerateAppOAuthRequest struct { // A name given to the OAuth Client. ClientName string `json:"clientName,omitempty"` // A list of SmartThings API OAuth scope identifiers that maybe required to execute your integration. Scope []string `json:"scope,omitempty"` }
GenerateAppOAuthRequest struct for GenerateAppOAuthRequest
type GenerateAppOAuthResponse ¶
type GenerateAppOAuthResponse struct { OauthClientDetails AppOAuth `json:"oauthClientDetails,omitempty"` // The OAuth Client ID. OauthClientId string `json:"oauthClientId,omitempty"` // The OAuth Client Secret. OauthClientSecret string `json:"oauthClientSecret,omitempty"` }
GenerateAppOAuthResponse A response object containing a new OAuth Client and it's details.
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type GetAppSettingsResponse ¶
GetAppSettingsResponse Settings for a given app
type GetDeviceProfileOpts ¶
GetDeviceProfileOpts Optional parameters for the method 'GetDeviceProfile'
type GetDevicesOpts ¶
type GetDevicesOpts struct { Capability optional.Interface LocationId optional.Interface DeviceId optional.Interface CapabilitiesMode optional.String }
GetDevicesOpts Optional parameters for the method 'GetDevices'
type GreaterThanCondition ¶
type GreaterThanCondition struct { // Unique id for the condition Id string `json:"id,omitempty"` Left Operand `json:"left"` Right Operand `json:"right"` Aggregation ConditionAggregationMode `json:"aggregation,omitempty"` }
GreaterThanCondition struct for GreaterThanCondition
type GreaterThanOrEqualsCondition ¶
type GreaterThanOrEqualsCondition struct { // Unique id for the condition Id string `json:"id,omitempty"` Left Operand `json:"left"` Right Operand `json:"right"` Aggregation ConditionAggregationMode `json:"aggregation,omitempty"` }
GreaterThanOrEqualsCondition struct for GreaterThanOrEqualsCondition
type HubHealthDetail ¶
type HubHealthDetail struct { // A name for the subscription that will be passed to the installed app. SubscriptionName string `json:"subscriptionName,omitempty"` // The id of the location that both the app and hubs are in LocationId string `json:"locationId"` }
HubHealthDetail Details of a subscription of souce type HUB_HEALTH
type HubHealthEvent ¶
type HubHealthEvent struct { // The id of the event. EventId string `json:"eventId,omitempty"` // The id of the location in which the event was triggered. LocationId string `json:"locationId,omitempty"` // The id of the hub. HubId string `json:"hubId,omitempty"` // The status of the hub. Status string `json:"status,omitempty"` // The reason the hub is offline. Reason string `json:"reason,omitempty"` }
HubHealthEvent An event that represents a change in the health of a hub.
type IconImage ¶
type IconImage struct { // A default icon image url for an app. https url required. Url string `json:"url,omitempty"` }
IconImage A default icon image for the app.
type IfAction ¶
type IfAction struct { And []Condition `json:"and,omitempty"` Or []Condition `json:"or,omitempty"` Not Condition `json:"not,omitempty"` Equals EqualsCondition `json:"equals,omitempty"` GreaterThan GreaterThanCondition `json:"greater_than,omitempty"` GreaterThanOrEquals GreaterThanOrEqualsCondition `json:"greater_than_or_equals,omitempty"` LessThan LessThanCondition `json:"less_than,omitempty"` LessThanOrEquals LessThanOrEqualsCondition `json:"less_than_or_equals,omitempty"` Between BetweenCondition `json:"between,omitempty"` Changes ChangesCondition `json:"changes,omitempty"` // Unique id for the action Id string `json:"id,omitempty"` Then []Action `json:"then,omitempty"` Else []Action `json:"else,omitempty"` SubscriptionMode SubscriptionMode `json:"subscriptionMode,omitempty"` }
IfAction struct for IfAction
type IfActionAllOf ¶
type IfActionAllOf struct { // Unique id for the action Id string `json:"id,omitempty"` Then []Action `json:"then,omitempty"` Else []Action `json:"else,omitempty"` SubscriptionMode SubscriptionMode `json:"subscriptionMode,omitempty"` }
IfActionAllOf struct for IfActionAllOf
type InstallConfiguration ¶
type InstallConfiguration struct { // The ID of the installed app. InstalledAppId string `json:"installedAppId,omitempty"` // The ID to this configration instance. ConfigurationId string `json:"configurationId,omitempty"` ConfigurationStatus InstallConfigurationStatus `json:"configurationStatus,omitempty"` // A UTC ISO-8601 Date-Time String CreatedDate time.Time `json:"createdDate,omitempty"` // A UTC ISO-8601 Date-Time String LastUpdatedDate time.Time `json:"lastUpdatedDate,omitempty"` }
InstallConfiguration An configuration instance of an Installed App.
type InstallConfigurationDetail ¶
type InstallConfigurationDetail struct { // The ID of the installed app. InstalledAppId string `json:"installedAppId,omitempty"` // The ID to this configration instance. ConfigurationId string `json:"configurationId,omitempty"` ConfigurationStatus InstallConfigurationStatus `json:"configurationStatus,omitempty"` // A multi-map of configurations for an Installed App. The map 'key' is the configuration name and the 'value' is an array of ConfigEntry models each containing a value and associated permissions. The config key is alpha-numeric, may contain dashes, underscores, periods, and must be less then 50 characters long. Config map[string][]ConfigEntry `json:"config,omitempty"` // A UTC ISO-8601 Date-Time String CreatedDate time.Time `json:"createdDate,omitempty"` // A UTC ISO-8601 Date-Time String LastUpdatedDate time.Time `json:"lastUpdatedDate,omitempty"` }
InstallConfigurationDetail Encompasses both a configuration value, and any required permissions that maybe needed.
type InstallConfigurationStatus ¶
type InstallConfigurationStatus string
InstallConfigurationStatus Denotes the current state of a configuration instance. 'STAGED' configuration is used during active modification to config. A configuration is marked 'DONE' once it is deemed finished. At this point it is immutable, meaning it can't be changed. A status of 'AUTHORIZED' means the apps permissions have been authorized by the consumer. Installed Apps in 'AUTHORIZED' state are fully installed and used by the SmartThings platform. A status of 'REVOKED' means the apps permissions have been revoked.
const ( INSTALLCONFIGURATIONSTATUS_STAGED InstallConfigurationStatus = "STAGED" INSTALLCONFIGURATIONSTATUS_DONE InstallConfigurationStatus = "DONE" INSTALLCONFIGURATIONSTATUS_AUTHORIZED InstallConfigurationStatus = "AUTHORIZED" INSTALLCONFIGURATIONSTATUS_REVOKED InstallConfigurationStatus = "REVOKED" )
List of InstallConfigurationStatus
type InstalledApp ¶
type InstalledApp struct { // The ID of the installed app. InstalledAppId string `json:"installedAppId"` InstalledAppType InstalledAppType `json:"installedAppType"` InstalledAppStatus InstalledAppStatus `json:"installedAppStatus"` // A user defined name for the installed app. May be null. DisplayName string `json:"displayName,omitempty"` // The ID of the app. AppId string `json:"appId"` // A reference to an upstream system. For example, Behaviors would reference the behaviorId. May be null. ReferenceId string `json:"referenceId,omitempty"` // The ID of the location to which the installed app may belong. LocationId string `json:"locationId,omitempty"` Owner Owner `json:"owner"` Notices []Notice `json:"notices"` // A UTC ISO-8601 Date-Time String CreatedDate time.Time `json:"createdDate"` // A UTC ISO-8601 Date-Time String LastUpdatedDate time.Time `json:"lastUpdatedDate"` Ui InstalledAppUi `json:"ui,omitempty"` IconImage InstalledAppIconImage `json:"iconImage,omitempty"` // An App maybe associated to many classifications. A classification drives how the integration is presented to the user in the SmartThings mobile clients. These classifications include: * AUTOMATION - Denotes an integration that should display under the \"Automation\" tab in mobile clients. * SERVICE - Denotes an integration that is classified as a \"Service\". * DEVICE - Denotes an integration that should display under the \"Device\" tab in mobile clients. * CONNECTED_SERVICE - Denotes an integration that should display under the \"Connected Services\" menu in mobile clients. * HIDDEN - Denotes an integration that should not display in mobile clients Classifications []string `json:"classifications"` // Denotes the principal type to be used with the app. Default is LOCATION. PrincipalType string `json:"principalType"` // Inform the installation systems that the associated app can only be installed once within a user's account. SingleInstance bool `json:"singleInstance"` }
InstalledApp struct for InstalledApp
type InstalledAppIconImage ¶
type InstalledAppIconImage struct { // A default icon image url for an app. https url required. Url string `json:"url,omitempty"` }
InstalledAppIconImage A default icon image for the app.
type InstalledAppLifecycle ¶
type InstalledAppLifecycle string
InstalledAppLifecycle The installed app lifecycle. The lifecycle will be one of: * CREATE - Invoked when an application is created. * INSTALL - Invoked when an application is installed. * UPDATE - Invoked when an application is updated. * DELETE - Invoked when an application is deleted. * OTHER -
const ( INSTALLEDAPPLIFECYCLE_CREATE InstalledAppLifecycle = "CREATE" INSTALLEDAPPLIFECYCLE_INSTALL InstalledAppLifecycle = "INSTALL" INSTALLEDAPPLIFECYCLE_UPDATE InstalledAppLifecycle = "UPDATE" INSTALLEDAPPLIFECYCLE_DELETE InstalledAppLifecycle = "DELETE" INSTALLEDAPPLIFECYCLE_OTHER InstalledAppLifecycle = "OTHER" )
List of InstalledAppLifecycle
type InstalledAppLifecycleError ¶
type InstalledAppLifecycleError struct { Code string `json:"code,omitempty"` Message string `json:"message,omitempty"` Target string `json:"target,omitempty"` Details []InstalledAppLifecycleError `json:"details,omitempty"` }
InstalledAppLifecycleError struct for InstalledAppLifecycleError
type InstalledAppLifecycleEvent ¶
type InstalledAppLifecycleEvent struct { // The id of the event. EventId string `json:"eventId,omitempty"` // The ID of the location in which the event was triggered. LocationId string `json:"locationId,omitempty"` // The ID of the installed application. InstalledAppId string `json:"installedAppId,omitempty"` // The ID of the application. AppId string `json:"appId,omitempty"` Lifecycle InstalledAppLifecycle `json:"lifecycle,omitempty"` // Create installed app lifecycle. Create map[string]interface{} `json:"create,omitempty"` // Install installed app lifecycle. Install map[string]interface{} `json:"install,omitempty"` // Update installed app lifecycle. Update map[string]interface{} `json:"update,omitempty"` // Delete installed app lifecycle. Delete map[string]interface{} `json:"delete,omitempty"` // Other installed app lifecycle. Other map[string]interface{} `json:"other,omitempty"` Error InstalledAppLifecycleError `json:"error,omitempty"` }
InstalledAppLifecycleEvent An Installed App Lifecycle Event.
type InstalledAppStatus ¶
type InstalledAppStatus string
InstalledAppStatus Denotes the current state of an install. 'PENDING' is used during active modification to the install's config prior to 'AUTHORIZATION'. A status of 'AUTHORIZED' means the install's permissions have been authorized by the consumer. Installed Apps in 'AUTHORIZED' state are fully installed and usable by the SmartThings platform. A status of 'REVOKED' means the install's permissions have been revoked. A status of 'DISABLED' means a previously 'AUTHORIZED' Installed App will not execute.
const ( INSTALLEDAPPSTATUS_PENDING InstalledAppStatus = "PENDING" INSTALLEDAPPSTATUS_AUTHORIZED InstalledAppStatus = "AUTHORIZED" INSTALLEDAPPSTATUS_REVOKED InstalledAppStatus = "REVOKED" INSTALLEDAPPSTATUS_DISABLED InstalledAppStatus = "DISABLED" )
List of InstalledAppStatus
type InstalledAppType ¶
type InstalledAppType string
InstalledAppType Denotes the type of installed app.
const ( INSTALLEDAPPTYPE_LAMBDA_SMART_APP InstalledAppType = "LAMBDA_SMART_APP" INSTALLEDAPPTYPE_WEBHOOK_SMART_APP InstalledAppType = "WEBHOOK_SMART_APP" )
List of InstalledAppType
type InstalledAppUi ¶
type InstalledAppUi struct { PluginId string `json:"pluginId,omitempty"` PluginUri string `json:"pluginUri,omitempty"` DashboardCardsEnabled bool `json:"dashboardCardsEnabled"` PreInstallDashboardCardsEnabled bool `json:"preInstallDashboardCardsEnabled"` }
InstalledAppUi A collection of settings to drive user interface in SmartThings clients. Currently, only applicable for LAMBDA_SMART_APP and WEBHOOK_SMART_APP app types.
type InstalledappsApiService ¶
type InstalledappsApiService service
InstalledappsApiService InstalledappsApi service
func (*InstalledappsApiService) CreateInstalledAppEvents ¶
func (a *InstalledappsApiService) CreateInstalledAppEvents(ctx _context.Context, authorization string, installedAppId string, createInstalledAppEventsRequest CreateInstalledAppEventsRequest) (map[string]interface{}, *_nethttp.Response, error)
CreateInstalledAppEvents Create Installed App events. Create events for an installed app. This API allows Apps to create events to trigger custom behavior in installed apps. Requires a SmartApp token.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param installedAppId The ID of the installed application.
- @param createInstalledAppEventsRequest
@return map[string]interface{}
func (*InstalledappsApiService) DeleteInstallation ¶
func (a *InstalledappsApiService) DeleteInstallation(ctx _context.Context, authorization string, installedAppId string) (DeleteInstalledAppResponse, *_nethttp.Response, error)
DeleteInstallation Delete an installed app. Delete an Installed App.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param installedAppId The ID of the installed application.
@return DeleteInstalledAppResponse
func (*InstalledappsApiService) GetInstallation ¶
func (a *InstalledappsApiService) GetInstallation(ctx _context.Context, authorization string, installedAppId string) (InstalledApp, *_nethttp.Response, error)
GetInstallation Get an installed app. Fetch a single installed application.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param installedAppId The ID of the installed application.
@return InstalledApp
func (*InstalledappsApiService) GetInstallationConfig ¶
func (a *InstalledappsApiService) GetInstallationConfig(ctx _context.Context, authorization string, installedAppId string, configurationId string) (InstallConfigurationDetail, *_nethttp.Response, error)
GetInstallationConfig Get an installed app configuration. Fetch a detailed install configuration model containing actual config entries / values.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param installedAppId The ID of the installed application.
- @param configurationId The ID of the install configuration.
@return InstallConfigurationDetail
func (*InstalledappsApiService) ListInstallationConfig ¶
func (a *InstalledappsApiService) ListInstallationConfig(ctx _context.Context, authorization string, installedAppId string, localVarOptionals *ListInstallationConfigOpts) (PagedInstallConfigurations, *_nethttp.Response, error)
ListInstallationConfig List an installed app's configurations. List all configurations potentially filtered by status for an installed app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param installedAppId The ID of the installed application.
- @param optional nil or *ListInstallationConfigOpts - Optional Parameters:
- @param "ConfigurationStatus" (optional.String) - Filter for configuration status.
@return PagedInstallConfigurations
func (*InstalledappsApiService) ListInstallations ¶
func (a *InstalledappsApiService) ListInstallations(ctx _context.Context, authorization string, localVarOptionals *ListInstallationsOpts) (PagedInstalledApps, *_nethttp.Response, error)
ListInstallations List installed apps. List all installed applications within the specified locations. If no locations are provided, then list all installed apps accessible by the principle.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param optional nil or *ListInstallationsOpts - Optional Parameters:
- @param "LocationId" (optional.String) - The ID of the location that both the installed smart app and source are associated with.
- @param "InstalledAppStatus" (optional.String) - State of the Installed App.
- @param "InstalledAppType" (optional.String) - Denotes the type of installed app.
- @param "Tag" (optional.String) - May be used to filter a resource by it's assigned user-tags. Multiple tag query params are automatically joined with OR. Example usage in query string: ``` ?tag:key_name=value1&tag:key_name=value2 ```
- @param "AppId" (optional.String) - The ID of an App
- @param "ModeId" (optional.String) - The ID of the mode
- @param "DeviceId" (optional.String) - The ID of the device
@return PagedInstalledApps
type Interval ¶
type Interval struct { //Value Operand `json:"value"` Unit IntervalUnit `json:"unit"` }
Interval struct for Interval
type IntervalUnit ¶
type IntervalUnit string
IntervalUnit the model 'IntervalUnit'
const ( INTERVALUNIT_SECOND IntervalUnit = "Second" INTERVALUNIT_MINUTE IntervalUnit = "Minute" INTERVALUNIT_HOUR IntervalUnit = "Hour" INTERVALUNIT_DAY IntervalUnit = "Day" INTERVALUNIT_WEEK IntervalUnit = "Week" INTERVALUNIT_MONTH IntervalUnit = "Month" INTERVALUNIT_YEAR IntervalUnit = "Year" )
List of IntervalUnit
type IrDeviceDetails ¶
type IrDeviceDetails struct { // The id of the Parent device. ParentDeviceId string `json:"parentDeviceId,omitempty"` // The id of the profile that describes the device components and capabilities. ProfileId string `json:"profileId,omitempty"` // The OCF Device Type OcfDeviceType string `json:"ocfDeviceType,omitempty"` // The id of the ircode IrCode string `json:"irCode,omitempty"` FunctionCodes IrDeviceDetailsFunctionCodes `json:"functionCodes,omitempty"` // list of child devices ChildDevices []IrDeviceDetails `json:"childDevices,omitempty"` // Key value pairs stored in the conductor for the device. UI Metadata information Metadata map[string]interface{} `json:"metadata,omitempty"` }
IrDeviceDetails struct for IrDeviceDetails
type IrDeviceDetailsFunctionCodes ¶
type IrDeviceDetailsFunctionCodes struct {
Default string `json:"default,omitempty"`
}
IrDeviceDetailsFunctionCodes List of IR function codes
type IsaResults ¶
type IsaResults struct { // isaId installed for the user IsaId string `json:"isaId,omitempty"` // Viper connector name given by partner in DevWorkspace eg Lifx (Connect) AppName string `json:"appName,omitempty"` // Parnter name eg Lifx Inc PartnerName string `json:"partnerName,omitempty"` // url of partner icon Icon string `json:"icon,omitempty"` // url of partner icon in 2x dimensions Icon2x string `json:"icon2x,omitempty"` // url of partner icon in 3x dimensions Icon3x string `json:"icon3x,omitempty"` // location of the installed smart app LocationId string `json:"locationId,omitempty"` }
IsaResults struct for IsaResults
type LambdaSmartApp ¶
type LambdaSmartApp struct { // A list of AWS arns referencing a Lambda function. Functions []string `json:"functions,omitempty"` }
LambdaSmartApp Details related to a Lambda Smart App implementation. This model will only be available for apps of type LAMBDA_SMART_APP.
type LessThanCondition ¶
type LessThanCondition struct { // Unique id for the condition Id string `json:"id,omitempty"` Left Operand `json:"left"` Right Operand `json:"right"` Aggregation ConditionAggregationMode `json:"aggregation,omitempty"` }
LessThanCondition struct for LessThanCondition
type LessThanOrEqualsCondition ¶
type LessThanOrEqualsCondition struct { // Unique id for the condition Id string `json:"id,omitempty"` Left Operand `json:"left"` Right Operand `json:"right"` Aggregation ConditionAggregationMode `json:"aggregation,omitempty"` }
LessThanOrEqualsCondition struct for LessThanOrEqualsCondition
type Link ¶
type Link struct { // An absolute URL linking to a resource. Href string `json:"href,omitempty"` }
Link struct for Link
type ListAppsOpts ¶
type ListAppsOpts struct { AppType optional.String Classification optional.String Tag optional.String }
ListAppsOpts Optional parameters for the method 'ListApps'
type ListDeviceProfilesOpts ¶
ListDeviceProfilesOpts Optional parameters for the method 'ListDeviceProfiles'
type ListInstallationConfigOpts ¶
ListInstallationConfigOpts Optional parameters for the method 'ListInstallationConfig'
type ListInstallationsOpts ¶
type ListInstallationsOpts struct { LocationId optional.String InstalledAppStatus optional.String InstalledAppType optional.String Tag optional.String AppId optional.String ModeId optional.String DeviceId optional.String }
ListInstallationsOpts Optional parameters for the method 'ListInstallations'
type ListRulesOpts ¶
ListRulesOpts Optional parameters for the method 'ListRules'
type ListScenesOpts ¶
ListScenesOpts Optional parameters for the method 'ListScenes'
type LocaleReference ¶
type LocaleReference struct { // The tag of the locale as defined in [RFC bcp47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt). Tag string `json:"tag,omitempty"` }
LocaleReference struct for LocaleReference
type LocaleVariables ¶
type LocaleVariables struct { // The tag of the locale as defined in [RFC bcp47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt). LocaleTag string `json:"localeTag"` // A map<string,string> with the key representing the variable name, and the value representing the verbiage to be replaced in template string. Variables map[string]string `json:"variables,omitempty"` }
LocaleVariables Message template variables associated with a certain locale.
type Location ¶
type Location struct { // The ID of the location. LocationId string `json:"locationId,omitempty"` // A name given for the location (eg. Home) Name string `json:"name,omitempty"` // An ISO Alpha-3 country code. (i.e. GBR, USA) CountryCode string `json:"countryCode,omitempty"` // A geographical latitude. Latitude float32 `json:"latitude,omitempty"` // A geographical longitude. Longitude float32 `json:"longitude,omitempty"` // The radius in meters around latitude and longitude which defines this location. RegionRadius int32 `json:"regionRadius,omitempty"` // The desired temperature scale used within location. Value can be F or C. TemperatureScale string `json:"temperatureScale,omitempty"` // An ID matching the Java Time Zone ID of the location. Automatically generated if latitude and longitude have been provided. TimeZoneId string `json:"timeZoneId,omitempty"` // An IETF BCP 47 language tag representing the chosen locale for this location. Locale string `json:"locale,omitempty"` // Not currently in use. BackgroundImage string `json:"backgroundImage,omitempty"` // Additional information about the location that allows SmartThings to further define your location. AdditionalProperties map[string]string `json:"additionalProperties,omitempty"` }
Location struct for Location
type LocationAction ¶
type LocationAction struct { // Unique id for the action Id string `json:"id"` Mode string `json:"mode,omitempty"` }
LocationAction struct for LocationAction
type LocationAttribute ¶
type LocationAttribute string
LocationAttribute the model 'LocationAttribute'
const ( LOCATIONATTRIBUTE_MODE LocationAttribute = "Mode" LOCATIONATTRIBUTE_ARM_STATE LocationAttribute = "ArmState" )
List of LocationAttribute
type LocationOperand ¶
type LocationOperand struct { Attribute LocationAttribute `json:"attribute"` // Optional value to allow UI to reference a location attribute by id. If value is provided, the operand resolves to this value rather than calling the backend API Value string `json:"value,omitempty"` }
LocationOperand struct for LocationOperand
type LocationsApiService ¶
type LocationsApiService service
LocationsApiService LocationsApi service
func (*LocationsApiService) CreateLocation ¶
func (a *LocationsApiService) CreateLocation(ctx _context.Context, authorization string, createLocationRequest CreateLocationRequest) (Location, *_nethttp.Response, error)
CreateLocation Create a Location. Create a Location for a user. We will try and create the Location geographically close to the country code provided in the request body. If we do not support Location creation in the requested country code, then the API will return a 422 error response with an error code of UnsupportedGeoRegionError.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param createLocationRequest
@return Location
func (*LocationsApiService) DeleteLocation ¶
func (a *LocationsApiService) DeleteLocation(ctx _context.Context, authorization string, locationId string) (map[string]interface{}, *_nethttp.Response, error)
DeleteLocation Delete a Location. Delete a Location from a user's account.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param locationId The ID of the location.
@return map[string]interface{}
func (*LocationsApiService) GetLocation ¶
func (a *LocationsApiService) GetLocation(ctx _context.Context, authorization string, locationId string) (Location, *_nethttp.Response, error)
GetLocation Get a Location. Get a specific Location from a user's account.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param locationId The ID of the location.
@return Location
func (*LocationsApiService) ListLocations ¶
func (a *LocationsApiService) ListLocations(ctx _context.Context, authorization string) (PagedLocations, *_nethttp.Response, error)
ListLocations List Locations. List all Locations currently available in a user account.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
@return PagedLocations
func (*LocationsApiService) UpdateLocation ¶
func (a *LocationsApiService) UpdateLocation(ctx _context.Context, authorization string, locationId string, updateLocationRequest UpdateLocationRequest) (Location, *_nethttp.Response, error)
UpdateLocation Update a Location. All the fields in the request body are optional. Only the specified fields will be updated.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param locationId The ID of the location.
- @param updateLocationRequest
@return Location
type Message ¶
type Message struct { // The tag of the locale as defined in [RFC bcp47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt). FallbackLocale string `json:"fallbackLocale"` // A list of templates representing the same message in different languages. Templates []MessageTemplate `json:"templates"` }
Message A Message contains a list of message templates representing the same message in different locales. The system will serve the template with the locale that best matches the Recipient's language preferences. If the user's language preferences do not correlate to any message templates, the template defined by the `fallbackLocale` will be used.
type MessageConfig ¶
type MessageConfig struct { // The key value of the message group. MessageGroupKey string `json:"messageGroupKey,omitempty"` }
MessageConfig A message configuration.
type MessageTemplate ¶
type MessageTemplate struct { // The tag of the locale as defined in [RFC bcp47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt). LocaleTag string `json:"localeTag"` // A message template string. Specify variables using the double curly braces convention. i.e. \"Hello, {{ firstName }}!\" Template string `json:"template"` }
MessageTemplate A message template definition, representing a message in a specific locale.
type MessageType ¶
type MessageType string
MessageType The expected message format to be sent.
const ( MESSAGETYPE_PREDEFINED MessageType = "PREDEFINED" MESSAGETYPE_ADHOC MessageType = "ADHOC" )
List of MessageType
type Mode ¶
type Mode struct { // Globally unique id for the mode. Id string `json:"id"` // A name provided by the User. Unique per location, updatable. Label string `json:"label"` // A name provided when the mode was created. The name is unique per location, and can not be updated. Name string `json:"name"` }
Mode struct for Mode
type ModeConfig ¶
type ModeConfig struct { // The ID of the mode. ModeId string `json:"modeId,omitempty"` }
ModeConfig A mode configuration.
type ModeEvent ¶
type ModeEvent struct { // The id of the event. EventId string `json:"eventId,omitempty"` // The id of the location in which the event was triggered. LocationId string `json:"locationId,omitempty"` // The ID of the mode associated with a MODE_EVENT. ModeId string `json:"modeId,omitempty"` }
ModeEvent struct for ModeEvent
type ModeSubscriptionDetail ¶
type ModeSubscriptionDetail struct { // The GUID for the location to subscribe to mode changes. LocationId string `json:"locationId"` }
ModeSubscriptionDetail Details of a subscription of source type MODE. This will subscribe to all mode changes for the given location. The installed app can then act on the resulting mode change event accordingly.
type Notice ¶
type Notice struct { Code NoticeCode `json:"code,omitempty"` // The url of the badge icon for the notice card BadgeUrl string `json:"badgeUrl,omitempty"` // The localized message to be displayed Message string `json:"message,omitempty"` // The action(s) a user can take to resolve this notice Actions []NoticeAction `json:"actions,omitempty"` }
Notice struct for Notice
type NoticeAction ¶
type NoticeAction string
NoticeAction An action the user can take to resolve a notice
const ( NOTICEACTION_DISMISS NoticeAction = "DISMISS" NOTICEACTION_EDIT NoticeAction = "EDIT" NOTICEACTION_NONE NoticeAction = "NONE" )
List of NoticeAction
type NoticeCode ¶
type NoticeCode string
NoticeCode * USER_PAUSE - Denotes installed app is paused by the user and user action is required to unpause it. * REVISIT - Denotes installed app is still running and user action may be required to reconcile a configuration. * RECONFIGURE - Denotes installed app is no longer running and user action is required to resolve a configuration issue.
const ( NOTICECODE_USER_PAUSE NoticeCode = "USER_PAUSE" NOTICECODE_REVISIT NoticeCode = "REVISIT" NOTICECODE_RECONFIGURE NoticeCode = "RECONFIGURE" )
List of NoticeCode
type OnceSchedule ¶
type OnceSchedule struct { // The time in millis from jan 1 1970 UTC for ONCE schedules. Must be less than 2 years from now. Time int64 `json:"time"` Overwrite bool `json:"overwrite,omitempty"` }
OnceSchedule struct for OnceSchedule
type Operand ¶
type Operand struct { Boolean bool `json:"boolean,omitempty"` Decimal float64 `json:"decimal,omitempty"` Integer int64 `json:"integer,omitempty"` String string `json:"string,omitempty"` Array ArrayOperand `json:"array,omitempty"` Map map[string]Operand `json:"map,omitempty"` Device DeviceOperand `json:"device,omitempty"` Location LocationOperand `json:"location,omitempty"` Date DateOperand `json:"date,omitempty"` Time TimeOperand `json:"time,omitempty"` Datetime DateTimeOperand `json:"datetime,omitempty"` }
Operand struct for Operand
type OperandAggregationMode ¶
type OperandAggregationMode string
OperandAggregationMode the model 'OperandAggregationMode'
const ( OPERANDAGGREGATIONMODE_NONE OperandAggregationMode = "None" OPERANDAGGREGATIONMODE_AVG OperandAggregationMode = "Avg" OPERANDAGGREGATIONMODE_SUM OperandAggregationMode = "Sum" OPERANDAGGREGATIONMODE_MIN OperandAggregationMode = "Min" OPERANDAGGREGATIONMODE_MAX OperandAggregationMode = "Max" OPERANDAGGREGATIONMODE_LEAST OperandAggregationMode = "Least" OPERANDAGGREGATIONMODE_MOST OperandAggregationMode = "Most" )
List of OperandAggregationMode
type Owner ¶
type Owner struct { // The account type which owns the specific domain item. OwnerType string `json:"ownerType,omitempty"` // A global idenfifier for owner. OwnerId string `json:"ownerId,omitempty"` }
Owner A typed model which provides information around ownership of a specific domain.
type PagedApp ¶
type PagedApp struct { // A user defined unique identifier for an app. It is alpha-numeric, may contain dashes, underscores, periods, and be less then 250 characters long. It must be unique within your account. AppName string `json:"appName,omitempty"` // A globally unique identifier for an app. AppId string `json:"appId,omitempty"` AppType AppType `json:"appType,omitempty"` // An App maybe associated to many classifications. A classification drives how the integration is presented to the user in the SmartThings mobile clients. These classifications include: * AUTOMATION - Denotes an integration that should display under the \"Automation\" tab in mobile clients. * SERVICE - Denotes an integration that is classified as a \"Service\". * DEVICE - Denotes an integration that should display under the \"Device\" tab in mobile clients. * CONNECTED_SERVICE - Denotes an integration that should display under the \"Connected Services\" menu in mobile clients. * HIDDEN - Denotes an integration that should not display in mobile clients Classifications []AppClassification `json:"classifications,omitempty"` // A default display name for an app. DisplayName string `json:"displayName,omitempty"` // A default description for an app. Description string `json:"description,omitempty"` IconImage IconImage `json:"iconImage,omitempty"` Owner Owner `json:"owner,omitempty"` // A UTC ISO-8601 Date-Time String CreatedDate time.Time `json:"createdDate,omitempty"` // A UTC ISO-8601 Date-Time String LastUpdatedDate time.Time `json:"lastUpdatedDate,omitempty"` }
PagedApp struct for PagedApp
type PagedApps ¶
type PagedApps struct { Items []PagedApp `json:"items,omitempty"` Links Links `json:"_links,omitempty"` }
PagedApps Represents a single page of Apps available in an account.
type PagedDeviceProfiles ¶
type PagedDeviceProfiles struct { Items []DeviceProfile `json:"items,omitempty"` Links Links `json:"_links,omitempty"` }
PagedDeviceProfiles struct for PagedDeviceProfiles
type PagedDevices ¶
type PagedDevices struct { Items []Device `json:"items,omitempty"` Links Links `json:"_links,omitempty"` }
PagedDevices A paginated array of devices.
type PagedInstallConfigurations ¶
type PagedInstallConfigurations struct { Items []InstallConfiguration `json:"items,omitempty"` Links Links `json:"_links,omitempty"` }
PagedInstallConfigurations Represents a single page of InstallConfiguration models available for an InstalledApp.
type PagedInstalledApps ¶
type PagedInstalledApps struct { Items []InstalledApp `json:"items,omitempty"` Links Links `json:"_links,omitempty"` }
PagedInstalledApps Represents a single page of InstalledApps available in a user account.
type PagedLocation ¶
type PagedLocation struct { // The ID of the location. LocationId string `json:"locationId,omitempty"` // A name given for the location (eg. Home) Name string `json:"name,omitempty"` }
PagedLocation A slimmed down represenation of the Location model.
type PagedLocations ¶
type PagedLocations struct { Items []PagedLocation `json:"items,omitempty"` Links Links `json:"_links,omitempty"` }
PagedLocations Represents a single page of Locations available in a user account.
type PagedMessageTemplate ¶
type PagedMessageTemplate struct { // A globally unique identifier for an app. AppId string `json:"appId"` MessageTemplateKey string `json:"messageTemplateKey"` }
PagedMessageTemplate A simplified Message model which is retured during a list operation.
type PagedRooms ¶
type PagedRooms struct { Items []Room `json:"items,omitempty"` Links Links `json:"_links,omitempty"` }
PagedRooms Represents a single page of Rooms available in a Location.
type PagedRules ¶
type PagedRules struct { Items []Rule `json:"items,omitempty"` Links Links `json:"_links,omitempty"` }
PagedRules An array of rules
type PagedSchedules ¶
type PagedSchedules struct { Items []Schedule `json:"items,omitempty"` Links Links `json:"_links,omitempty"` }
PagedSchedules An array of schedules
type PagedSubscriptions ¶
type PagedSubscriptions struct { Items []Subscription `json:"items,omitempty"` Links Links `json:"_links,omitempty"` }
PagedSubscriptions An array of subscriptions
type ParentType ¶
type ParentType string
ParentType The source of the rule
const ( PARENTTYPE_ISA ParentType = "Isa" PARENTTYPE_USER ParentType = "User" )
List of ParentType
type PermissionConfig ¶
type PermissionConfig struct {
Permissions []string `json:"permissions,omitempty"`
}
PermissionConfig Required permissions for the installed app.
type PredefinedMessage ¶
type PredefinedMessage struct { MessageTemplateKey string `json:"messageTemplateKey"` // A map<string,string> with the key representing the variable name, and the value representing the verbiage to be replaced in template string. `defaultVariables` are only used when there are no matching `localeVariables`. DefaultVariables map[string]string `json:"defaultVariables,omitempty"` // Variables to resolve for specific locales. LocaleVariables []LocaleVariables `json:"localeVariables,omitempty"` }
PredefinedMessage Predefined message options. Variables from `localeVariables` matching the locale of the Message will be assigned first, then `defaultVariables`.
type PrincipalType ¶
type PrincipalType string
PrincipalType Denotes the principal type to be used with the app. Default is LOCATION.
const ( PRINCIPALTYPE_LOCATION PrincipalType = "LOCATION" PRINCIPALTYPE_USER_LEVEL PrincipalType = "USER_LEVEL" )
List of PrincipalType
type Room ¶
type Room struct { // The ID of the room. RoomId string `json:"roomId,omitempty"` // The ID of the parent location. LocationId string `json:"locationId,omitempty"` // A name given for the room (eg. Living Room) Name string `json:"name,omitempty"` // Not currently in use. BackgroundImage string `json:"backgroundImage,omitempty"` }
Room struct for Room
type RoomsApiService ¶
type RoomsApiService service
RoomsApiService RoomsApi service
func (*RoomsApiService) CreateRoom ¶
func (a *RoomsApiService) CreateRoom(ctx _context.Context, authorization string, locationId string, createRoomRequest CreateRoomRequest) (Room, *_nethttp.Response, error)
CreateRoom Create a Room. Create a Room for the Location.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param locationId The ID of the location.
- @param createRoomRequest
@return Room
func (*RoomsApiService) DeleteRoom ¶
func (a *RoomsApiService) DeleteRoom(ctx _context.Context, authorization string, locationId string, roomId string) (map[string]interface{}, *_nethttp.Response, error)
DeleteRoom Delete a Room. Delete a Room from a location.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param locationId The ID of the location.
- @param roomId The ID of the room.
@return map[string]interface{}
func (*RoomsApiService) GetRoom ¶
func (a *RoomsApiService) GetRoom(ctx _context.Context, authorization string, locationId string, roomId string) (Room, *_nethttp.Response, error)
GetRoom Get a Room. Get a specific Room.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param locationId The ID of the location.
- @param roomId The ID of the room.
@return Room
func (*RoomsApiService) ListRooms ¶
func (a *RoomsApiService) ListRooms(ctx _context.Context, authorization string, locationId string) (PagedRooms, *_nethttp.Response, error)
ListRooms List Rooms. List all Rooms currently available in a Location.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param locationId The ID of the location.
@return PagedRooms
func (*RoomsApiService) UpdateRoom ¶
func (a *RoomsApiService) UpdateRoom(ctx _context.Context, authorization string, locationId string, roomId string, updateRoomRequest UpdateRoomRequest) (Room, *_nethttp.Response, error)
UpdateRoom Update a Room. All the fields in the request body are optional. Only the specified fields will be updated.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param locationId The ID of the location.
- @param roomId The ID of the room.
- @param updateRoomRequest
@return Room
type Rule ¶
type Rule struct { // Name for the rule Name string `json:"name"` Actions []Action `json:"actions"` // Time zone ID for this rule. This overrides the location time zone ID, but is overridden by time zone ID provided by each operand individually TimeZoneId string `json:"timeZoneId,omitempty"` // Unique id for the rule Id string `json:"id"` }
Rule struct for Rule
type RuleAllOf ¶
type RuleAllOf struct { // Unique id for the rule Id string `json:"id"` }
RuleAllOf struct for RuleAllOf
type RuleExecutionResponse ¶
type RuleExecutionResponse struct { RuleId string `json:"ruleId"` Result ExecutionResult `json:"result"` }
RuleExecutionResponse The result of a rule execution
type RuleMetadata ¶
type RuleMetadata struct { Version string `json:"version,omitempty"` Rule Rule `json:"rule"` // The ID of the installed application. InstalledAppId string `json:"installedAppId"` // The ID of the location. LocationId string `json:"locationId"` // The source ID that created the rule ParentId string `json:"parentId,omitempty"` ParentType ParentType `json:"parentType,omitempty"` // The uuid of the user UserUuid string `json:"userUuid,omitempty"` // Boolean for whether rule is installed locally ExecutingLocally bool `json:"executingLocally,omitempty"` // The date when rule was created DateCreated string `json:"dateCreated,omitempty"` // The date when rule was last updated DateUpdated string `json:"dateUpdated,omitempty"` }
RuleMetadata Defines a rule with its associated meta data.
type RuleRequest ¶
type RuleRequest struct { // Name for the rule Name string `json:"name"` Actions []Action `json:"actions"` // Time zone ID for this rule. This overrides the location time zone ID, but is overridden by time zone ID provided by each operand individually TimeZoneId string `json:"timeZoneId,omitempty"` }
RuleRequest struct for RuleRequest
type RulesApiService ¶
type RulesApiService service
RulesApiService RulesApi service
func (*RulesApiService) CreateRule ¶
func (a *RulesApiService) CreateRule(ctx _context.Context, authorization string, locationId string, request RuleRequest) (map[string]interface{}, *_nethttp.Response, error)
CreateRule Create a rule Create a rule for the location and token principal
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param locationId The ID of the location in which to create the rule in.
- @param request The rule to be created.
@return map[string]interface{}
func (*RulesApiService) DeleteRule ¶
func (a *RulesApiService) DeleteRule(ctx _context.Context, authorization string, ruleId string, locationId string) (Rule, *_nethttp.Response, error)
DeleteRule Delete a rule Delete a rule
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param ruleId The rule ID
- @param locationId The ID of the location in which to delete the rule in.
@return Rule
func (*RulesApiService) ExecuteRule ¶
func (a *RulesApiService) ExecuteRule(ctx _context.Context, authorization string, ruleId string, locationId string) (RuleExecutionResponse, *_nethttp.Response, error)
ExecuteRule Execute a rule Trigger Rule execution given a rule ID
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param ruleId The rule ID
- @param locationId The ID of the location that both the installed smart app and source are associated with.
@return RuleExecutionResponse
func (*RulesApiService) GetRule ¶
func (a *RulesApiService) GetRule(ctx _context.Context, authorization string, ruleId string, locationId string) (Rule, *_nethttp.Response, error)
GetRule Get a Rule Get a rule
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param ruleId The rule ID
- @param locationId The ID of the location to list the rules for.
@return Rule
func (*RulesApiService) ListRules ¶
func (a *RulesApiService) ListRules(ctx _context.Context, authorization string, locationId string, localVarOptionals *ListRulesOpts) (PagedRules, *_nethttp.Response, error)
ListRules Rules list List of rules for the location for the given token principal
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param locationId The ID of the location to list the rules for.
- @param optional nil or *ListRulesOpts - Optional Parameters:
- @param "Max" (optional.Int32) - The max number of rules to fetch
- @param "Offset" (optional.Int32) - The start index of rules to fetch
@return PagedRules
func (*RulesApiService) UpdateRule ¶
func (a *RulesApiService) UpdateRule(ctx _context.Context, authorization string, ruleId string, locationId string, request RuleRequest) (Rule, *_nethttp.Response, error)
UpdateRule Update a rule Update a rule
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param ruleId The rule ID
- @param locationId The ID of the location in which to update the rule in.
- @param request The rule to be updated.
@return Rule
type SaveSubscriptionOpts ¶
SaveSubscriptionOpts Optional parameters for the method 'SaveSubscription'
type SceneAction ¶
type SceneAction struct { DeviceRequest SceneDeviceRequest `json:"deviceRequest,omitempty"` ModeRequest SceneModeRequest `json:"modeRequest,omitempty"` SleepRequest SceneSleepRequest `json:"sleepRequest,omitempty"` DeviceGroupRequest SceneDeviceGroupRequest `json:"deviceGroupRequest,omitempty"` }
SceneAction Possible scene actions, mutually exclusive
type SceneArgument ¶
type SceneArgument struct { // the name of the command Name string `json:"name,omitempty"` // the schema of the command Schema map[string]interface{} `json:"schema,omitempty"` // The value being set for the capability command Value map[string]interface{} `json:"value,omitempty"` }
SceneArgument A capability command argument
type SceneCapability ¶
type SceneCapability struct { // The id of the capability CapabilityId string `json:"capabilityId,omitempty"` // The status of the capability Status string `json:"status,omitempty"` // Capability commands Commands map[string]SceneCommand `json:"commands,omitempty"` }
SceneCapability A device component capability
type SceneCommand ¶
type SceneCommand struct { // the command arguments Arguments []SceneArgument `json:"arguments,omitempty"` }
SceneCommand A component capability command
type SceneComponent ¶
type SceneComponent struct { // the id of the component ComponentId string `json:"componentId,omitempty"` Capabilities []SceneCapability `json:"capabilities,omitempty"` }
SceneComponent A component of the scene device
type SceneConfig ¶
type SceneConfig struct { // The ID of the scene. SceneId string `json:"sceneId,omitempty"` Permissions []string `json:"permissions,omitempty"` }
SceneConfig A scene configuration.
type SceneDevice ¶
type SceneDevice struct { // the id of the device DeviceId string `json:"deviceId,omitempty"` // the label of the device DeviceLabel string `json:"deviceLabel,omitempty"` // the name of the device DeviceName string `json:"deviceName,omitempty"` // The identifier for the device's DeviceType. DeviceTypeId string `json:"deviceTypeId,omitempty"` Components []SceneComponent `json:"components,omitempty"` // Location of the device LocationId string `json:"locationId,omitempty"` }
SceneDevice struct for SceneDevice
type SceneDeviceGroup ¶
type SceneDeviceGroup struct { // the id of the device DeviceGroupId string `json:"deviceGroupId,omitempty"` Capability SceneCapability `json:"capability,omitempty"` }
SceneDeviceGroup struct for SceneDeviceGroup
type SceneDeviceGroupRequest ¶
type SceneDeviceGroupRequest struct { // the id of the device group DeviceGroupId string `json:"deviceGroupId"` // the id of the action to be created. Optional, sent by Reaver only ActionId string `json:"actionId,omitempty"` Capability SceneCapability `json:"capability,omitempty"` }
SceneDeviceGroupRequest JSON structure for a device group when creating a Scene
type SceneDeviceRequest ¶
type SceneDeviceRequest struct { // the id of the device DeviceId string `json:"deviceId,omitempty"` // the id of the action to be created. Optional, sent by Reaver only ActionId string `json:"actionId,omitempty"` Components []SceneComponent `json:"components,omitempty"` }
SceneDeviceRequest JSON structure for a device when creating a Scene
type SceneLifecycle ¶
type SceneLifecycle string
SceneLifecycle The scene lifecycle. The lifecycle will be one of: * CREATE - Invoked when a scene is created. * UPDATE - Invoked when a scene is updated. * DELETE - Invoked when a scene is deleted.
const ( SCENELIFECYCLE_CREATE SceneLifecycle = "CREATE" SCENELIFECYCLE_UPDATE SceneLifecycle = "UPDATE" SCENELIFECYCLE_DELETE SceneLifecycle = "DELETE" )
List of SceneLifecycle
type SceneLifecycleDetail ¶
type SceneLifecycleDetail struct { // A name for the subscription that will be passed to the installed app. SubscriptionName string `json:"subscriptionName,omitempty"` // The id of the location that both the app and scenes are in. LocationId string `json:"locationId"` }
SceneLifecycleDetail Details of a subscription of source type SCENE_LIFECYCLE.
type SceneLifecycleEvent ¶
type SceneLifecycleEvent struct { Lifecycle SceneLifecycle `json:"lifecycle,omitempty"` // The id of the event. EventId string `json:"eventId,omitempty"` // The id of the location in which the event was triggered. LocationId string `json:"locationId,omitempty"` // The id of the scene. SceneId string `json:"sceneId,omitempty"` // Create scene lifecycle. Create map[string]interface{} `json:"create,omitempty"` // Update scene lifecycle. Update map[string]interface{} `json:"update,omitempty"` // Delete scene lifecycle. Delete map[string]interface{} `json:"delete,omitempty"` }
SceneLifecycleEvent A scene lifecycle event.
type SceneMode ¶
type SceneMode struct { // the id of the mode ModeId string `json:"modeId,omitempty"` // the name of the mode ModeName string `json:"modeName,omitempty"` }
SceneMode The mode activated by the Scene
type SceneModeRequest ¶
type SceneModeRequest struct { // The id of the mode ModeId string `json:"modeId"` // the id of the action to be created. Optional, sent by Reaver only ActionId string `json:"actionId,omitempty"` // The name of the mode ModeName string `json:"modeName,omitempty"` }
SceneModeRequest The mode to be activated by the Scene
type ScenePagedResult ¶
type ScenePagedResult struct { Items []SceneSummary `json:"items,omitempty"` Links Links `json:"_links,omitempty"` }
ScenePagedResult struct for ScenePagedResult
type SceneRequest ¶
type SceneRequest struct { // The user-defined name of the Scene SceneName string `json:"sceneName"` // The name of the icon SceneIcon string `json:"sceneIcon,omitempty"` // The color of the icon SceneColor string `json:"sceneColor,omitempty"` // Non-sequential list of device actions Devices []SceneDeviceRequest `json:"devices"` // List of parallel action sequences Sequences [][]SceneAction `json:"sequences,omitempty"` Mode SceneModeRequest `json:"mode,omitempty"` SecurityMode SceneSecurityModeRequest `json:"securityMode,omitempty"` // List of device group actions Devicegroups []SceneDeviceGroupRequest `json:"devicegroups,omitempty"` }
SceneRequest JSON body for creating or updating a Scene
type SceneSecurityModeRequest ¶
type SceneSecurityModeRequest struct { // the id of the action to be created. Optional, sent by Reaver only ActionId string `json:"actionId,omitempty"` // The id of the security mode Security string `json:"security"` // Additional query param Arguments string `json:"arguments,omitempty"` }
SceneSecurityModeRequest The security mode to be activated by the Scene
type SceneSleepRequest ¶
type SceneSleepRequest struct { // Number of seconds to sleep the sequence Seconds int32 `json:"seconds"` }
SceneSleepRequest Sleep a particular sequence
type SceneSummary ¶
type SceneSummary struct { // The unique identifier of the Scene SceneId string `json:"sceneId,omitempty"` // The user-defined name of the Scene SceneName string `json:"sceneName,omitempty"` // The name of the icon SceneIcon string `json:"sceneIcon,omitempty"` // The color of the icon SceneColor string `json:"sceneColor,omitempty"` // Location of the Scene LocationId string `json:"locationId,omitempty"` // The unique identifier of the user that created the scene CreatedBy string `json:"createdBy,omitempty"` // The date the scene was created CreatedDate time.Time `json:"createdDate,omitempty"` // The date the scene was last updated LastUpdatedDate time.Time `json:"lastUpdatedDate,omitempty"` // The date the scene was last executed LastExecutedDate time.Time `json:"lastExecutedDate,omitempty"` // Whether or not this scene can be edited by the logged in user using the version of the app that made the request Editable bool `json:"editable,omitempty"` ApiVersion string `json:"apiVersion,omitempty"` }
SceneSummary struct for SceneSummary
type ScenesApiService ¶
type ScenesApiService service
ScenesApiService ScenesApi service
func (*ScenesApiService) ExecuteScene ¶
func (a *ScenesApiService) ExecuteScene(ctx _context.Context, authorization string, sceneId string, localVarOptionals *ExecuteSceneOpts) (StandardSuccessResponse, *_nethttp.Response, error)
ExecuteScene Execute Scene Execute a Scene by id for the logged in user and given locationId
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param sceneId The ID of the Scene.
- @param optional nil or *ExecuteSceneOpts - Optional Parameters:
- @param "LocationId" (optional.String) - The location of a scene.
@return StandardSuccessResponse
func (*ScenesApiService) ListScenes ¶
func (a *ScenesApiService) ListScenes(ctx _context.Context, authorization string, localVarOptionals *ListScenesOpts) (ScenePagedResult, *_nethttp.Response, error)
ListScenes List Scenes Fetch a list of Scenes for the logged in user filtered by locationIds. If no locationId is sent, return scenes for all available locations
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param authorization OAuth token
- @param optional nil or *ListScenesOpts - Optional Parameters:
- @param "LocationId" (optional.String) - The location of a scene.
@return ScenePagedResult
type Schedule ¶
type Schedule struct { // The ID of the installed app. InstalledAppId string `json:"installedAppId,omitempty"` // The ID of the location the installed app is in. LocationId string `json:"locationId,omitempty"` // list of scheduled execution times in millis from jan 1 1970 UTC ScheduledExecutions []int64 `json:"scheduledExecutions,omitempty"` // The unique per installed app name of the schedule. Name string `json:"name"` Cron CronSchedule `json:"cron,omitempty"` }
Schedule struct for Schedule
type ScheduleRequest ¶
type ScheduleRequest struct { Once OnceSchedule `json:"once,omitempty"` // The unique per installed app name of the schedule. Name string `json:"name"` Cron CronSchedule `json:"cron,omitempty"` }
ScheduleRequest struct for ScheduleRequest
type SchedulesApiService ¶
type SchedulesApiService service
SchedulesApiService SchedulesApi service
func (*SchedulesApiService) CreateSchedule ¶
func (a *SchedulesApiService) CreateSchedule(ctx _context.Context, installedAppId string, authorization string, localVarOptionals *CreateScheduleOpts) (Schedule, *_nethttp.Response, error)
CreateSchedule Save an installed app schedule. Create a schedule for an installed app. The installed app must be in the location specified and the installed app must have permission to create schedules.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param installedAppId The ID of the installed application.
- @param authorization OAuth token
- @param optional nil or *CreateScheduleOpts - Optional Parameters:
- @param "Request" (optional.Interface of ScheduleRequest) - The schedule to be created.
@return Schedule
func (*SchedulesApiService) DeleteSchedule ¶
func (a *SchedulesApiService) DeleteSchedule(ctx _context.Context, installedAppId string, scheduleName string, authorization string) (map[string]interface{}, *_nethttp.Response, error)
DeleteSchedule Delete a schedule. Delete a specific schedule for the installed app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param installedAppId The ID of the installed application.
- @param scheduleName The name of the schedule
- @param authorization OAuth token
@return map[string]interface{}
func (*SchedulesApiService) DeleteSchedules ¶
func (a *SchedulesApiService) DeleteSchedules(ctx _context.Context, installedAppId string, authorization string) (map[string]interface{}, *_nethttp.Response, error)
DeleteSchedules Delete all of an installed app's schedules. Delete all schedules for the installed app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param installedAppId The ID of the installed application.
- @param authorization OAuth token
@return map[string]interface{}
func (*SchedulesApiService) GetSchedule ¶
func (a *SchedulesApiService) GetSchedule(ctx _context.Context, installedAppId string, scheduleName string, authorization string) (Schedule, *_nethttp.Response, error)
GetSchedule Get an installed app's schedule. Get a specific schedule for the installed app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param installedAppId The ID of the installed application.
- @param scheduleName The name of the schedule
- @param authorization OAuth token
@return Schedule
func (*SchedulesApiService) GetSchedules ¶
func (a *SchedulesApiService) GetSchedules(ctx _context.Context, installedAppId string, authorization string) (PagedSchedules, *_nethttp.Response, error)
GetSchedules List installed app schedules. List the schedules for the installed app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param installedAppId The ID of the installed application.
- @param authorization OAuth token
@return PagedSchedules
type SecurityArmStateDetail ¶
type SecurityArmStateDetail struct { // A name for the subscription that will be passed to the installed app. SubscriptionName string `json:"subscriptionName,omitempty"` // The id of the location that both the app and the security system are in. LocationId string `json:"locationId"` }
SecurityArmStateDetail Details of a subscription of souce type SECURITY_ARM_STATE
type SecurityArmStateEvent ¶
type SecurityArmStateEvent struct { // The id of the event. EventId string `json:"eventId,omitempty"` // The id of the location in which the event was triggered. LocationId string `json:"locationId,omitempty"` // The arm state of a security system. ArmState string `json:"armState,omitempty"` // A set of key / value pairs useful for passing any optional arguments. OptionalArguments map[string]SimpleValue `json:"optionalArguments,omitempty"` }
SecurityArmStateEvent An event that represents a change in the arm state of a security system.
type ServerConfiguration ¶
type ServerConfiguration struct { Url string Description string Variables map[string]ServerVariable }
ServerConfiguration stores the information about a server
type ServerVariable ¶
ServerVariable stores the information about a server variable
type SignatureType ¶
type SignatureType string
SignatureType The http signature type used for authorizing event delivery. APP_RSA generates an RSA key pair that will be used to verify requests from SmartThings. ST_PADLOCK requires verifcation through SmartThings public certificate.
const ( SIGNATURETYPE_APP_RSA SignatureType = "APP_RSA" SIGNATURETYPE_ST_PADLOCK SignatureType = "ST_PADLOCK" )
List of SignatureType
type SimpleCondition ¶
type SimpleCondition struct { // Unique id for the condition Id string `json:"id,omitempty"` Left Operand `json:"left"` Right Operand `json:"right"` Aggregation ConditionAggregationMode `json:"aggregation,omitempty"` }
SimpleCondition struct for SimpleCondition
type SimpleValue ¶
type SimpleValue struct { // The type of the value. ValueType string `json:"valueType,omitempty"` IntValue int32 `json:"intValue,omitempty"` DoubleValue float64 `json:"doubleValue,omitempty"` StringValue string `json:"stringValue,omitempty"` BoolValue bool `json:"boolValue,omitempty"` }
SimpleValue A simple value.
type SingleOperandCondition ¶
type SingleOperandCondition struct { // Unique id for the condition Id string `json:"id,omitempty"` Left Operand `json:"left"` Aggregation ConditionAggregationMode `json:"aggregation,omitempty"` }
SingleOperandCondition struct for SingleOperandCondition
type SleepAction ¶
type SleepAction struct { // Unique id for the action Id string `json:"id,omitempty"` Duration Interval `json:"duration"` }
SleepAction struct for SleepAction
type SmartAppDashboardCardEventRequest ¶
type SmartAppDashboardCardEventRequest struct { // A developer defined dashboard card ID. CardId string `json:"cardId,omitempty"` Lifecycle DashboardCardLifecycle `json:"lifecycle,omitempty"` }
SmartAppDashboardCardEventRequest An event used to trigger a client action on a SmartApp dashboard card.
type SmartAppEventRequest ¶
type SmartAppEventRequest struct { // An arbitrary name for the custom SmartApp event. Typically useful as a hook for in-app routing. Name string `json:"name,omitempty"` // An arbitrary set of key / value pairs useful for passing any custom metadata. * Supports a maximum of 10 entries. * Maximum key length: 36 Unicode characters in UTF-8 * Maximum value length: 256 Unicode characters in UTF-8 * Allowed characters for *keys* are letters, plus the following special characters: `:`, `_` * Allowed characters for *values* are letters, whitespace, and numbers, plus the following special characters: `+`, `-`, `=`, `.`, `_`, `:`, `/` * If you need characters outside this allowed set, you can apply standard base-64 encoding. Attributes map[string]string `json:"attributes,omitempty"` }
SmartAppEventRequest struct for SmartAppEventRequest
type StandardSuccessResponse ¶
type StandardSuccessResponse struct {
Status string `json:"status,omitempty"`
}
StandardSuccessResponse {\"status\": \"success\"}
type StringConfig ¶
type StringConfig struct { // A config value Value string `json:"value,omitempty"` }
StringConfig A simple string configuration.
type Subscription ¶
type Subscription struct { // The id of the subscription. Id string `json:"id,omitempty"` // The id of the subscribing app. InstalledAppId string `json:"installedAppId,omitempty"` SourceType SubscriptionSource `json:"sourceType,omitempty"` Device DeviceSubscriptionDetail `json:"device,omitempty"` Capability CapabilitySubscriptionDetail `json:"capability,omitempty"` Mode ModeSubscriptionDetail `json:"mode,omitempty"` DeviceLifecycle DeviceLifecycleDetail `json:"deviceLifecycle,omitempty"` DeviceHealth DeviceHealthDetail `json:"deviceHealth,omitempty"` SecurityArmState SecurityArmStateDetail `json:"securityArmState,omitempty"` HubHealth HubHealthDetail `json:"hubHealth,omitempty"` SceneLifecycle SceneLifecycleDetail `json:"sceneLifecycle,omitempty"` }
Subscription struct for Subscription
type SubscriptionDelete ¶
type SubscriptionDelete struct {
Count int32 `json:"count,omitempty"`
}
SubscriptionDelete The number of deleted subscriptions
type SubscriptionFilter ¶
type SubscriptionFilter struct { Type SubscriptionFilterTypes `json:"type,omitempty"` // An array of subscription filter values. Value []string `json:"value,omitempty"` EventType []string `json:"eventType,omitempty"` Attribute []string `json:"attribute,omitempty"` Capability []string `json:"capability,omitempty"` Component []string `json:"component,omitempty"` }
SubscriptionFilter struct for SubscriptionFilter
type SubscriptionFilterTypes ¶
type SubscriptionFilterTypes string
SubscriptionFilterTypes The type of filter
const ( SUBSCRIPTIONFILTERTYPES_LOCATIONIDS SubscriptionFilterTypes = "LOCATIONIDS" SUBSCRIPTIONFILTERTYPES_ROOMIDS SubscriptionFilterTypes = "ROOMIDS" SUBSCRIPTIONFILTERTYPES_DEVICEIDS SubscriptionFilterTypes = "DEVICEIDS" SUBSCRIPTIONFILTERTYPES_INSTALLEDSMARTAPPIDS SubscriptionFilterTypes = "INSTALLEDSMARTAPPIDS" SUBSCRIPTIONFILTERTYPES_SMARTAPPIDS SubscriptionFilterTypes = "SMARTAPPIDS" )
List of SubscriptionFilterTypes
type SubscriptionMode ¶
type SubscriptionMode string
SubscriptionMode the model 'SubscriptionMode'
const ( SUBSCRIPTIONMODE_AUTO SubscriptionMode = "Auto" SUBSCRIPTIONMODE_ALWAYS SubscriptionMode = "Always" SUBSCRIPTIONMODE_NEVER SubscriptionMode = "Never" )
List of SubscriptionMode
type SubscriptionRequest ¶
type SubscriptionRequest struct { SourceType SubscriptionSource `json:"sourceType"` Device DeviceSubscriptionDetail `json:"device,omitempty"` Capability CapabilitySubscriptionDetail `json:"capability,omitempty"` Mode ModeSubscriptionDetail `json:"mode,omitempty"` DeviceLifecycle DeviceLifecycleDetail `json:"deviceLifecycle,omitempty"` DeviceHealth DeviceHealthDetail `json:"deviceHealth,omitempty"` SecurityArmState SecurityArmStateDetail `json:"securityArmState,omitempty"` HubHealth HubHealthDetail `json:"hubHealth,omitempty"` SceneLifecycle SceneLifecycleDetail `json:"sceneLifecycle,omitempty"` }
SubscriptionRequest struct for SubscriptionRequest
type SubscriptionSource ¶
type SubscriptionSource string
SubscriptionSource The type of the event that is being subscribed to.
const ( SUBSCRIPTIONSOURCE_DEVICE SubscriptionSource = "DEVICE" SUBSCRIPTIONSOURCE_CAPABILITY SubscriptionSource = "CAPABILITY" SUBSCRIPTIONSOURCE_MODE SubscriptionSource = "MODE" SUBSCRIPTIONSOURCE_DEVICE_LIFECYCLE SubscriptionSource = "DEVICE_LIFECYCLE" SUBSCRIPTIONSOURCE_DEVICE_HEALTH SubscriptionSource = "DEVICE_HEALTH" SUBSCRIPTIONSOURCE_SECURITY_ARM_STATE SubscriptionSource = "SECURITY_ARM_STATE" SUBSCRIPTIONSOURCE_HUB_HEALTH SubscriptionSource = "HUB_HEALTH" SUBSCRIPTIONSOURCE_SCENE_LIFECYCLE SubscriptionSource = "SCENE_LIFECYCLE" )
List of SubscriptionSource
type SubscriptionTarget ¶
type SubscriptionTarget struct { // The address to send events to. Url string `json:"url,omitempty"` }
SubscriptionTarget struct for SubscriptionTarget
type SubscriptionsApiService ¶
type SubscriptionsApiService service
SubscriptionsApiService SubscriptionsApi service
func (*SubscriptionsApiService) DeleteAllSubscriptions ¶
func (a *SubscriptionsApiService) DeleteAllSubscriptions(ctx _context.Context, installedAppId string, authorization string, localVarOptionals *DeleteAllSubscriptionsOpts) (SubscriptionDelete, *_nethttp.Response, error)
DeleteAllSubscriptions Delete all of an installed app's subscriptions. Delete all subscriptions for the installed app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param installedAppId The ID of the installed application.
- @param authorization OAuth token
- @param optional nil or *DeleteAllSubscriptionsOpts - Optional Parameters:
- @param "DeviceId" (optional.String) - Limit deletion to subscriptions for a particular device.
- @param "ModeId" (optional.String) - Limit deletion to subscriptions for a particular mode or deletes parent if last mode
@return SubscriptionDelete
func (*SubscriptionsApiService) DeleteSubscription ¶
func (a *SubscriptionsApiService) DeleteSubscription(ctx _context.Context, installedAppId string, subscriptionId string, authorization string) (SubscriptionDelete, *_nethttp.Response, error)
DeleteSubscription Delete an installed app's subscription. Delete a specific subscription for the installed app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param installedAppId The ID of the installed application.
- @param subscriptionId The ID of the subscription
- @param authorization OAuth token
@return SubscriptionDelete
func (*SubscriptionsApiService) GetSubscription ¶
func (a *SubscriptionsApiService) GetSubscription(ctx _context.Context, installedAppId string, subscriptionId string, authorization string) (Subscription, *_nethttp.Response, error)
GetSubscription Get an installed app's subscription. Get a specific subscription for the installed app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param installedAppId The ID of the installed application.
- @param subscriptionId The ID of the subscription
- @param authorization OAuth token
@return Subscription
func (*SubscriptionsApiService) ListSubscriptions ¶
func (a *SubscriptionsApiService) ListSubscriptions(ctx _context.Context, installedAppId string, authorization string) (PagedSubscriptions, *_nethttp.Response, error)
ListSubscriptions List an installed app's subscriptions. List the subscriptions for the installed app.
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param installedAppId The ID of the installed application.
- @param authorization OAuth token
@return PagedSubscriptions
func (*SubscriptionsApiService) SaveSubscription ¶
func (a *SubscriptionsApiService) SaveSubscription(ctx _context.Context, installedAppId string, authorization string, localVarOptionals *SaveSubscriptionOpts) (Subscription, *_nethttp.Response, error)
SaveSubscription Create a subscription for an installed app. Create a subscription to a type of event from the specified source. Both the source and the installed app must be in the location specified and the installed app must have read access to the event being subscribed to. An installed app is only permitted to created 20 subscriptions. ### Authorization scopes For installed app principal: * installed app id matches the incoming request installed app id location must match the installed app location | Subscription Type | Scope required | | ------------------ | ---------------------------------------------------------------------------------------| | DEVICE | `r:devices:$deviceId` | | CAPABILITY | `r:devices:*:*:$capability` or `r:devices:*`, | | MODE | `r:locations:$locationId` or `r:locations:*` | | DEVICE_LIFECYCLE | `r:devices:$deviceId` or `r:devices:*` | | DEVICE_HEALTH | `r:devices:$deviceId` or `r:devices:*` | | SECURITY_ARM_STATE | `r:security:locations:$locationId:armstate` or `r:security:locations:*:armstate` | | HUB_HEALTH | `r:hubs` | | SCENE_LIFECYCLE | `r:scenes:*` |
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param installedAppId The ID of the installed application.
- @param authorization OAuth token
- @param optional nil or *SaveSubscriptionOpts - Optional Parameters:
- @param "Request" (optional.Interface of SubscriptionRequest) - The Subscription to be created.
@return Subscription
type TimeOperand ¶
type TimeOperand struct { // A java time zone ID reference TimeZoneId string `json:"timeZoneId,omitempty"` Reference TimeReference `json:"reference"` Offset Interval `json:"offset,omitempty"` }
TimeOperand struct for TimeOperand
type TimeReference ¶
type TimeReference string
TimeReference the model 'TimeReference'
const ( TIMEREFERENCE_NOW TimeReference = "Now" TIMEREFERENCE_MIDNIGHT TimeReference = "Midnight" TIMEREFERENCE_SUNRISE TimeReference = "Sunrise" TIMEREFERENCE_NOON TimeReference = "Noon" TIMEREFERENCE_SUNSET TimeReference = "Sunset" )
List of TimeReference
type TimerEvent ¶
type TimerEvent struct { // The ID of the event. EventId string `json:"eventId,omitempty"` // The name of the schedule that caused this event. Name string `json:"name,omitempty"` Type TimerType `json:"type,omitempty"` // The IS0-8601 date time strings in UTC that this event was scheduled for. Time time.Time `json:"time,omitempty"` // The CRON expression if the schedule was of type CRON. Expression string `json:"expression,omitempty"` }
TimerEvent An event that is caused by a schedule for this app being fired.
type UpdateAppOAuthRequest ¶
type UpdateAppOAuthRequest struct { // A name given to the OAuth Client. ClientName string `json:"clientName"` // A list of SmartThings API OAuth scope identifiers that maybe required to execute your integration. Scope []string `json:"scope"` // A list of redirect URIs. RedirectUris []string `json:"redirectUris"` }
UpdateAppOAuthRequest struct for UpdateAppOAuthRequest
type UpdateAppOpts ¶
UpdateAppOpts Optional parameters for the method 'UpdateApp'
type UpdateAppRequest ¶
type UpdateAppRequest struct { // A default display name for an app. DisplayName string `json:"displayName"` // A default description for an app. Description string `json:"description"` // Inform the installation systems that a particular app can only be installed once within a user's account. SingleInstance bool `json:"singleInstance,omitempty"` IconImage IconImage `json:"iconImage,omitempty"` AppType AppType `json:"appType"` // An App maybe associated to many classifications. A classification drives how the integration is presented to the user in the SmartThings mobile clients. These classifications include: * AUTOMATION - Denotes an integration that should display under the \"Automation\" tab in mobile clients. * SERVICE - Denotes an integration that is classified as a \"Service\". * DEVICE - Denotes an integration that should display under the \"Device\" tab in mobile clients. * CONNECTED_SERVICE - Denotes an integration that should display under the \"Connected Services\" menu in mobile clients. * HIDDEN - Denotes an integration that should not display in mobile clients Classifications []AppClassification `json:"classifications"` LambdaSmartApp CreateOrUpdateLambdaSmartAppRequest `json:"lambdaSmartApp,omitempty"` WebhookSmartApp CreateOrUpdateWebhookSmartAppRequest `json:"webhookSmartApp,omitempty"` Ui AppUiSettings `json:"ui,omitempty"` }
UpdateAppRequest struct for UpdateAppRequest
type UpdateAppSettingsRequest ¶
UpdateAppSettingsRequest Settings for a given app
type UpdateAppSettingsResponse ¶
UpdateAppSettingsResponse Settings for a given app
type UpdateDeviceProfileOpts ¶
UpdateDeviceProfileOpts Optional parameters for the method 'UpdateDeviceProfile'
type UpdateDeviceProfileRequest ¶
type UpdateDeviceProfileRequest struct { // A list of `[ 1..20 ]` components for this profile. Components []DeviceComponentReference `json:"components,omitempty"` // Additional information about the device profile, limited to 10 entries. Metadata map[string]string `json:"metadata,omitempty"` }
UpdateDeviceProfileRequest struct for UpdateDeviceProfileRequest
type UpdateDeviceRequest ¶
type UpdateDeviceRequest struct { // The label for the device. Label string `json:"label"` Components []UpdateDeviceRequestComponents `json:"components,omitempty"` }
UpdateDeviceRequest struct for UpdateDeviceRequest
type UpdateDeviceRequestComponents ¶
type UpdateDeviceRequestComponents struct { Id string `json:"id"` // A case-sensitive string from the pre-defined list of valid categories [/devicecategories](#/operation/listCategories). Categories []string `json:"categories"` }
UpdateDeviceRequestComponents struct for UpdateDeviceRequestComponents
type UpdateLocationRequest ¶
type UpdateLocationRequest struct { // A nickname for the location. Name string `json:"name"` // A geographical latitude. Latitude float32 `json:"latitude,omitempty"` // A geographical longitude. Longitude float32 `json:"longitude,omitempty"` // The radius in meters around latitude and longitude which defines this location. RegionRadius int32 `json:"regionRadius,omitempty"` // The desired temperature scale used within location. Value can be F or C. TemperatureScale string `json:"temperatureScale,omitempty"` // An IETF BCP 47 language tag representing the chosen locale for this location. Locale string `json:"locale,omitempty"` // Additional information about the location that allows SmartThings to further define your location. AdditionalProperties map[string]string `json:"additionalProperties,omitempty"` }
UpdateLocationRequest struct for UpdateLocationRequest
type UpdateRoomRequest ¶
type UpdateRoomRequest struct { // A name for the room. Name string `json:"name"` }
UpdateRoomRequest struct for UpdateRoomRequest
type UpdateSignatureTypeRequest ¶
type UpdateSignatureTypeRequest struct {
SignatureType SignatureType `json:"signatureType,omitempty"`
}
UpdateSignatureTypeRequest A request object used to switch the signing mechanism for authorizing SmartApp callbacks.
type ViperDeviceDetails ¶
type ViperDeviceDetails struct { UniqueIdentifier string `json:"uniqueIdentifier,omitempty"` ManufacturerName string `json:"manufacturerName,omitempty"` ModelName string `json:"modelName,omitempty"` SwVersion string `json:"swVersion,omitempty"` HwVersion string `json:"hwVersion,omitempty"` }
ViperDeviceDetails struct for ViperDeviceDetails
type WebhookSmartApp ¶
type WebhookSmartApp struct { // A URL that should be invoked during execution. TargetUrl string `json:"targetUrl,omitempty"` TargetStatus AppTargetStatus `json:"targetStatus,omitempty"` // The public half of an RSA key pair. Useful for verifying a Webhook execution request signature to ensure it came from SmartThings. PublicKey string `json:"publicKey,omitempty"` SignatureType SignatureType `json:"signatureType,omitempty"` }
WebhookSmartApp Details related to a Webhook Smart App implementation. This model will only be available for apps of type WEBHOOK_SMART_APP.
Source Files ¶
- api_apps.go
- api_deviceprofiles.go
- api_devices.go
- api_installedapps.go
- api_locations.go
- api_rooms.go
- api_rules.go
- api_scenes.go
- api_schedules.go
- api_subscriptions.go
- client.go
- configuration.go
- model_action.go
- model_adhoc_message.go
- model_adhoc_message_template.go
- model_app.go
- model_app_classification.go
- model_app_device_details.go
- model_app_o_auth.go
- model_app_target_status.go
- model_app_type.go
- model_app_ui_settings.go
- model_argument.go
- model_array_operand.go
- model_attribute_properties.go
- model_attribute_properties_data.go
- model_attribute_properties_unit.go
- model_attribute_schema.go
- model_attribute_state.go
- model_between_condition.go
- model_capability_attribute.go
- model_capability_attribute_enum_commands.go
- model_capability_command.go
- model_capability_reference.go
- model_capability_subscription_detail.go
- model_capability_summary.go
- model_changes_condition.go
- model_command_action.go
- model_component_translations.go
- model_condition.go
- model_condition_aggregation_mode.go
- model_config_entry.go
- model_create_app_request.go
- model_create_app_response.go
- model_create_device_profile_request.go
- model_create_installed_app_events_request.go
- model_create_location_request.go
- model_create_or_update_lambda_smart_app_request.go
- model_create_or_update_webhook_smart_app_request.go
- model_create_room_request.go
- model_cron_schedule.go
- model_dashboard_card_lifecycle.go
- model_date_operand.go
- model_date_time_operand.go
- model_day_of_week.go
- model_delete_installed_app_response.go
- model_device.go
- model_device_activity.go
- model_device_category.go
- model_device_command.go
- model_device_commands_event.go
- model_device_commands_event_command.go
- model_device_commands_request.go
- model_device_component.go
- model_device_component_reference.go
- model_device_config.go
- model_device_event.go
- model_device_events_request.go
- model_device_health_detail.go
- model_device_health_event.go
- model_device_install_request.go
- model_device_install_request_app.go
- model_device_integration_type.go
- model_device_lifecycle.go
- model_device_lifecycle_detail.go
- model_device_lifecycle_event.go
- model_device_lifecycle_move.go
- model_device_network_security_level.go
- model_device_operand.go
- model_device_profile.go
- model_device_profile_reference.go
- model_device_profile_status.go
- model_device_results.go
- model_device_state_event.go
- model_device_status.go
- model_device_subscription_detail.go
- model_dth_device_details.go
- model_endpoint_app.go
- model_equals_condition.go
- model_error.go
- model_error_response.go
- model_event_type.go
- model_every_action.go
- model_execution_result.go
- model_generate_app_o_auth_request.go
- model_generate_app_o_auth_response.go
- model_get_app_settings_response.go
- model_greater_than_condition.go
- model_greater_than_or_equals_condition.go
- model_hub_health_detail.go
- model_hub_health_event.go
- model_icon_image.go
- model_if_action.go
- model_if_action_all_of.go
- model_install_configuration.go
- model_install_configuration_detail.go
- model_install_configuration_status.go
- model_installed_app.go
- model_installed_app_icon_image.go
- model_installed_app_lifecycle.go
- model_installed_app_lifecycle_error.go
- model_installed_app_lifecycle_event.go
- model_installed_app_status.go
- model_installed_app_type.go
- model_installed_app_ui.go
- model_interval.go
- model_interval_unit.go
- model_ir_device_details.go
- model_ir_device_details_function_codes.go
- model_isa_results.go
- model_lambda_smart_app.go
- model_less_than_condition.go
- model_less_than_or_equals_condition.go
- model_link.go
- model_links.go
- model_locale_reference.go
- model_locale_variables.go
- model_location.go
- model_location_action.go
- model_location_attribute.go
- model_location_operand.go
- model_message.go
- model_message_config.go
- model_message_template.go
- model_message_type.go
- model_mode.go
- model_mode_config.go
- model_mode_event.go
- model_mode_subscription_detail.go
- model_notice.go
- model_notice_action.go
- model_notice_code.go
- model_once_schedule.go
- model_operand.go
- model_operand_aggregation_mode.go
- model_owner.go
- model_paged_app.go
- model_paged_apps.go
- model_paged_device_profiles.go
- model_paged_devices.go
- model_paged_install_configurations.go
- model_paged_installed_apps.go
- model_paged_location.go
- model_paged_locations.go
- model_paged_message_template.go
- model_paged_rooms.go
- model_paged_rules.go
- model_paged_schedules.go
- model_paged_subscriptions.go
- model_parent_type.go
- model_permission_config.go
- model_predefined_message.go
- model_principal_type.go
- model_room.go
- model_rule.go
- model_rule_all_of.go
- model_rule_execution_response.go
- model_rule_metadata.go
- model_rule_request.go
- model_scene_action.go
- model_scene_argument.go
- model_scene_capability.go
- model_scene_command.go
- model_scene_component.go
- model_scene_config.go
- model_scene_device.go
- model_scene_device_group.go
- model_scene_device_group_request.go
- model_scene_device_request.go
- model_scene_lifecycle.go
- model_scene_lifecycle_detail.go
- model_scene_lifecycle_event.go
- model_scene_mode.go
- model_scene_mode_request.go
- model_scene_paged_result.go
- model_scene_request.go
- model_scene_security_mode_request.go
- model_scene_sleep_request.go
- model_scene_summary.go
- model_schedule.go
- model_schedule_request.go
- model_security_arm_state_detail.go
- model_security_arm_state_event.go
- model_signature_type.go
- model_simple_condition.go
- model_simple_value.go
- model_single_operand_condition.go
- model_sleep_action.go
- model_smart_app_dashboard_card_event_request.go
- model_smart_app_event_request.go
- model_standard_success_response.go
- model_string_config.go
- model_subscription.go
- model_subscription_delete.go
- model_subscription_filter.go
- model_subscription_filter_types.go
- model_subscription_mode.go
- model_subscription_request.go
- model_subscription_source.go
- model_subscription_target.go
- model_time_operand.go
- model_time_reference.go
- model_timer_event.go
- model_timer_type.go
- model_update_app_o_auth_request.go
- model_update_app_request.go
- model_update_app_settings_request.go
- model_update_app_settings_response.go
- model_update_device_profile_request.go
- model_update_device_request.go
- model_update_device_request_components.go
- model_update_location_request.go
- model_update_room_request.go
- model_update_signature_type_request.go
- model_viper_device_details.go
- model_webhook_smart_app.go
- response.go