digitaltwins

package
v58.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package digitaltwins implements the Azure ARM Digitaltwins service API version 2020-05-31-preview.

A service for managing and querying digital twins and digital twin models.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Digitaltwins
	DefaultBaseURI = "https://digitaltwins-name.digitaltwins.azure.net"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI string
}

BaseClient is the base client for Digitaltwins.

func New

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

type Client

type Client struct {
	BaseClient
}

Client is the a service for managing and querying digital twins and digital twin models.

func NewClient

func NewClient() Client

NewClient creates an instance of the Client client.

func NewClientWithBaseURI

func NewClientWithBaseURI(baseURI string) Client

NewClientWithBaseURI creates an instance of the Client client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (Client) Add

func (client Client) Add(ctx context.Context, ID string, twin interface{}, ifNoneMatch string) (result SetObject, err error)

Add adds or replaces a digital twin. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 412 (Precondition Failed): The model is decommissioned or the digital twin already exists (when using If-None-Match: *). Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. twin - the digital twin instance being added. If provided, the $dtId property is ignored. ifNoneMatch - only perform the operation if the entity does not already exist.

func (Client) AddPreparer

func (client Client) AddPreparer(ctx context.Context, ID string, twin interface{}, ifNoneMatch string) (*http.Request, error)

AddPreparer prepares the Add request.

func (Client) AddRelationship

func (client Client) AddRelationship(ctx context.Context, ID string, relationshipID string, relationship *interface{}, ifNoneMatch string) (result SetObject, err error)

AddRelationship adds a relationship between two digital twins. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 404 (Not Found): There is either no digital twin, target digital twin, or relationship with the provided id. 409 (Conflict): A relationship with the provided id already exists. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. relationshipID - the id of the relationship. The id is unique within the digital twin and case sensitive. relationship - the data for the relationship. ifNoneMatch - only perform the operation if the entity does not already exist.

func (Client) AddRelationshipPreparer

func (client Client) AddRelationshipPreparer(ctx context.Context, ID string, relationshipID string, relationship *interface{}, ifNoneMatch string) (*http.Request, error)

AddRelationshipPreparer prepares the AddRelationship request.

func (Client) AddRelationshipResponder

func (client Client) AddRelationshipResponder(resp *http.Response) (result SetObject, err error)

AddRelationshipResponder handles the response to the AddRelationship request. The method always closes the http.Response Body.

func (Client) AddRelationshipSender

func (client Client) AddRelationshipSender(req *http.Request) (*http.Response, error)

AddRelationshipSender sends the AddRelationship request. The method will close the http.Response Body if it receives an error.

func (Client) AddResponder

func (client Client) AddResponder(resp *http.Response) (result SetObject, err error)

AddResponder handles the response to the Add request. The method always closes the http.Response Body.

func (Client) AddSender

func (client Client) AddSender(req *http.Request) (*http.Response, error)

AddSender sends the Add request. The method will close the http.Response Body if it receives an error.

func (Client) Delete

func (client Client) Delete(ctx context.Context, ID string, ifMatch string) (result autorest.Response, err error)

Delete deletes a digital twin. All relationships referencing the digital twin must already be deleted. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 404 (Not Found): There is no digital twin with the provided id. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. ifMatch - only perform the operation if the entity's etag matches one of the etags provided or * is provided.

func (Client) DeletePreparer

func (client Client) DeletePreparer(ctx context.Context, ID string, ifMatch string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (Client) DeleteRelationship

func (client Client) DeleteRelationship(ctx context.Context, ID string, relationshipID string, ifMatch string) (result autorest.Response, err error)

DeleteRelationship deletes a relationship between two digital twins. Status codes: 200 (OK): Success. 404 (Not Found): There is either no digital twin or relationship with the provided id. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. relationshipID - the id of the relationship. The id is unique within the digital twin and case sensitive. ifMatch - only perform the operation if the entity's etag matches one of the etags provided or * is provided.

func (Client) DeleteRelationshipPreparer

func (client Client) DeleteRelationshipPreparer(ctx context.Context, ID string, relationshipID string, ifMatch string) (*http.Request, error)

DeleteRelationshipPreparer prepares the DeleteRelationship request.

func (Client) DeleteRelationshipResponder

func (client Client) DeleteRelationshipResponder(resp *http.Response) (result autorest.Response, err error)

DeleteRelationshipResponder handles the response to the DeleteRelationship request. The method always closes the http.Response Body.

func (Client) DeleteRelationshipSender

func (client Client) DeleteRelationshipSender(req *http.Request) (*http.Response, error)

DeleteRelationshipSender sends the DeleteRelationship request. The method will close the http.Response Body if it receives an error.

func (Client) DeleteResponder

func (client Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (Client) DeleteSender

func (client Client) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (Client) GetByID

func (client Client) GetByID(ctx context.Context, ID string) (result SetObject, err error)

GetByID retrieves a digital twin. Status codes: 200 (OK): Success. 404 (Not Found): There is no digital twin with the provided id. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive.

func (Client) GetByIDPreparer

func (client Client) GetByIDPreparer(ctx context.Context, ID string) (*http.Request, error)

GetByIDPreparer prepares the GetByID request.

func (Client) GetByIDResponder

func (client Client) GetByIDResponder(resp *http.Response) (result SetObject, err error)

GetByIDResponder handles the response to the GetByID request. The method always closes the http.Response Body.

func (Client) GetByIDSender

func (client Client) GetByIDSender(req *http.Request) (*http.Response, error)

GetByIDSender sends the GetByID request. The method will close the http.Response Body if it receives an error.

func (Client) GetComponent

func (client Client) GetComponent(ctx context.Context, ID string, componentPath string) (result SetObject, err error)

GetComponent retrieves a component from a digital twin. Status codes: 200 (OK): Success. 404 (Not Found): There is either no digital twin with the provided id or the component path is invalid. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. componentPath - the name of the DTDL component.

func (Client) GetComponentPreparer

func (client Client) GetComponentPreparer(ctx context.Context, ID string, componentPath string) (*http.Request, error)

GetComponentPreparer prepares the GetComponent request.

func (Client) GetComponentResponder

func (client Client) GetComponentResponder(resp *http.Response) (result SetObject, err error)

GetComponentResponder handles the response to the GetComponent request. The method always closes the http.Response Body.

func (Client) GetComponentSender

func (client Client) GetComponentSender(req *http.Request) (*http.Response, error)

GetComponentSender sends the GetComponent request. The method will close the http.Response Body if it receives an error.

func (Client) GetRelationshipByID

func (client Client) GetRelationshipByID(ctx context.Context, ID string, relationshipID string) (result SetObject, err error)

GetRelationshipByID retrieves a relationship between two digital twins. Status codes: 200 (OK): Success. 404 (Not Found): There is either no digital twin or relationship with the provided id. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. relationshipID - the id of the relationship. The id is unique within the digital twin and case sensitive.

func (Client) GetRelationshipByIDPreparer

func (client Client) GetRelationshipByIDPreparer(ctx context.Context, ID string, relationshipID string) (*http.Request, error)

GetRelationshipByIDPreparer prepares the GetRelationshipByID request.

func (Client) GetRelationshipByIDResponder

func (client Client) GetRelationshipByIDResponder(resp *http.Response) (result SetObject, err error)

GetRelationshipByIDResponder handles the response to the GetRelationshipByID request. The method always closes the http.Response Body.

func (Client) GetRelationshipByIDSender

func (client Client) GetRelationshipByIDSender(req *http.Request) (*http.Response, error)

GetRelationshipByIDSender sends the GetRelationshipByID request. The method will close the http.Response Body if it receives an error.

func (Client) ListIncomingRelationships

func (client Client) ListIncomingRelationships(ctx context.Context, ID string) (result IncomingRelationshipCollectionPage, err error)

ListIncomingRelationships retrieves all incoming relationship for a digital twin. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 404 (Not Found): There is no digital twin with the provided id. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive.

func (Client) ListIncomingRelationshipsComplete

func (client Client) ListIncomingRelationshipsComplete(ctx context.Context, ID string) (result IncomingRelationshipCollectionIterator, err error)

ListIncomingRelationshipsComplete enumerates all values, automatically crossing page boundaries as required.

func (Client) ListIncomingRelationshipsPreparer

func (client Client) ListIncomingRelationshipsPreparer(ctx context.Context, ID string) (*http.Request, error)

ListIncomingRelationshipsPreparer prepares the ListIncomingRelationships request.

func (Client) ListIncomingRelationshipsResponder

func (client Client) ListIncomingRelationshipsResponder(resp *http.Response) (result IncomingRelationshipCollection, err error)

ListIncomingRelationshipsResponder handles the response to the ListIncomingRelationships request. The method always closes the http.Response Body.

func (Client) ListIncomingRelationshipsSender

func (client Client) ListIncomingRelationshipsSender(req *http.Request) (*http.Response, error)

ListIncomingRelationshipsSender sends the ListIncomingRelationships request. The method will close the http.Response Body if it receives an error.

func (Client) ListRelationships

func (client Client) ListRelationships(ctx context.Context, ID string, relationshipName string) (result RelationshipCollectionPage, err error)

ListRelationships retrieves the relationships from a digital twin. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 404 (Not Found): There is no digital twin with the provided id. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. relationshipName - the name of the relationship.

func (Client) ListRelationshipsComplete

func (client Client) ListRelationshipsComplete(ctx context.Context, ID string, relationshipName string) (result RelationshipCollectionIterator, err error)

ListRelationshipsComplete enumerates all values, automatically crossing page boundaries as required.

func (Client) ListRelationshipsPreparer

func (client Client) ListRelationshipsPreparer(ctx context.Context, ID string, relationshipName string) (*http.Request, error)

ListRelationshipsPreparer prepares the ListRelationships request.

func (Client) ListRelationshipsResponder

func (client Client) ListRelationshipsResponder(resp *http.Response) (result RelationshipCollection, err error)

ListRelationshipsResponder handles the response to the ListRelationships request. The method always closes the http.Response Body.

func (Client) ListRelationshipsSender

func (client Client) ListRelationshipsSender(req *http.Request) (*http.Response, error)

ListRelationshipsSender sends the ListRelationships request. The method will close the http.Response Body if it receives an error.

func (Client) SendComponentTelemetry

func (client Client) SendComponentTelemetry(ctx context.Context, ID string, componentPath string, telemetry interface{}, dtID string, dtTimestamp string) (result autorest.Response, err error)

SendComponentTelemetry sends telemetry on behalf of a component in a digital twin. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 404 (Not Found): There is either no digital twin with the provided id or the component path is invalid. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. componentPath - the name of the DTDL component. telemetry - the telemetry measurements to send from the digital twin's component. dtID - a unique message identifier (in the scope of the digital twin id) that is commonly used for de-duplicating messages. dtTimestamp - an RFC 3339 timestamp that identifies the time the telemetry was measured.

func (Client) SendComponentTelemetryPreparer

func (client Client) SendComponentTelemetryPreparer(ctx context.Context, ID string, componentPath string, telemetry interface{}, dtID string, dtTimestamp string) (*http.Request, error)

SendComponentTelemetryPreparer prepares the SendComponentTelemetry request.

func (Client) SendComponentTelemetryResponder

func (client Client) SendComponentTelemetryResponder(resp *http.Response) (result autorest.Response, err error)

SendComponentTelemetryResponder handles the response to the SendComponentTelemetry request. The method always closes the http.Response Body.

func (Client) SendComponentTelemetrySender

func (client Client) SendComponentTelemetrySender(req *http.Request) (*http.Response, error)

SendComponentTelemetrySender sends the SendComponentTelemetry request. The method will close the http.Response Body if it receives an error.

func (Client) SendTelemetry

func (client Client) SendTelemetry(ctx context.Context, ID string, telemetry interface{}, dtID string, dtTimestamp string) (result autorest.Response, err error)

SendTelemetry sends telemetry on behalf of a digital twin. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 404 (Not Found): There is no digital twin with the provided id. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. telemetry - the telemetry measurements to send from the digital twin. dtID - a unique message identifier (in the scope of the digital twin id) that is commonly used for de-duplicating messages. dtTimestamp - an RFC 3339 timestamp that identifies the time the telemetry was measured.

func (Client) SendTelemetryPreparer

func (client Client) SendTelemetryPreparer(ctx context.Context, ID string, telemetry interface{}, dtID string, dtTimestamp string) (*http.Request, error)

SendTelemetryPreparer prepares the SendTelemetry request.

func (Client) SendTelemetryResponder

func (client Client) SendTelemetryResponder(resp *http.Response) (result autorest.Response, err error)

SendTelemetryResponder handles the response to the SendTelemetry request. The method always closes the http.Response Body.

func (Client) SendTelemetrySender

func (client Client) SendTelemetrySender(req *http.Request) (*http.Response, error)

SendTelemetrySender sends the SendTelemetry request. The method will close the http.Response Body if it receives an error.

func (Client) Update

func (client Client) Update(ctx context.Context, ID string, patchDocument []interface{}, ifMatch string) (result autorest.Response, err error)

Update updates a digital twin. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 404 (Not Found): There is no digital twin with the provided id. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. patchDocument - an update specification described by JSON Patch. Updates to property values and $model elements may happen in the same request. Operations are limited to add, replace and remove. ifMatch - only perform the operation if the entity's etag matches one of the etags provided or * is provided.

func (Client) UpdateComponent

func (client Client) UpdateComponent(ctx context.Context, ID string, componentPath string, patchDocument []interface{}, ifMatch string) (result autorest.Response, err error)

UpdateComponent updates a component on a digital twin. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 404 (Not Found): There is either no digital twin with the provided id or the component path is invalid. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. componentPath - the name of the DTDL component. patchDocument - an update specification described by JSON Patch. Updates to property values and $model elements may happen in the same request. Operations are limited to add, replace and remove. ifMatch - only perform the operation if the entity's etag matches one of the etags provided or * is provided.

func (Client) UpdateComponentPreparer

func (client Client) UpdateComponentPreparer(ctx context.Context, ID string, componentPath string, patchDocument []interface{}, ifMatch string) (*http.Request, error)

UpdateComponentPreparer prepares the UpdateComponent request.

func (Client) UpdateComponentResponder

func (client Client) UpdateComponentResponder(resp *http.Response) (result autorest.Response, err error)

UpdateComponentResponder handles the response to the UpdateComponent request. The method always closes the http.Response Body.

func (Client) UpdateComponentSender

func (client Client) UpdateComponentSender(req *http.Request) (*http.Response, error)

UpdateComponentSender sends the UpdateComponent request. The method will close the http.Response Body if it receives an error.

func (Client) UpdatePreparer

func (client Client) UpdatePreparer(ctx context.Context, ID string, patchDocument []interface{}, ifMatch string) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (Client) UpdateRelationship

func (client Client) UpdateRelationship(ctx context.Context, ID string, relationshipID string, patchDocument []interface{}, ifMatch string) (result autorest.Response, err error)

UpdateRelationship updates the properties on a relationship between two digital twins. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 404 (Not Found): There is either no digital twin or relationship with the provided id. Parameters: ID - the id of the digital twin. The id is unique within the service and case sensitive. relationshipID - the id of the relationship. The id is unique within the digital twin and case sensitive. patchDocument - JSON Patch description of the update to the relationship properties. ifMatch - only perform the operation if the entity's etag matches one of the etags provided or * is provided.

func (Client) UpdateRelationshipPreparer

func (client Client) UpdateRelationshipPreparer(ctx context.Context, ID string, relationshipID string, patchDocument []interface{}, ifMatch string) (*http.Request, error)

UpdateRelationshipPreparer prepares the UpdateRelationship request.

func (Client) UpdateRelationshipResponder

func (client Client) UpdateRelationshipResponder(resp *http.Response) (result autorest.Response, err error)

UpdateRelationshipResponder handles the response to the UpdateRelationship request. The method always closes the http.Response Body.

func (Client) UpdateRelationshipSender

func (client Client) UpdateRelationshipSender(req *http.Request) (*http.Response, error)

UpdateRelationshipSender sends the UpdateRelationship request. The method will close the http.Response Body if it receives an error.

func (Client) UpdateResponder

func (client Client) UpdateResponder(resp *http.Response) (result autorest.Response, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (Client) UpdateSender

func (client Client) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type Error

type Error struct {
	// Code - READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code.
	Code *string `json:"code,omitempty"`
	// Message - READ-ONLY; A human-readable representation of the error.
	Message *string `json:"message,omitempty"`
	// Details - READ-ONLY; Internal error details.
	Details *[]Error `json:"details,omitempty"`
	// Innererror - An object containing more specific information than the current object about the error.
	Innererror *InnerError `json:"innererror,omitempty"`
}

Error error definition.

func (Error) MarshalJSON

func (e Error) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Error.

type ErrorResponse

type ErrorResponse struct {
	// Error - The error details.
	Error *Error `json:"error,omitempty"`
}

ErrorResponse error response.

type EventRoute

type EventRoute struct {
	autorest.Response `json:"-"`
	// ID - READ-ONLY; The id of the event route.
	ID *string `json:"id,omitempty"`
	// EndpointName - The name of the endpoint this event route is bound to.
	EndpointName *string `json:"endpointName,omitempty"`
	// Filter - An expression which describes the events which are routed to the endpoint.
	Filter *string `json:"filter,omitempty"`
}

EventRoute a route which directs notification and telemetry events to an endpoint. Endpoints are a destination outside of Azure Digital Twins such as an EventHub.

func (EventRoute) MarshalJSON

func (er EventRoute) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for EventRoute.

type EventRouteCollection

type EventRouteCollection struct {
	autorest.Response `json:"-"`
	// Value - The EventRoute objects.
	Value *[]EventRoute `json:"value,omitempty"`
	// NextLink - A URI to retrieve the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

EventRouteCollection a collection of EventRoute objects.

func (EventRouteCollection) IsEmpty

func (erc EventRouteCollection) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type EventRouteCollectionIterator

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

EventRouteCollectionIterator provides access to a complete listing of EventRoute values.

func NewEventRouteCollectionIterator

func NewEventRouteCollectionIterator(page EventRouteCollectionPage) EventRouteCollectionIterator

Creates a new instance of the EventRouteCollectionIterator type.

func (*EventRouteCollectionIterator) Next

func (iter *EventRouteCollectionIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*EventRouteCollectionIterator) NextWithContext

func (iter *EventRouteCollectionIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (EventRouteCollectionIterator) NotDone

func (iter EventRouteCollectionIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (EventRouteCollectionIterator) Response

Response returns the raw server response from the last page request.

func (EventRouteCollectionIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type EventRouteCollectionPage

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

EventRouteCollectionPage contains a page of EventRoute values.

func NewEventRouteCollectionPage

func NewEventRouteCollectionPage(cur EventRouteCollection, getNextPage func(context.Context, EventRouteCollection) (EventRouteCollection, error)) EventRouteCollectionPage

Creates a new instance of the EventRouteCollectionPage type.

func (*EventRouteCollectionPage) Next

func (page *EventRouteCollectionPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*EventRouteCollectionPage) NextWithContext

func (page *EventRouteCollectionPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (EventRouteCollectionPage) NotDone

func (page EventRouteCollectionPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (EventRouteCollectionPage) Response

Response returns the raw server response from the last page request.

func (EventRouteCollectionPage) Values

func (page EventRouteCollectionPage) Values() []EventRoute

Values returns the slice of values for the current page or nil if there are no values.

type EventRoutesClient

type EventRoutesClient struct {
	BaseClient
}

EventRoutesClient is the a service for managing and querying digital twins and digital twin models.

func NewEventRoutesClient

func NewEventRoutesClient() EventRoutesClient

NewEventRoutesClient creates an instance of the EventRoutesClient client.

func NewEventRoutesClientWithBaseURI

func NewEventRoutesClientWithBaseURI(baseURI string) EventRoutesClient

NewEventRoutesClientWithBaseURI creates an instance of the EventRoutesClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (EventRoutesClient) Add

func (client EventRoutesClient) Add(ctx context.Context, ID string, eventRoute *EventRoute) (result autorest.Response, err error)

Add adds or replaces an event route. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. Parameters: ID - the id for an event route. The id is unique within event routes and case sensitive. eventRoute - the event route data

func (EventRoutesClient) AddPreparer

func (client EventRoutesClient) AddPreparer(ctx context.Context, ID string, eventRoute *EventRoute) (*http.Request, error)

AddPreparer prepares the Add request.

func (EventRoutesClient) AddResponder

func (client EventRoutesClient) AddResponder(resp *http.Response) (result autorest.Response, err error)

AddResponder handles the response to the Add request. The method always closes the http.Response Body.

func (EventRoutesClient) AddSender

func (client EventRoutesClient) AddSender(req *http.Request) (*http.Response, error)

AddSender sends the Add request. The method will close the http.Response Body if it receives an error.

func (EventRoutesClient) Delete

func (client EventRoutesClient) Delete(ctx context.Context, ID string) (result autorest.Response, err error)

Delete deletes an event route. Status codes: 200 (OK): Success. 404 (Not Found): There is no event route with the provided id. Parameters: ID - the id for an event route. The id is unique within event routes and case sensitive.

func (EventRoutesClient) DeletePreparer

func (client EventRoutesClient) DeletePreparer(ctx context.Context, ID string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (EventRoutesClient) DeleteResponder

func (client EventRoutesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (EventRoutesClient) DeleteSender

func (client EventRoutesClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (EventRoutesClient) GetByID

func (client EventRoutesClient) GetByID(ctx context.Context, ID string) (result EventRoute, err error)

GetByID retrieves an event route. Status codes: 200 (OK): Success. 404 (Not Found): There is no event route with the provided id. Parameters: ID - the id for an event route. The id is unique within event routes and case sensitive.

func (EventRoutesClient) GetByIDPreparer

func (client EventRoutesClient) GetByIDPreparer(ctx context.Context, ID string) (*http.Request, error)

GetByIDPreparer prepares the GetByID request.

func (EventRoutesClient) GetByIDResponder

func (client EventRoutesClient) GetByIDResponder(resp *http.Response) (result EventRoute, err error)

GetByIDResponder handles the response to the GetByID request. The method always closes the http.Response Body.

func (EventRoutesClient) GetByIDSender

func (client EventRoutesClient) GetByIDSender(req *http.Request) (*http.Response, error)

GetByIDSender sends the GetByID request. The method will close the http.Response Body if it receives an error.

func (EventRoutesClient) List

func (client EventRoutesClient) List(ctx context.Context, maxItemCount *int32) (result EventRouteCollectionPage, err error)

List retrieves all event routes. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. Parameters: maxItemCount - the maximum number of items to retrieve per request. The server may choose to return less than the requested max.

func (EventRoutesClient) ListComplete

func (client EventRoutesClient) ListComplete(ctx context.Context, maxItemCount *int32) (result EventRouteCollectionIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (EventRoutesClient) ListPreparer

func (client EventRoutesClient) ListPreparer(ctx context.Context, maxItemCount *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (EventRoutesClient) ListResponder

func (client EventRoutesClient) ListResponder(resp *http.Response) (result EventRouteCollection, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (EventRoutesClient) ListSender

func (client EventRoutesClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type IncomingRelationship

type IncomingRelationship struct {
	// RelationshipID - A user-provided string representing the id of this relationship, unique in the context of the source digital twin, i.e. sourceId + relationshipId is unique in the context of the service.
	RelationshipID *string `json:"$relationshipId,omitempty"`
	// SourceID - The id of the source digital twin.
	SourceID *string `json:"$sourceId,omitempty"`
	// RelationshipName - The name of the relationship.
	RelationshipName *string `json:"$relationshipName,omitempty"`
	// RelationshipLink - Link to the relationship, to be used for deletion.
	RelationshipLink *string `json:"$relationshipLink,omitempty"`
}

IncomingRelationship an incoming relationship.

type IncomingRelationshipCollection

type IncomingRelationshipCollection struct {
	autorest.Response `json:"-"`
	Value             *[]IncomingRelationship `json:"value,omitempty"`
	// NextLink - A URI to retrieve the next page of objects.
	NextLink *string `json:"nextLink,omitempty"`
}

IncomingRelationshipCollection a collection of incoming relationships which relate digital twins together.

func (IncomingRelationshipCollection) IsEmpty

func (irc IncomingRelationshipCollection) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type IncomingRelationshipCollectionIterator

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

IncomingRelationshipCollectionIterator provides access to a complete listing of IncomingRelationship values.

func NewIncomingRelationshipCollectionIterator

func NewIncomingRelationshipCollectionIterator(page IncomingRelationshipCollectionPage) IncomingRelationshipCollectionIterator

Creates a new instance of the IncomingRelationshipCollectionIterator type.

func (*IncomingRelationshipCollectionIterator) Next

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*IncomingRelationshipCollectionIterator) NextWithContext

func (iter *IncomingRelationshipCollectionIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (IncomingRelationshipCollectionIterator) NotDone

NotDone returns true if the enumeration should be started or is not yet complete.

func (IncomingRelationshipCollectionIterator) Response

Response returns the raw server response from the last page request.

func (IncomingRelationshipCollectionIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type IncomingRelationshipCollectionPage

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

IncomingRelationshipCollectionPage contains a page of IncomingRelationship values.

func NewIncomingRelationshipCollectionPage

Creates a new instance of the IncomingRelationshipCollectionPage type.

func (*IncomingRelationshipCollectionPage) Next

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*IncomingRelationshipCollectionPage) NextWithContext

func (page *IncomingRelationshipCollectionPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (IncomingRelationshipCollectionPage) NotDone

NotDone returns true if the page enumeration should be started or is not yet complete.

func (IncomingRelationshipCollectionPage) Response

Response returns the raw server response from the last page request.

func (IncomingRelationshipCollectionPage) Values

Values returns the slice of values for the current page or nil if there are no values.

type InnerError

type InnerError struct {
	// Code - A more specific error code than was provided by the containing error.
	Code *string `json:"code,omitempty"`
	// Innererror - An object containing more specific information than the current object about the error.
	Innererror *InnerError `json:"innererror,omitempty"`
}

InnerError a more specific error description than was provided by the containing error.

type ListModelData

type ListModelData struct {
	autorest.Response `json:"-"`
	Value             *[]ModelData `json:"value,omitempty"`
}

ListModelData ...

type ModelData

type ModelData struct {
	autorest.Response `json:"-"`
	// DisplayName - A language map that contains the localized display names as specified in the model definition.
	DisplayName map[string]*string `json:"displayName"`
	// Description - A language map that contains the localized descriptions as specified in the model definition.
	Description map[string]*string `json:"description"`
	// ID - The id of the model as specified in the model definition.
	ID *string `json:"id,omitempty"`
	// UploadTime - The time the model was uploaded to the service.
	UploadTime *date.Time `json:"uploadTime,omitempty"`
	// Decommissioned - Indicates if the model is decommissioned. Decommissioned models cannot be referenced by newly created digital twins.
	Decommissioned *bool `json:"decommissioned,omitempty"`
	// Model - The model definition.
	Model interface{} `json:"model,omitempty"`
}

ModelData a model definition and metadata for that model.

func (ModelData) MarshalJSON

func (md ModelData) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ModelData.

type ModelsClient

type ModelsClient struct {
	BaseClient
}

ModelsClient is the a service for managing and querying digital twins and digital twin models.

func NewModelsClient

func NewModelsClient() ModelsClient

NewModelsClient creates an instance of the ModelsClient client.

func NewModelsClientWithBaseURI

func NewModelsClientWithBaseURI(baseURI string) ModelsClient

NewModelsClientWithBaseURI creates an instance of the ModelsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (ModelsClient) Add

func (client ModelsClient) Add(ctx context.Context, models []interface{}) (result ListModelData, err error)

Add uploads one or more models. When any error occurs, no models are uploaded. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 409 (Conflict): One or more of the provided models already exist. Parameters: models - an array of models to add.

func (ModelsClient) AddPreparer

func (client ModelsClient) AddPreparer(ctx context.Context, models []interface{}) (*http.Request, error)

AddPreparer prepares the Add request.

func (ModelsClient) AddResponder

func (client ModelsClient) AddResponder(resp *http.Response) (result ListModelData, err error)

AddResponder handles the response to the Add request. The method always closes the http.Response Body.

func (ModelsClient) AddSender

func (client ModelsClient) AddSender(req *http.Request) (*http.Response, error)

AddSender sends the Add request. The method will close the http.Response Body if it receives an error.

func (ModelsClient) Delete

func (client ModelsClient) Delete(ctx context.Context, ID string) (result autorest.Response, err error)

Delete deletes a model. A model can only be deleted if no other models reference it. Status codes: 204 (No Content): Success. 400 (Bad Request): The request is invalid. 404 (Not Found): There is no model with the provided id. 409 (Conflict): There are dependencies on the model that prevent it from being deleted. Parameters: ID - the id for the model. The id is globally unique and case sensitive.

func (ModelsClient) DeletePreparer

func (client ModelsClient) DeletePreparer(ctx context.Context, ID string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (ModelsClient) DeleteResponder

func (client ModelsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (ModelsClient) DeleteSender

func (client ModelsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (ModelsClient) GetByID

func (client ModelsClient) GetByID(ctx context.Context, ID string, includeModelDefinition *bool) (result ModelData, err error)

GetByID retrieves model metadata and optionally the model definition. Status codes: 200 (OK): Success. 404 (Not Found): There is no model with the provided id. Parameters: ID - the id for the model. The id is globally unique and case sensitive. includeModelDefinition - when true the model definition will be returned as part of the result.

func (ModelsClient) GetByIDPreparer

func (client ModelsClient) GetByIDPreparer(ctx context.Context, ID string, includeModelDefinition *bool) (*http.Request, error)

GetByIDPreparer prepares the GetByID request.

func (ModelsClient) GetByIDResponder

func (client ModelsClient) GetByIDResponder(resp *http.Response) (result ModelData, err error)

GetByIDResponder handles the response to the GetByID request. The method always closes the http.Response Body.

func (ModelsClient) GetByIDSender

func (client ModelsClient) GetByIDSender(req *http.Request) (*http.Response, error)

GetByIDSender sends the GetByID request. The method will close the http.Response Body if it receives an error.

func (ModelsClient) List

func (client ModelsClient) List(ctx context.Context, dependenciesFor []string, includeModelDefinition *bool, maxItemCount *int32) (result PagedModelDataCollectionPage, err error)

List retrieves model metadata and, optionally, model definitions. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. Parameters: dependenciesFor - the set of the models which will have their dependencies retrieved. If omitted, all models are retrieved. includeModelDefinition - when true the model definition will be returned as part of the result. maxItemCount - the maximum number of items to retrieve per request. The server may choose to return less than the requested max.

func (ModelsClient) ListComplete

func (client ModelsClient) ListComplete(ctx context.Context, dependenciesFor []string, includeModelDefinition *bool, maxItemCount *int32) (result PagedModelDataCollectionIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (ModelsClient) ListPreparer

func (client ModelsClient) ListPreparer(ctx context.Context, dependenciesFor []string, includeModelDefinition *bool, maxItemCount *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (ModelsClient) ListResponder

func (client ModelsClient) ListResponder(resp *http.Response) (result PagedModelDataCollection, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (ModelsClient) ListSender

func (client ModelsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

func (ModelsClient) Update

func (client ModelsClient) Update(ctx context.Context, ID string, updateModel []interface{}) (result autorest.Response, err error)

Update updates the metadata for a model. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. 404 (Not Found): There is no model with the provided id. Parameters: ID - the id for the model. The id is globally unique and case sensitive. updateModel - an update specification described by JSON Patch. Only the decommissioned property can be replaced.

func (ModelsClient) UpdatePreparer

func (client ModelsClient) UpdatePreparer(ctx context.Context, ID string, updateModel []interface{}) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (ModelsClient) UpdateResponder

func (client ModelsClient) UpdateResponder(resp *http.Response) (result autorest.Response, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (ModelsClient) UpdateSender

func (client ModelsClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type PagedModelDataCollection

type PagedModelDataCollection struct {
	autorest.Response `json:"-"`
	// Value - The ModelData objects.
	Value *[]ModelData `json:"value,omitempty"`
	// NextLink - A URI to retrieve the next page of objects.
	NextLink *string `json:"nextLink,omitempty"`
}

PagedModelDataCollection a collection of ModelData objects.

func (PagedModelDataCollection) IsEmpty

func (pmdc PagedModelDataCollection) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type PagedModelDataCollectionIterator

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

PagedModelDataCollectionIterator provides access to a complete listing of ModelData values.

func NewPagedModelDataCollectionIterator

func NewPagedModelDataCollectionIterator(page PagedModelDataCollectionPage) PagedModelDataCollectionIterator

Creates a new instance of the PagedModelDataCollectionIterator type.

func (*PagedModelDataCollectionIterator) Next

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*PagedModelDataCollectionIterator) NextWithContext

func (iter *PagedModelDataCollectionIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (PagedModelDataCollectionIterator) NotDone

func (iter PagedModelDataCollectionIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (PagedModelDataCollectionIterator) Response

Response returns the raw server response from the last page request.

func (PagedModelDataCollectionIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type PagedModelDataCollectionPage

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

PagedModelDataCollectionPage contains a page of ModelData values.

func NewPagedModelDataCollectionPage

Creates a new instance of the PagedModelDataCollectionPage type.

func (*PagedModelDataCollectionPage) Next

func (page *PagedModelDataCollectionPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*PagedModelDataCollectionPage) NextWithContext

func (page *PagedModelDataCollectionPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (PagedModelDataCollectionPage) NotDone

func (page PagedModelDataCollectionPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (PagedModelDataCollectionPage) Response

Response returns the raw server response from the last page request.

func (PagedModelDataCollectionPage) Values

func (page PagedModelDataCollectionPage) Values() []ModelData

Values returns the slice of values for the current page or nil if there are no values.

type QueryClient

type QueryClient struct {
	BaseClient
}

QueryClient is the a service for managing and querying digital twins and digital twin models.

func NewQueryClient

func NewQueryClient() QueryClient

NewQueryClient creates an instance of the QueryClient client.

func NewQueryClientWithBaseURI

func NewQueryClientWithBaseURI(baseURI string) QueryClient

NewQueryClientWithBaseURI creates an instance of the QueryClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (QueryClient) QueryTwins

func (client QueryClient) QueryTwins(ctx context.Context, querySpecification QuerySpecification) (result QueryResult, err error)

QueryTwins executes a query that allows traversing relationships and filtering by property values. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid. Parameters: querySpecification - the query specification to execute.

func (QueryClient) QueryTwinsPreparer

func (client QueryClient) QueryTwinsPreparer(ctx context.Context, querySpecification QuerySpecification) (*http.Request, error)

QueryTwinsPreparer prepares the QueryTwins request.

func (QueryClient) QueryTwinsResponder

func (client QueryClient) QueryTwinsResponder(resp *http.Response) (result QueryResult, err error)

QueryTwinsResponder handles the response to the QueryTwins request. The method always closes the http.Response Body.

func (QueryClient) QueryTwinsSender

func (client QueryClient) QueryTwinsSender(req *http.Request) (*http.Response, error)

QueryTwinsSender sends the QueryTwins request. The method will close the http.Response Body if it receives an error.

type QueryResult

type QueryResult struct {
	autorest.Response `json:"-"`
	// Items - The query results.
	Items *[]interface{} `json:"items,omitempty"`
	// ContinuationToken - A token which can be used to construct a new QuerySpecification to retrieve the next set of results.
	ContinuationToken *string `json:"continuationToken,omitempty"`
}

QueryResult the results of a query operation and an optional continuation token.

type QuerySpecification

type QuerySpecification struct {
	// Query - The query to execute. This value is ignored if a continuation token is provided.
	Query *string `json:"query,omitempty"`
	// ContinuationToken - A token which is used to retrieve the next set of results from a previous query.
	ContinuationToken *string `json:"continuationToken,omitempty"`
}

QuerySpecification a query specification containing either a query statement or a continuation token from a previous query result.

type RelationshipCollection

type RelationshipCollection struct {
	autorest.Response `json:"-"`
	// Value - The relationship objects.
	Value *[]interface{} `json:"value,omitempty"`
	// NextLink - A URI to retrieve the next page of objects.
	NextLink *string `json:"nextLink,omitempty"`
}

RelationshipCollection a collection of relationships which relate digital twins together.

func (RelationshipCollection) IsEmpty

func (rc RelationshipCollection) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type RelationshipCollectionIterator

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

RelationshipCollectionIterator provides access to a complete listing of interface{} values.

func NewRelationshipCollectionIterator

func NewRelationshipCollectionIterator(page RelationshipCollectionPage) RelationshipCollectionIterator

Creates a new instance of the RelationshipCollectionIterator type.

func (*RelationshipCollectionIterator) Next

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*RelationshipCollectionIterator) NextWithContext

func (iter *RelationshipCollectionIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (RelationshipCollectionIterator) NotDone

func (iter RelationshipCollectionIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (RelationshipCollectionIterator) Response

Response returns the raw server response from the last page request.

func (RelationshipCollectionIterator) Value

func (iter RelationshipCollectionIterator) Value() interface{}

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type RelationshipCollectionPage

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

RelationshipCollectionPage contains a page of interface{} values.

func NewRelationshipCollectionPage

Creates a new instance of the RelationshipCollectionPage type.

func (*RelationshipCollectionPage) Next

func (page *RelationshipCollectionPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*RelationshipCollectionPage) NextWithContext

func (page *RelationshipCollectionPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (RelationshipCollectionPage) NotDone

func (page RelationshipCollectionPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (RelationshipCollectionPage) Response

Response returns the raw server response from the last page request.

func (RelationshipCollectionPage) Values

func (page RelationshipCollectionPage) Values() []interface{}

Values returns the slice of values for the current page or nil if there are no values.

type SetObject

type SetObject struct {
	autorest.Response `json:"-"`
	Value             interface{} `json:"value,omitempty"`
}

SetObject ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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