@azure/digital-twins-core
Version:
An isomorphic client library for Azure Digital Twins
758 lines • 31.3 kB
JavaScript
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
import { setContinuationToken } from "../pagingHelper.js";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers.js";
import * as Parameters from "../models/parameters.js";
/// <reference lib="esnext.asynciterable" />
/** Class containing DigitalTwins operations. */
export class DigitalTwinsImpl {
/**
* Initialize a new instance of the class DigitalTwins class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Retrieves the relationships from a digital twin.
* Status codes:
* * 200 OK
* * 400 Bad Request
* * InvalidArgument - The digital twin id is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param options The options parameters.
*/
listRelationships(id, options) {
const iter = this.listRelationshipsPagingAll(id, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listRelationshipsPagingPage(id, options, settings);
},
};
}
listRelationshipsPagingPage(id, options, settings) {
return __asyncGenerator(this, arguments, function* listRelationshipsPagingPage_1() {
let result;
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
if (!continuationToken) {
result = yield __await(this._listRelationships(id, options));
let page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
while (continuationToken) {
result = yield __await(this._listRelationshipsNext(id, continuationToken, options));
continuationToken = result.nextLink;
let page = result.value || [];
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
});
}
listRelationshipsPagingAll(id, options) {
return __asyncGenerator(this, arguments, function* listRelationshipsPagingAll_1() {
var _a, e_1, _b, _c;
try {
for (var _d = true, _e = __asyncValues(this.listRelationshipsPagingPage(id, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const page = _c;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
}
finally { if (e_1) throw e_1.error; }
}
});
}
/**
* Retrieves all incoming relationship for a digital twin.
* Status codes:
* * 200 OK
* * 400 Bad Request
* * InvalidArgument - The digital twin id is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param options The options parameters.
*/
listIncomingRelationships(id, options) {
const iter = this.listIncomingRelationshipsPagingAll(id, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listIncomingRelationshipsPagingPage(id, options, settings);
},
};
}
listIncomingRelationshipsPagingPage(id, options, settings) {
return __asyncGenerator(this, arguments, function* listIncomingRelationshipsPagingPage_1() {
let result;
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
if (!continuationToken) {
result = yield __await(this._listIncomingRelationships(id, options));
let page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
while (continuationToken) {
result = yield __await(this._listIncomingRelationshipsNext(id, continuationToken, options));
continuationToken = result.nextLink;
let page = result.value || [];
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
});
}
listIncomingRelationshipsPagingAll(id, options) {
return __asyncGenerator(this, arguments, function* listIncomingRelationshipsPagingAll_1() {
var _a, e_2, _b, _c;
try {
for (var _d = true, _e = __asyncValues(this.listIncomingRelationshipsPagingPage(id, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const page = _c;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
}
finally { if (e_2) throw e_2.error; }
}
});
}
/**
* Retrieves a digital twin.
* Status codes:
* * 200 OK
* * 400 Bad Request
* * InvalidArgument - The digital twin id is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param options The options parameters.
*/
getById(id, options) {
return this.client.sendOperationRequest({ id, options }, getByIdOperationSpec);
}
/**
* Adds or replaces a digital twin.
* Status codes:
* * 200 OK
* * 400 Bad Request
* * InvalidArgument - The digital twin id or payload is invalid.
* * ModelDecommissioned - The model for the digital twin is decommissioned.
* * TwinLimitReached - The maximum number of digital twins allowed has been reached.
* * ValidationFailed - The digital twin payload is not valid.
* * 412 Precondition Failed
* * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param twin The digital twin instance being added. If provided, the $dtId property is ignored.
* @param options The options parameters.
*/
add(id, twin, options) {
return this.client.sendOperationRequest({ id, twin, options }, addOperationSpec);
}
/**
* Deletes a digital twin. All relationships referencing the digital twin must already be deleted.
* Status codes:
* * 204 No Content
* * 400 Bad Request
* * InvalidArgument - The digital twin id is invalid.
* * RelationshipsNotDeleted - The digital twin contains relationships.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* * 412 Precondition Failed
* * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param options The options parameters.
*/
delete(id, options) {
return this.client.sendOperationRequest({ id, options }, deleteOperationSpec);
}
/**
* Updates a digital twin.
* Status codes:
* * 204 No Content
* * 400 Bad Request
* * InvalidArgument - The digital twin id or payload is invalid.
* * JsonPatchInvalid - The JSON Patch provided is invalid.
* * ValidationFailed - Applying the patch results in an invalid digital twin.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* * 412 Precondition Failed
* * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param 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.
* @param options The options parameters.
*/
update(id, patchDocument, options) {
return this.client.sendOperationRequest({ id, patchDocument, options }, updateOperationSpec);
}
/**
* Retrieves a relationship between two digital twins.
* Status codes:
* * 200 OK
* * 400 Bad Request
* * InvalidArgument - The digital twin id or relationship id is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* * RelationshipNotFound - The relationship was not found.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param relationshipId The id of the relationship. The id is unique within the digital twin and case
* sensitive.
* @param options The options parameters.
*/
getRelationshipById(id, relationshipId, options) {
return this.client.sendOperationRequest({ id, relationshipId, options }, getRelationshipByIdOperationSpec);
}
/**
* Adds a relationship between two digital twins.
* Status codes:
* * 200 OK
* * 400 Bad Request
* * InvalidArgument - The digital twin id, relationship id, or payload is invalid.
* * InvalidRelationship - The relationship is invalid.
* * OperationNotAllowed - The relationship cannot connect to the same digital twin.
* * ValidationFailed - The relationship content is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* * TargetTwinNotFound - The digital twin target of the relationship was not found.
* * 412 Precondition Failed
* * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param relationshipId The id of the relationship. The id is unique within the digital twin and case
* sensitive.
* @param relationship The data for the relationship.
* @param options The options parameters.
*/
addRelationship(id, relationshipId, relationship, options) {
return this.client.sendOperationRequest({ id, relationshipId, relationship, options }, addRelationshipOperationSpec);
}
/**
* Deletes a relationship between two digital twins.
* Status codes:
* * 204 No Content
* * 400 Bad Request
* * InvalidArgument - The digital twin id or relationship id is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* * RelationshipNotFound - The relationship was not found.
* * 412 Precondition Failed
* * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param relationshipId The id of the relationship. The id is unique within the digital twin and case
* sensitive.
* @param options The options parameters.
*/
deleteRelationship(id, relationshipId, options) {
return this.client.sendOperationRequest({ id, relationshipId, options }, deleteRelationshipOperationSpec);
}
/**
* Updates the properties on a relationship between two digital twins.
* Status codes:
* * 204 No Content
* * 400 Bad Request
* * InvalidArgument - The digital twin id or relationship id is invalid.
* * InvalidRelationship - The relationship is invalid.
* * JsonPatchInvalid - The JSON Patch provided is invalid.
* * ValidationFailed - The relationship content is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* * RelationshipNotFound - The relationship was not found.
* * 409 Conflict
* * RelationshipAlreadyExists - The relationship already exists.
* * 412 Precondition Failed
* * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param relationshipId The id of the relationship. The id is unique within the digital twin and case
* sensitive.
* @param patchDocument JSON Patch description of the update to the relationship properties.
* @param options The options parameters.
*/
updateRelationship(id, relationshipId, patchDocument, options) {
return this.client.sendOperationRequest({ id, relationshipId, patchDocument, options }, updateRelationshipOperationSpec);
}
/**
* Retrieves the relationships from a digital twin.
* Status codes:
* * 200 OK
* * 400 Bad Request
* * InvalidArgument - The digital twin id is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param options The options parameters.
*/
_listRelationships(id, options) {
return this.client.sendOperationRequest({ id, options }, listRelationshipsOperationSpec);
}
/**
* Retrieves all incoming relationship for a digital twin.
* Status codes:
* * 200 OK
* * 400 Bad Request
* * InvalidArgument - The digital twin id is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param options The options parameters.
*/
_listIncomingRelationships(id, options) {
return this.client.sendOperationRequest({ id, options }, listIncomingRelationshipsOperationSpec);
}
/**
* Sends telemetry on behalf of a digital twin.
* Status codes:
* * 204 No Content
* * 400 Bad Request
* * InvalidArgument - The digital twin id or message id is invalid.
* * ValidationFailed - The telemetry content is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param messageId A unique message identifier (in the scope of the digital twin id) that is commonly
* used for de-duplicating messages.
* @param telemetry The telemetry measurements to send from the digital twin.
* @param options The options parameters.
*/
sendTelemetry(id, messageId, telemetry, options) {
return this.client.sendOperationRequest({ id, messageId, telemetry, options }, sendTelemetryOperationSpec);
}
/**
* Sends telemetry on behalf of a component in a digital twin.
* Status codes:
* * 204 No Content
* * 400 Bad Request
* * InvalidArgument - The digital twin id, message id, or component path is invalid.
* * ValidationFailed - The telemetry content is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* * ComponentNotFound - The component path was not found.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param componentPath The name of the DTDL component.
* @param messageId A unique message identifier (in the scope of the digital twin id) that is commonly
* used for de-duplicating messages.
* @param telemetry The telemetry measurements to send from the digital twin's component.
* @param options The options parameters.
*/
sendComponentTelemetry(id, componentPath, messageId, telemetry, options) {
return this.client.sendOperationRequest({ id, componentPath, messageId, telemetry, options }, sendComponentTelemetryOperationSpec);
}
/**
* Retrieves a component from a digital twin.
* Status codes:
* * 200 OK
* * 400 Bad Request
* * InvalidArgument - The digital twin id or component path is invalid.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* * ComponentNotFound - The component path was not found.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param componentPath The name of the DTDL component.
* @param options The options parameters.
*/
getComponent(id, componentPath, options) {
return this.client.sendOperationRequest({ id, componentPath, options }, getComponentOperationSpec);
}
/**
* Updates a component on a digital twin.
* Status codes:
* * 204 No Content
* * 400 Bad Request
* * InvalidArgument - The digital twin id, component path, or payload is invalid.
* * JsonPatchInvalid - The JSON Patch provided is invalid.
* * ValidationFailed - Applying the patch results in an invalid digital twin.
* * 404 Not Found
* * DigitalTwinNotFound - The digital twin was not found.
* * 412 Precondition Failed
* * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param componentPath The name of the DTDL component.
* @param 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.
* @param options The options parameters.
*/
updateComponent(id, componentPath, patchDocument, options) {
return this.client.sendOperationRequest({ id, componentPath, patchDocument, options }, updateComponentOperationSpec);
}
/**
* ListRelationshipsNext
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param nextLink The nextLink from the previous successful call to the ListRelationships method.
* @param options The options parameters.
*/
_listRelationshipsNext(id, nextLink, options) {
return this.client.sendOperationRequest({ id, nextLink, options }, listRelationshipsNextOperationSpec);
}
/**
* ListIncomingRelationshipsNext
* @param id The id of the digital twin. The id is unique within the service and case sensitive.
* @param nextLink The nextLink from the previous successful call to the ListIncomingRelationships
* method.
* @param options The options parameters.
*/
_listIncomingRelationshipsNext(id, nextLink, options) {
return this.client.sendOperationRequest({ id, nextLink, options }, listIncomingRelationshipsNextOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const getByIdOperationSpec = {
path: "/digitaltwins/{id}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: { name: "Dictionary", value: { type: { name: "any" } } },
},
headersMapper: Mappers.DigitalTwinsGetByIdHeaders,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsGetByIdExceptionHeaders,
},
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id],
headerParameters: [Parameters.accept],
serializer,
};
const addOperationSpec = {
path: "/digitaltwins/{id}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: {
type: { name: "Dictionary", value: { type: { name: "any" } } },
},
headersMapper: Mappers.DigitalTwinsAddHeaders,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsAddExceptionHeaders,
},
},
requestBody: Parameters.twin,
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id],
headerParameters: [
Parameters.contentType,
Parameters.accept,
Parameters.ifNoneMatch,
],
mediaType: "json",
serializer,
};
const deleteOperationSpec = {
path: "/digitaltwins/{id}",
httpMethod: "DELETE",
responses: {
204: {},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsDeleteExceptionHeaders,
},
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id],
headerParameters: [Parameters.accept, Parameters.ifMatch],
serializer,
};
const updateOperationSpec = {
path: "/digitaltwins/{id}",
httpMethod: "PATCH",
responses: {
204: {
headersMapper: Mappers.DigitalTwinsUpdateHeaders,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsUpdateExceptionHeaders,
},
},
requestBody: Parameters.patchDocument,
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id],
headerParameters: [
Parameters.accept,
Parameters.contentType1,
Parameters.ifMatch,
],
mediaType: "json",
serializer,
};
const getRelationshipByIdOperationSpec = {
path: "/digitaltwins/{id}/relationships/{relationshipId}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: { name: "Dictionary", value: { type: { name: "any" } } },
},
headersMapper: Mappers.DigitalTwinsGetRelationshipByIdHeaders,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsGetRelationshipByIdExceptionHeaders,
},
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id, Parameters.relationshipId],
headerParameters: [Parameters.accept],
serializer,
};
const addRelationshipOperationSpec = {
path: "/digitaltwins/{id}/relationships/{relationshipId}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: {
type: { name: "Dictionary", value: { type: { name: "any" } } },
},
headersMapper: Mappers.DigitalTwinsAddRelationshipHeaders,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsAddRelationshipExceptionHeaders,
},
},
requestBody: Parameters.relationship,
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id, Parameters.relationshipId],
headerParameters: [
Parameters.contentType,
Parameters.accept,
Parameters.ifNoneMatch,
],
mediaType: "json",
serializer,
};
const deleteRelationshipOperationSpec = {
path: "/digitaltwins/{id}/relationships/{relationshipId}",
httpMethod: "DELETE",
responses: {
204: {},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsDeleteRelationshipExceptionHeaders,
},
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id, Parameters.relationshipId],
headerParameters: [Parameters.accept, Parameters.ifMatch],
serializer,
};
const updateRelationshipOperationSpec = {
path: "/digitaltwins/{id}/relationships/{relationshipId}",
httpMethod: "PATCH",
responses: {
204: {
headersMapper: Mappers.DigitalTwinsUpdateRelationshipHeaders,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsUpdateRelationshipExceptionHeaders,
},
},
requestBody: Parameters.patchDocument,
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id, Parameters.relationshipId],
headerParameters: [
Parameters.accept,
Parameters.contentType1,
Parameters.ifMatch,
],
mediaType: "json",
serializer,
};
const listRelationshipsOperationSpec = {
path: "/digitaltwins/{id}/relationships",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.RelationshipCollection,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsListRelationshipsExceptionHeaders,
},
},
queryParameters: [Parameters.apiVersion, Parameters.relationshipName],
urlParameters: [Parameters.$host, Parameters.id],
headerParameters: [Parameters.accept],
serializer,
};
const listIncomingRelationshipsOperationSpec = {
path: "/digitaltwins/{id}/incomingrelationships",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.IncomingRelationshipCollection,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsListIncomingRelationshipsExceptionHeaders,
},
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id],
headerParameters: [Parameters.accept],
serializer,
};
const sendTelemetryOperationSpec = {
path: "/digitaltwins/{id}/telemetry",
httpMethod: "POST",
responses: {
204: {},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsSendTelemetryExceptionHeaders,
},
},
requestBody: Parameters.telemetry,
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id],
headerParameters: [
Parameters.contentType,
Parameters.accept,
Parameters.messageId,
Parameters.telemetrySourceTime,
],
mediaType: "json",
serializer,
};
const sendComponentTelemetryOperationSpec = {
path: "/digitaltwins/{id}/components/{componentPath}/telemetry",
httpMethod: "POST",
responses: {
204: {},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsSendComponentTelemetryExceptionHeaders,
},
},
requestBody: Parameters.telemetry,
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id, Parameters.componentPath],
headerParameters: [
Parameters.contentType,
Parameters.accept,
Parameters.messageId,
Parameters.telemetrySourceTime,
],
mediaType: "json",
serializer,
};
const getComponentOperationSpec = {
path: "/digitaltwins/{id}/components/{componentPath}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: { name: "Dictionary", value: { type: { name: "any" } } },
},
headersMapper: Mappers.DigitalTwinsGetComponentHeaders,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsGetComponentExceptionHeaders,
},
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id, Parameters.componentPath],
headerParameters: [Parameters.accept],
serializer,
};
const updateComponentOperationSpec = {
path: "/digitaltwins/{id}/components/{componentPath}",
httpMethod: "PATCH",
responses: {
204: {
headersMapper: Mappers.DigitalTwinsUpdateComponentHeaders,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsUpdateComponentExceptionHeaders,
},
},
requestBody: Parameters.patchDocument,
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.id, Parameters.componentPath],
headerParameters: [
Parameters.accept,
Parameters.contentType1,
Parameters.ifMatch,
],
mediaType: "json",
serializer,
};
const listRelationshipsNextOperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.RelationshipCollection,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsListRelationshipsNextExceptionHeaders,
},
},
urlParameters: [Parameters.$host, Parameters.id, Parameters.nextLink],
headerParameters: [Parameters.accept],
serializer,
};
const listIncomingRelationshipsNextOperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.IncomingRelationshipCollection,
},
default: {
bodyMapper: Mappers.ErrorResponse,
headersMapper: Mappers.DigitalTwinsListIncomingRelationshipsNextExceptionHeaders,
},
},
urlParameters: [Parameters.$host, Parameters.id, Parameters.nextLink],
headerParameters: [Parameters.accept],
serializer,
};
//# sourceMappingURL=digitalTwins.js.map