policies = new ArrayList<>();
+
+ // Adds a "x-ms-client-request-id" header to each request. This header is useful for tracing requests through Azure ecosystems
+ policies.add(new RequestIdPolicy());
+
+ // Only the RequestIdPolicy will take effect prior to the retry policy
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+
+ policies.add(retryPolicy);
+
+ // Adds a date header to each HTTP request for tracking purposes
+ policies.add(new AddDatePolicy());
+
+ // Add authentication policy so that each HTTP request has authorization header
+ HttpPipelinePolicy credentialPolicy = new BearerTokenAuthenticationPolicy(tokenCredential, getAuthorizationScopes(endpoint));
+ policies.add(credentialPolicy);
+
+ policies.addAll(additionalPolicies);
+
+ // Custom policies, authentication policy, and add date policy all take place after the retry policy
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+
+ policies.add(new HttpLoggingPolicy(logOptions));
+
+ return new HttpPipelineBuilder()
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .httpClient(httpClient)
+ .build();
+ }
+
+ private static String[] getAuthorizationScopes(String endpoint) {
+ // If the endpoint is in Azure public cloud, the suffix will have "azure.net" or "ppe.net".
+ // Once ADT becomes available in other clouds, their corresponding scope has to be matched and set.
+ if (endpoint.indexOf("azure.net") > 0
+ || endpoint.indexOf("ppe.net") > 0) {
+ return adtPublicScope;
+ }
+
+ throw new IllegalArgumentException(String.format("Azure digital twins instance endpoint %s is not valid.", endpoint));
+ }
+
+ /**
+ * Create a {@link DigitalTwinsClient} based on the builder settings.
+ *
+ * @return the created synchronous DigitalTwinsClient
+ */
+ public DigitalTwinsClient buildClient() {
+ return new DigitalTwinsClient(buildAsyncClient());
+ }
+
+ /**
+ * Create a {@link DigitalTwinsAsyncClient} based on the builder settings.
+ *
+ * @return the created synchronous DigitalTwinsAsyncClient
+ */
+ public DigitalTwinsAsyncClient buildAsyncClient() {
+ Objects.requireNonNull(tokenCredential, "'tokenCredential' cannot be null.");
+ Objects.requireNonNull(endpoint, "'endpoint' cannot be null");
+
+ // Set defaults for these fields if they were not set while building the client
+ this.serviceVersion = this.serviceVersion != null ? this.serviceVersion : DigitalTwinsServiceVersion.getLatest();
+ this.retryPolicy = this.retryPolicy != null ? this.retryPolicy : new RetryPolicy(); // Default is exponential backoff
+
+ if (this.httpPipeline == null) {
+ this.httpPipeline = buildPipeline(
+ this.tokenCredential,
+ this.endpoint,
+ this.logOptions,
+ this.httpClient,
+ this.additionalPolicies,
+ this.retryPolicy);
+ }
+
+ return new DigitalTwinsAsyncClient(this.httpPipeline, this.serviceVersion, this.endpoint);
+ }
+
+ /**
+ * Set the service endpoint that the built client will communicate with. This field is mandatory to set.
+ *
+ * @param endpoint URL of the service.
+ * @return the updated DigitalTwinsClientBuilder instance for fluent building.
+ */
+ public DigitalTwinsClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /**
+ * Set the authentication token provider that the built client will use for all service requests. This field is
+ * mandatory to set unless you set the http pipeline directly and that set pipeline has an authentication policy configured.
+ *
+ * @param tokenCredential the authentication token provider.
+ * @return the updated DigitalTwinsClientBuilder instance for fluent building.
+ */
+ public DigitalTwinsClientBuilder tokenCredential(TokenCredential tokenCredential) {
+ this.tokenCredential = tokenCredential;
+ return this;
+ }
+
+ /**
+ * Sets the {@link DigitalTwinsServiceVersion} that is used when making API requests.
+ *
+ * If a service version is not provided, the service version that will be used will be the latest known service
+ * version based on the version of the client library being used. If no service version is specified, updating to a
+ * newer version of the client library will have the result of potentially moving to a newer service version.
+ *
+ * Targeting a specific service version may also mean that the service will return an error for newer APIs.
+ *
+ * @param serviceVersion The service API version to use.
+ * @return the updated DigitalTwinsClientBuilder instance for fluent building.
+ */
+ public DigitalTwinsClientBuilder serviceVersion(DigitalTwinsServiceVersion serviceVersion) {
+ this.serviceVersion = serviceVersion;
+ return this;
+ }
+
+ /**
+ * Sets the {@link HttpClient} to use for sending a receiving requests to and from the service.
+ *
+ * @param httpClient HttpClient to use for requests.
+ * @return the updated DigitalTwinsClientBuilder instance for fluent building.
+ */
+ public DigitalTwinsClientBuilder httpClient(HttpClient httpClient) {
+ this.httpClient = httpClient;
+ return this;
+ }
+
+ /**
+ * Sets the {@link HttpLogOptions} for service requests.
+ *
+ * @param logOptions The logging configuration to use when sending and receiving HTTP requests/responses.
+ * @return the updated DigitalTwinsClientBuilder instance for fluent building.
+ * @throws NullPointerException If {@code logOptions} is {@code null}.
+ */
+ public DigitalTwinsClientBuilder httpLogOptions(HttpLogOptions logOptions) {
+ this.logOptions = logOptions;
+ return this;
+ }
+
+ /**
+ * Adds a pipeline policy to apply on each request sent. The policy will be added after the retry policy. If
+ * the method is called multiple times, all policies will be added and their order preserved.
+ *
+ * @param pipelinePolicy a pipeline policy
+ * @return the updated DigitalTwinsClientBuilder instance for fluent building.
+ * @throws NullPointerException If {@code pipelinePolicy} is {@code null}.
+ */
+ public DigitalTwinsClientBuilder addPolicy(HttpPipelinePolicy pipelinePolicy) {
+ this.additionalPolicies.add(Objects.requireNonNull(pipelinePolicy, "'pipelinePolicy' cannot be null"));
+ return this;
+ }
+
+ /**
+ * Sets the request retry options for all the requests made through the client. By default, the pipeline will
+ * use an exponential backoff retry value as detailed in {@link RetryPolicy#RetryPolicy()}.
+ *
+ * @param retryPolicy {@link RetryPolicy}.
+ * @return the updated DigitalTwinsClientBuilder instance for fluent building.
+ * @throws NullPointerException If {@code retryOptions} is {@code null}.
+ */
+ public DigitalTwinsClientBuilder retryOptions(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the {@link HttpPipeline} to use for the service client.
+ *
+ * If {@code pipeline} is set, all other settings are ignored, aside from {@link #endpoint(String) endpoint}.
+ *
+ * @param httpPipeline HttpPipeline to use for sending service requests and receiving responses.
+ * @return the updated DigitalTwinsClientBuilder instance for fluent building.
+ */
+ public DigitalTwinsClientBuilder httpPipeline(HttpPipeline httpPipeline) {
+ this.httpPipeline = httpPipeline;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsServiceVersion.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsServiceVersion.java
new file mode 100644
index 000000000000..f7769d3cd515
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsServiceVersion.java
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.digitaltwins.core;
+
+import com.azure.core.util.ServiceVersion;
+
+/**
+ * The service API versions of Azure Digital Twins that are supported by this client.
+ */
+public enum DigitalTwinsServiceVersion implements ServiceVersion {
+ V2020_05_31_preview("2020-05-31-preview");
+
+ private final String version;
+
+ DigitalTwinsServiceVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getVersion() {
+ return this.version;
+ }
+
+ /**
+ * Gets the latest service API version of Azure Digital Twins that is supported by this client.
+ * @return The latest service API version of Azure Digital Twins that is supported by this client.
+ */
+ public static DigitalTwinsServiceVersion getLatest() {
+ return V2020_05_31_preview;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/EventRoutes.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/EventRoutes.java
new file mode 100644
index 000000000000..05fa45363f04
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/EventRoutes.java
@@ -0,0 +1,203 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.digitaltwins.core.models.ErrorResponseException;
+import com.azure.digitaltwins.core.models.EventRoute;
+import com.azure.digitaltwins.core.models.EventRouteCollection;
+import com.azure.digitaltwins.core.models.EventRoutesListOptions;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in EventRoutes. */
+public final class EventRoutes {
+ /** The proxy service used to perform REST calls. */
+ private final EventRoutesService service;
+
+ /** The service client containing this operation class. */
+ private final AzureDigitalTwinsAPI client;
+
+ /**
+ * Initializes an instance of EventRoutes.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ EventRoutes(AzureDigitalTwinsAPI client) {
+ this.service = RestProxy.create(EventRoutesService.class, client.getHttpPipeline());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureDigitalTwinsAPIEventRoutes to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureDigitalTwinsAPI")
+ private interface EventRoutesService {
+ @Get("/eventroutes")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ErrorResponseException.class)
+ Mono> list(
+ @HostParam("$host") String host,
+ @HeaderParam("x-ms-max-item-count") Integer maxItemCount,
+ @QueryParam("api-version") String apiVersion,
+ Context context);
+
+ @Get("/eventroutes/{id}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ErrorResponseException.class)
+ Mono> getById(
+ @HostParam("$host") String host,
+ @PathParam("id") String id,
+ @QueryParam("api-version") String apiVersion,
+ Context context);
+
+ @Put("/eventroutes/{id}")
+ @ExpectedResponses({204})
+ @UnexpectedResponseExceptionType(ErrorResponseException.class)
+ Mono> add(
+ @HostParam("$host") String host,
+ @PathParam("id") String id,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") EventRoute eventRoute,
+ Context context);
+
+ @Delete("/eventroutes/{id}")
+ @ExpectedResponses({204})
+ @UnexpectedResponseExceptionType(ErrorResponseException.class)
+ Mono> delete(
+ @HostParam("$host") String host,
+ @PathParam("id") String id,
+ @QueryParam("api-version") String apiVersion,
+ Context context);
+
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ErrorResponseException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
+ }
+
+ /**
+ * Retrieves all event routes. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid.
+ *
+ * @param eventRoutesListOptions Parameter group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a collection of EventRoute objects.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> listSinglePageAsync(EventRoutesListOptions eventRoutesListOptions) {
+ Integer maxItemCountInternal = null;
+ if (eventRoutesListOptions != null) {
+ maxItemCountInternal = eventRoutesListOptions.getMaxItemCount();
+ }
+ Integer maxItemCount = maxItemCountInternal;
+ return FluxUtil.withContext(
+ context ->
+ service.list(this.client.getHost(), maxItemCount, this.client.getApiVersion(), context))
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().getValue(),
+ res.getValue().getNextLink(),
+ null));
+ }
+
+ /**
+ * Retrieves an event route. Status codes: 200 (OK): Success. 404 (Not Found): There is no event route with the
+ * provided id.
+ *
+ * @param id The id for an event route. The id is unique within event routes and case sensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a route which directs notification and telemetry events to an endpoint.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getByIdWithResponseAsync(String id) {
+ return FluxUtil.withContext(
+ context -> service.getById(this.client.getHost(), id, this.client.getApiVersion(), context));
+ }
+
+ /**
+ * Adds or replaces an event route. Status codes: 200 (OK): Success. 400 (Bad Request): The request is invalid.
+ *
+ * @param id The id for an event route. The id is unique within event routes and case sensitive.
+ * @param 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> addWithResponseAsync(String id, EventRoute eventRoute) {
+ return FluxUtil.withContext(
+ context -> service.add(this.client.getHost(), id, this.client.getApiVersion(), eventRoute, context));
+ }
+
+ /**
+ * Deletes an event route. Status codes: 200 (OK): Success. 404 (Not Found): There is no event route with the
+ * provided id.
+ *
+ * @param id The id for an event route. The id is unique within event routes and case sensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> deleteWithResponseAsync(String id) {
+ return FluxUtil.withContext(
+ context -> service.delete(this.client.getHost(), id, this.client.getApiVersion(), context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a collection of EventRoute objects.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> listNextSinglePageAsync(String nextLink) {
+ return FluxUtil.withContext(context -> service.listNext(nextLink, context))
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().getValue(),
+ res.getValue().getNextLink(),
+ null));
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/Querys.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/Querys.java
new file mode 100644
index 000000000000..ad3ec24996c5
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/Querys.java
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.digitaltwins.core.models.ErrorResponseException;
+import com.azure.digitaltwins.core.models.QuerySpecification;
+import com.azure.digitaltwins.core.models.QuerysQueryTwinsResponse;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in Querys. */
+public final class Querys {
+ /** The proxy service used to perform REST calls. */
+ private final QuerysService service;
+
+ /** The service client containing this operation class. */
+ private final AzureDigitalTwinsAPI client;
+
+ /**
+ * Initializes an instance of Querys.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ Querys(AzureDigitalTwinsAPI client) {
+ this.service = RestProxy.create(QuerysService.class, client.getHttpPipeline());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureDigitalTwinsAPIQuerys to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureDigitalTwinsAPI")
+ private interface QuerysService {
+ @Post("/query")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ErrorResponseException.class)
+ Mono queryTwins(
+ @HostParam("$host") String host,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") QuerySpecification querySpecification,
+ Context context);
+ }
+
+ /**
+ * Executes a query that allows traversing relationships and filtering by property values. Status codes: 200 (OK):
+ * Success. 400 (Bad Request): The request is invalid.
+ *
+ * @param querySpecification A query specification containing either a query statement or a continuation token from
+ * a previous query result.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the results of a query operation and an optional continuation token.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono queryTwinsWithResponseAsync(QuerySpecification querySpecification) {
+ return FluxUtil.withContext(
+ context ->
+ service.queryTwins(
+ this.client.getHost(), this.client.getApiVersion(), querySpecification, context));
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinModelsListOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinModelsListOptions.java
new file mode 100644
index 000000000000..7ae6b14b563b
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinModelsListOptions.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The DigitalTwinModelsListOptions model. */
+@Fluent
+public final class DigitalTwinModelsListOptions {
+ /*
+ * The maximum number of items to retrieve per request. The server may
+ * choose to return less than the requested max.
+ */
+ @JsonProperty(value = "MaxItemCount")
+ private Integer maxItemCount;
+
+ /**
+ * Get the maxItemCount property: The maximum number of items to retrieve per request. The server may choose to
+ * return less than the requested max.
+ *
+ * @return the maxItemCount value.
+ */
+ public Integer getMaxItemCount() {
+ return this.maxItemCount;
+ }
+
+ /**
+ * Set the maxItemCount property: The maximum number of items to retrieve per request. The server may choose to
+ * return less than the requested max.
+ *
+ * @param maxItemCount the maxItemCount value to set.
+ * @return the DigitalTwinModelsListOptions object itself.
+ */
+ public DigitalTwinModelsListOptions setMaxItemCount(Integer maxItemCount) {
+ this.maxItemCount = maxItemCount;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddHeaders.java
new file mode 100644
index 000000000000..e7b3d8bf83ce
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddHeaders.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The DigitalTwinsAddHeaders model. */
+@Fluent
+public final class DigitalTwinsAddHeaders {
+ /*
+ * The ETag property.
+ */
+ @JsonProperty(value = "ETag")
+ private String eTag;
+
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the DigitalTwinsAddHeaders object itself.
+ */
+ public DigitalTwinsAddHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddRelationshipHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddRelationshipHeaders.java
new file mode 100644
index 000000000000..9cc9a64819f5
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddRelationshipHeaders.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The DigitalTwinsAddRelationshipHeaders model. */
+@Fluent
+public final class DigitalTwinsAddRelationshipHeaders {
+ /*
+ * The ETag property.
+ */
+ @JsonProperty(value = "ETag")
+ private String eTag;
+
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the DigitalTwinsAddRelationshipHeaders object itself.
+ */
+ public DigitalTwinsAddRelationshipHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddRelationshipResponse.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddRelationshipResponse.java
new file mode 100644
index 000000000000..df4c6bff1037
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddRelationshipResponse.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpRequest;
+import com.azure.core.http.rest.ResponseBase;
+
+/** Contains all response data for the addRelationship operation. */
+public final class DigitalTwinsAddRelationshipResponse
+ extends ResponseBase {
+ /**
+ * Creates an instance of DigitalTwinsAddRelationshipResponse.
+ *
+ * @param request the request which resulted in this DigitalTwinsAddRelationshipResponse.
+ * @param statusCode the status code of the HTTP response.
+ * @param rawHeaders the raw headers of the HTTP response.
+ * @param value the deserialized value of the HTTP response.
+ * @param headers the deserialized headers of the HTTP response.
+ */
+ public DigitalTwinsAddRelationshipResponse(
+ HttpRequest request,
+ int statusCode,
+ HttpHeaders rawHeaders,
+ Object value,
+ DigitalTwinsAddRelationshipHeaders headers) {
+ super(request, statusCode, rawHeaders, value, headers);
+ }
+
+ /** @return the deserialized response body. */
+ @Override
+ public Object getValue() {
+ return super.getValue();
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddResponse.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddResponse.java
new file mode 100644
index 000000000000..439f84bbcec1
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsAddResponse.java
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpRequest;
+import com.azure.core.http.rest.ResponseBase;
+
+/** Contains all response data for the add operation. */
+public final class DigitalTwinsAddResponse extends ResponseBase {
+ /**
+ * Creates an instance of DigitalTwinsAddResponse.
+ *
+ * @param request the request which resulted in this DigitalTwinsAddResponse.
+ * @param statusCode the status code of the HTTP response.
+ * @param rawHeaders the raw headers of the HTTP response.
+ * @param value the deserialized value of the HTTP response.
+ * @param headers the deserialized headers of the HTTP response.
+ */
+ public DigitalTwinsAddResponse(
+ HttpRequest request, int statusCode, HttpHeaders rawHeaders, Object value, DigitalTwinsAddHeaders headers) {
+ super(request, statusCode, rawHeaders, value, headers);
+ }
+
+ /** @return the deserialized response body. */
+ @Override
+ public Object getValue() {
+ return super.getValue();
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetByIdHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetByIdHeaders.java
new file mode 100644
index 000000000000..12e7ab31a15f
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetByIdHeaders.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The DigitalTwinsGetByIdHeaders model. */
+@Fluent
+public final class DigitalTwinsGetByIdHeaders {
+ /*
+ * The ETag property.
+ */
+ @JsonProperty(value = "ETag")
+ private String eTag;
+
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the DigitalTwinsGetByIdHeaders object itself.
+ */
+ public DigitalTwinsGetByIdHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetByIdResponse.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetByIdResponse.java
new file mode 100644
index 000000000000..781bd72834b7
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetByIdResponse.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpRequest;
+import com.azure.core.http.rest.ResponseBase;
+
+/** Contains all response data for the getById operation. */
+public final class DigitalTwinsGetByIdResponse extends ResponseBase {
+ /**
+ * Creates an instance of DigitalTwinsGetByIdResponse.
+ *
+ * @param request the request which resulted in this DigitalTwinsGetByIdResponse.
+ * @param statusCode the status code of the HTTP response.
+ * @param rawHeaders the raw headers of the HTTP response.
+ * @param value the deserialized value of the HTTP response.
+ * @param headers the deserialized headers of the HTTP response.
+ */
+ public DigitalTwinsGetByIdResponse(
+ HttpRequest request,
+ int statusCode,
+ HttpHeaders rawHeaders,
+ Object value,
+ DigitalTwinsGetByIdHeaders headers) {
+ super(request, statusCode, rawHeaders, value, headers);
+ }
+
+ /** @return the deserialized response body. */
+ @Override
+ public Object getValue() {
+ return super.getValue();
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetComponentHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetComponentHeaders.java
new file mode 100644
index 000000000000..ecbb30fac4bb
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetComponentHeaders.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The DigitalTwinsGetComponentHeaders model. */
+@Fluent
+public final class DigitalTwinsGetComponentHeaders {
+ /*
+ * The ETag property.
+ */
+ @JsonProperty(value = "ETag")
+ private String eTag;
+
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the DigitalTwinsGetComponentHeaders object itself.
+ */
+ public DigitalTwinsGetComponentHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetComponentResponse.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetComponentResponse.java
new file mode 100644
index 000000000000..081dddce2999
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetComponentResponse.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpRequest;
+import com.azure.core.http.rest.ResponseBase;
+
+/** Contains all response data for the getComponent operation. */
+public final class DigitalTwinsGetComponentResponse extends ResponseBase {
+ /**
+ * Creates an instance of DigitalTwinsGetComponentResponse.
+ *
+ * @param request the request which resulted in this DigitalTwinsGetComponentResponse.
+ * @param statusCode the status code of the HTTP response.
+ * @param rawHeaders the raw headers of the HTTP response.
+ * @param value the deserialized value of the HTTP response.
+ * @param headers the deserialized headers of the HTTP response.
+ */
+ public DigitalTwinsGetComponentResponse(
+ HttpRequest request,
+ int statusCode,
+ HttpHeaders rawHeaders,
+ Object value,
+ DigitalTwinsGetComponentHeaders headers) {
+ super(request, statusCode, rawHeaders, value, headers);
+ }
+
+ /** @return the deserialized response body. */
+ @Override
+ public Object getValue() {
+ return super.getValue();
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetRelationshipByIdHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetRelationshipByIdHeaders.java
new file mode 100644
index 000000000000..9cfc2f6511fd
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetRelationshipByIdHeaders.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The DigitalTwinsGetRelationshipByIdHeaders model. */
+@Fluent
+public final class DigitalTwinsGetRelationshipByIdHeaders {
+ /*
+ * The ETag property.
+ */
+ @JsonProperty(value = "ETag")
+ private String eTag;
+
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the DigitalTwinsGetRelationshipByIdHeaders object itself.
+ */
+ public DigitalTwinsGetRelationshipByIdHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetRelationshipByIdResponse.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetRelationshipByIdResponse.java
new file mode 100644
index 000000000000..0967eba28373
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsGetRelationshipByIdResponse.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpRequest;
+import com.azure.core.http.rest.ResponseBase;
+
+/** Contains all response data for the getRelationshipById operation. */
+public final class DigitalTwinsGetRelationshipByIdResponse
+ extends ResponseBase {
+ /**
+ * Creates an instance of DigitalTwinsGetRelationshipByIdResponse.
+ *
+ * @param request the request which resulted in this DigitalTwinsGetRelationshipByIdResponse.
+ * @param statusCode the status code of the HTTP response.
+ * @param rawHeaders the raw headers of the HTTP response.
+ * @param value the deserialized value of the HTTP response.
+ * @param headers the deserialized headers of the HTTP response.
+ */
+ public DigitalTwinsGetRelationshipByIdResponse(
+ HttpRequest request,
+ int statusCode,
+ HttpHeaders rawHeaders,
+ Object value,
+ DigitalTwinsGetRelationshipByIdHeaders headers) {
+ super(request, statusCode, rawHeaders, value, headers);
+ }
+
+ /** @return the deserialized response body. */
+ @Override
+ public Object getValue() {
+ return super.getValue();
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateComponentHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateComponentHeaders.java
new file mode 100644
index 000000000000..d8849a8a190b
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateComponentHeaders.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The DigitalTwinsUpdateComponentHeaders model. */
+@Fluent
+public final class DigitalTwinsUpdateComponentHeaders {
+ /*
+ * The ETag property.
+ */
+ @JsonProperty(value = "ETag")
+ private String eTag;
+
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the DigitalTwinsUpdateComponentHeaders object itself.
+ */
+ public DigitalTwinsUpdateComponentHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateComponentResponse.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateComponentResponse.java
new file mode 100644
index 000000000000..631ffbb164ca
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateComponentResponse.java
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpRequest;
+import com.azure.core.http.rest.ResponseBase;
+
+/** Contains all response data for the updateComponent operation. */
+public final class DigitalTwinsUpdateComponentResponse extends ResponseBase {
+ /**
+ * Creates an instance of DigitalTwinsUpdateComponentResponse.
+ *
+ * @param request the request which resulted in this DigitalTwinsUpdateComponentResponse.
+ * @param statusCode the status code of the HTTP response.
+ * @param rawHeaders the raw headers of the HTTP response.
+ * @param value the deserialized value of the HTTP response.
+ * @param headers the deserialized headers of the HTTP response.
+ */
+ public DigitalTwinsUpdateComponentResponse(
+ HttpRequest request,
+ int statusCode,
+ HttpHeaders rawHeaders,
+ Void value,
+ DigitalTwinsUpdateComponentHeaders headers) {
+ super(request, statusCode, rawHeaders, value, headers);
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateHeaders.java
new file mode 100644
index 000000000000..46ec62a8f35c
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateHeaders.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The DigitalTwinsUpdateHeaders model. */
+@Fluent
+public final class DigitalTwinsUpdateHeaders {
+ /*
+ * The ETag property.
+ */
+ @JsonProperty(value = "ETag")
+ private String eTag;
+
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the DigitalTwinsUpdateHeaders object itself.
+ */
+ public DigitalTwinsUpdateHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateRelationshipHeaders.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateRelationshipHeaders.java
new file mode 100644
index 000000000000..93944ad869eb
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateRelationshipHeaders.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The DigitalTwinsUpdateRelationshipHeaders model. */
+@Fluent
+public final class DigitalTwinsUpdateRelationshipHeaders {
+ /*
+ * The ETag property.
+ */
+ @JsonProperty(value = "ETag")
+ private String eTag;
+
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the DigitalTwinsUpdateRelationshipHeaders object itself.
+ */
+ public DigitalTwinsUpdateRelationshipHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateRelationshipResponse.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateRelationshipResponse.java
new file mode 100644
index 000000000000..2373d063a0be
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateRelationshipResponse.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpRequest;
+import com.azure.core.http.rest.ResponseBase;
+
+/** Contains all response data for the updateRelationship operation. */
+public final class DigitalTwinsUpdateRelationshipResponse
+ extends ResponseBase {
+ /**
+ * Creates an instance of DigitalTwinsUpdateRelationshipResponse.
+ *
+ * @param request the request which resulted in this DigitalTwinsUpdateRelationshipResponse.
+ * @param statusCode the status code of the HTTP response.
+ * @param rawHeaders the raw headers of the HTTP response.
+ * @param value the deserialized value of the HTTP response.
+ * @param headers the deserialized headers of the HTTP response.
+ */
+ public DigitalTwinsUpdateRelationshipResponse(
+ HttpRequest request,
+ int statusCode,
+ HttpHeaders rawHeaders,
+ Void value,
+ DigitalTwinsUpdateRelationshipHeaders headers) {
+ super(request, statusCode, rawHeaders, value, headers);
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateResponse.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateResponse.java
new file mode 100644
index 000000000000..cf847cee9d86
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/DigitalTwinsUpdateResponse.java
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpRequest;
+import com.azure.core.http.rest.ResponseBase;
+
+/** Contains all response data for the update operation. */
+public final class DigitalTwinsUpdateResponse extends ResponseBase {
+ /**
+ * Creates an instance of DigitalTwinsUpdateResponse.
+ *
+ * @param request the request which resulted in this DigitalTwinsUpdateResponse.
+ * @param statusCode the status code of the HTTP response.
+ * @param rawHeaders the raw headers of the HTTP response.
+ * @param value the deserialized value of the HTTP response.
+ * @param headers the deserialized headers of the HTTP response.
+ */
+ public DigitalTwinsUpdateResponse(
+ HttpRequest request,
+ int statusCode,
+ HttpHeaders rawHeaders,
+ Void value,
+ DigitalTwinsUpdateHeaders headers) {
+ super(request, statusCode, rawHeaders, value, headers);
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/Error.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/Error.java
new file mode 100644
index 000000000000..602a4014a329
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/Error.java
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The Error model. */
+@Fluent
+public final class Error {
+ /*
+ * Service specific error code which serves as the substatus for the HTTP
+ * error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /*
+ * A human-readable representation of the error.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /*
+ * Internal error details.
+ */
+ @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY)
+ private List details;
+
+ /*
+ * An object containing more specific information than the current object
+ * about the error.
+ */
+ @JsonProperty(value = "innererror")
+ private InnerError innererror;
+
+ /**
+ * Get the code property: Service specific error code which serves as the substatus for the HTTP error code.
+ *
+ * @return the code value.
+ */
+ public String getCode() {
+ return this.code;
+ }
+
+ /**
+ * Get the message property: A human-readable representation of the error.
+ *
+ * @return the message value.
+ */
+ public String getMessage() {
+ return this.message;
+ }
+
+ /**
+ * Get the details property: Internal error details.
+ *
+ * @return the details value.
+ */
+ public List getDetails() {
+ return this.details;
+ }
+
+ /**
+ * Get the innererror property: An object containing more specific information than the current object about the
+ * error.
+ *
+ * @return the innererror value.
+ */
+ public InnerError getInnererror() {
+ return this.innererror;
+ }
+
+ /**
+ * Set the innererror property: An object containing more specific information than the current object about the
+ * error.
+ *
+ * @param innererror the innererror value to set.
+ * @return the Error object itself.
+ */
+ public Error setInnererror(InnerError innererror) {
+ this.innererror = innererror;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ErrorResponse.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ErrorResponse.java
new file mode 100644
index 000000000000..0d1b144695c6
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ErrorResponse.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The ErrorResponse model. */
+@Fluent
+public final class ErrorResponse {
+ /*
+ * The error details.
+ */
+ @JsonProperty(value = "error")
+ private Error error;
+
+ /**
+ * Get the error property: The error details.
+ *
+ * @return the error value.
+ */
+ public Error getError() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: The error details.
+ *
+ * @param error the error value to set.
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse setError(Error error) {
+ this.error = error;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ErrorResponseException.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ErrorResponseException.java
new file mode 100644
index 000000000000..4b9eec0488dc
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ErrorResponseException.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.http.HttpResponse;
+
+/** Exception thrown for an invalid response with ErrorResponse information. */
+public final class ErrorResponseException extends HttpResponseException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available.
+ * @param response the HTTP response.
+ */
+ public ErrorResponseException(String message, HttpResponse response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available.
+ * @param response the HTTP response.
+ * @param value the deserialized response value.
+ */
+ public ErrorResponseException(String message, HttpResponse response, ErrorResponse value) {
+ super(message, response, value);
+ }
+
+ @Override
+ public ErrorResponse getValue() {
+ return (ErrorResponse) super.getValue();
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRoute.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRoute.java
new file mode 100644
index 000000000000..9ee35e348e49
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRoute.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The EventRoute model. */
+@Fluent
+public final class EventRoute {
+ /*
+ * The id of the event route.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * The name of the endpoint this event route is bound to.
+ */
+ @JsonProperty(value = "endpointName", required = true)
+ private String endpointName;
+
+ /*
+ * An expression which describes the events which are routed to the
+ * endpoint.
+ */
+ @JsonProperty(value = "filter")
+ private String filter;
+
+ /**
+ * Get the id property: The id of the event route.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Get the endpointName property: The name of the endpoint this event route is bound to.
+ *
+ * @return the endpointName value.
+ */
+ public String getEndpointName() {
+ return this.endpointName;
+ }
+
+ /**
+ * Set the endpointName property: The name of the endpoint this event route is bound to.
+ *
+ * @param endpointName the endpointName value to set.
+ * @return the EventRoute object itself.
+ */
+ public EventRoute setEndpointName(String endpointName) {
+ this.endpointName = endpointName;
+ return this;
+ }
+
+ /**
+ * Get the filter property: An expression which describes the events which are routed to the endpoint.
+ *
+ * @return the filter value.
+ */
+ public String getFilter() {
+ return this.filter;
+ }
+
+ /**
+ * Set the filter property: An expression which describes the events which are routed to the endpoint.
+ *
+ * @param filter the filter value to set.
+ * @return the EventRoute object itself.
+ */
+ public EventRoute setFilter(String filter) {
+ this.filter = filter;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRouteCollection.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRouteCollection.java
new file mode 100644
index 000000000000..c2df9813e0a1
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRouteCollection.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The EventRouteCollection model. */
+@Fluent
+public final class EventRouteCollection {
+ /*
+ * The EventRoute objects.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * A URI to retrieve the next page of results.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /**
+ * Get the value property: The EventRoute objects.
+ *
+ * @return the value value.
+ */
+ public List getValue() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The EventRoute objects.
+ *
+ * @param value the value value to set.
+ * @return the EventRouteCollection object itself.
+ */
+ public EventRouteCollection setValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: A URI to retrieve the next page of results.
+ *
+ * @return the nextLink value.
+ */
+ public String getNextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: A URI to retrieve the next page of results.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the EventRouteCollection object itself.
+ */
+ public EventRouteCollection setNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRoutesListOptions.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRoutesListOptions.java
new file mode 100644
index 000000000000..2cde31eb2162
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/EventRoutesListOptions.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The EventRoutesListOptions model. */
+@Fluent
+public final class EventRoutesListOptions {
+ /*
+ * The maximum number of items to retrieve per request. The server may
+ * choose to return less than the requested max.
+ */
+ @JsonProperty(value = "MaxItemCount")
+ private Integer maxItemCount;
+
+ /**
+ * Get the maxItemCount property: The maximum number of items to retrieve per request. The server may choose to
+ * return less than the requested max.
+ *
+ * @return the maxItemCount value.
+ */
+ public Integer getMaxItemCount() {
+ return this.maxItemCount;
+ }
+
+ /**
+ * Set the maxItemCount property: The maximum number of items to retrieve per request. The server may choose to
+ * return less than the requested max.
+ *
+ * @param maxItemCount the maxItemCount value to set.
+ * @return the EventRoutesListOptions object itself.
+ */
+ public EventRoutesListOptions setMaxItemCount(Integer maxItemCount) {
+ this.maxItemCount = maxItemCount;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationship.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationship.java
new file mode 100644
index 000000000000..2d5dbcb633ee
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationship.java
@@ -0,0 +1,120 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The IncomingRelationship model. */
+@Fluent
+public final class IncomingRelationship {
+ /*
+ * 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.
+ */
+ @JsonProperty(value = "$relationshipId")
+ private String relationshipId;
+
+ /*
+ * The id of the source digital twin.
+ */
+ @JsonProperty(value = "$sourceId")
+ private String sourceId;
+
+ /*
+ * The name of the relationship.
+ */
+ @JsonProperty(value = "$relationshipName")
+ private String relationshipName;
+
+ /*
+ * Link to the relationship, to be used for deletion.
+ */
+ @JsonProperty(value = "$relationshipLink")
+ private String relationshipLink;
+
+ /**
+ * Get the relationshipId property: 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.
+ *
+ * @return the relationshipId value.
+ */
+ public String getRelationshipId() {
+ return this.relationshipId;
+ }
+
+ /**
+ * Set the relationshipId property: 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.
+ *
+ * @param relationshipId the relationshipId value to set.
+ * @return the IncomingRelationship object itself.
+ */
+ public IncomingRelationship setRelationshipId(String relationshipId) {
+ this.relationshipId = relationshipId;
+ return this;
+ }
+
+ /**
+ * Get the sourceId property: The id of the source digital twin.
+ *
+ * @return the sourceId value.
+ */
+ public String getSourceId() {
+ return this.sourceId;
+ }
+
+ /**
+ * Set the sourceId property: The id of the source digital twin.
+ *
+ * @param sourceId the sourceId value to set.
+ * @return the IncomingRelationship object itself.
+ */
+ public IncomingRelationship setSourceId(String sourceId) {
+ this.sourceId = sourceId;
+ return this;
+ }
+
+ /**
+ * Get the relationshipName property: The name of the relationship.
+ *
+ * @return the relationshipName value.
+ */
+ public String getRelationshipName() {
+ return this.relationshipName;
+ }
+
+ /**
+ * Set the relationshipName property: The name of the relationship.
+ *
+ * @param relationshipName the relationshipName value to set.
+ * @return the IncomingRelationship object itself.
+ */
+ public IncomingRelationship setRelationshipName(String relationshipName) {
+ this.relationshipName = relationshipName;
+ return this;
+ }
+
+ /**
+ * Get the relationshipLink property: Link to the relationship, to be used for deletion.
+ *
+ * @return the relationshipLink value.
+ */
+ public String getRelationshipLink() {
+ return this.relationshipLink;
+ }
+
+ /**
+ * Set the relationshipLink property: Link to the relationship, to be used for deletion.
+ *
+ * @param relationshipLink the relationshipLink value to set.
+ * @return the IncomingRelationship object itself.
+ */
+ public IncomingRelationship setRelationshipLink(String relationshipLink) {
+ this.relationshipLink = relationshipLink;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationshipCollection.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationshipCollection.java
new file mode 100644
index 000000000000..7b7c9487c9f2
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/IncomingRelationshipCollection.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The IncomingRelationshipCollection model. */
+@Fluent
+public final class IncomingRelationshipCollection {
+ /*
+ * The value property.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * A URI to retrieve the next page of objects.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /**
+ * Get the value property: The value property.
+ *
+ * @return the value value.
+ */
+ public List getValue() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The value property.
+ *
+ * @param value the value value to set.
+ * @return the IncomingRelationshipCollection object itself.
+ */
+ public IncomingRelationshipCollection setValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: A URI to retrieve the next page of objects.
+ *
+ * @return the nextLink value.
+ */
+ public String getNextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: A URI to retrieve the next page of objects.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the IncomingRelationshipCollection object itself.
+ */
+ public IncomingRelationshipCollection setNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/InnerError.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/InnerError.java
new file mode 100644
index 000000000000..811d968b2166
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/InnerError.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The InnerError model. */
+@Fluent
+public final class InnerError {
+ /*
+ * A more specific error code than was provided by the containing error.
+ */
+ @JsonProperty(value = "code")
+ private String code;
+
+ /*
+ * An object containing more specific information than the current object
+ * about the error.
+ */
+ @JsonProperty(value = "innererror")
+ private InnerError innererror;
+
+ /**
+ * Get the code property: A more specific error code than was provided by the containing error.
+ *
+ * @return the code value.
+ */
+ public String getCode() {
+ return this.code;
+ }
+
+ /**
+ * Set the code property: A more specific error code than was provided by the containing error.
+ *
+ * @param code the code value to set.
+ * @return the InnerError object itself.
+ */
+ public InnerError setCode(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get the innererror property: An object containing more specific information than the current object about the
+ * error.
+ *
+ * @return the innererror value.
+ */
+ public InnerError getInnererror() {
+ return this.innererror;
+ }
+
+ /**
+ * Set the innererror property: An object containing more specific information than the current object about the
+ * error.
+ *
+ * @param innererror the innererror value to set.
+ * @return the InnerError object itself.
+ */
+ public InnerError setInnererror(InnerError innererror) {
+ this.innererror = innererror;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ModelData.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ModelData.java
new file mode 100644
index 000000000000..a74c158d41cb
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/ModelData.java
@@ -0,0 +1,179 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** The ModelData model. */
+@Fluent
+public final class ModelData {
+ /*
+ * A language map that contains the localized display names as specified in
+ * the model definition.
+ */
+ @JsonProperty(value = "displayName")
+ private Map displayName;
+
+ /*
+ * A language map that contains the localized descriptions as specified in
+ * the model definition.
+ */
+ @JsonProperty(value = "description")
+ private Map description;
+
+ /*
+ * The id of the model as specified in the model definition.
+ */
+ @JsonProperty(value = "id", required = true)
+ private String id;
+
+ /*
+ * The time the model was uploaded to the service.
+ */
+ @JsonProperty(value = "uploadTime")
+ private OffsetDateTime uploadTime;
+
+ /*
+ * Indicates if the model is decommissioned. Decommissioned models cannot
+ * be referenced by newly created digital twins.
+ */
+ @JsonProperty(value = "decommissioned")
+ private Boolean decommissioned;
+
+ /*
+ * The model definition.
+ */
+ @JsonProperty(value = "model")
+ private Object model;
+
+ /**
+ * Get the displayName property: A language map that contains the localized display names as specified in the model
+ * definition.
+ *
+ * @return the displayName value.
+ */
+ public Map getDisplayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: A language map that contains the localized display names as specified in the model
+ * definition.
+ *
+ * @param displayName the displayName value to set.
+ * @return the ModelData object itself.
+ */
+ public ModelData setDisplayName(Map displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the description property: A language map that contains the localized descriptions as specified in the model
+ * definition.
+ *
+ * @return the description value.
+ */
+ public Map getDescription() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: A language map that contains the localized descriptions as specified in the model
+ * definition.
+ *
+ * @param description the description value to set.
+ * @return the ModelData object itself.
+ */
+ public ModelData setDescription(Map description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the id property: The id of the model as specified in the model definition.
+ *
+ * @return the id value.
+ */
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: The id of the model as specified in the model definition.
+ *
+ * @param id the id value to set.
+ * @return the ModelData object itself.
+ */
+ public ModelData setId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the uploadTime property: The time the model was uploaded to the service.
+ *
+ * @return the uploadTime value.
+ */
+ public OffsetDateTime getUploadTime() {
+ return this.uploadTime;
+ }
+
+ /**
+ * Set the uploadTime property: The time the model was uploaded to the service.
+ *
+ * @param uploadTime the uploadTime value to set.
+ * @return the ModelData object itself.
+ */
+ public ModelData setUploadTime(OffsetDateTime uploadTime) {
+ this.uploadTime = uploadTime;
+ return this;
+ }
+
+ /**
+ * Get the decommissioned property: Indicates if the model is decommissioned. Decommissioned models cannot be
+ * referenced by newly created digital twins.
+ *
+ * @return the decommissioned value.
+ */
+ public Boolean isDecommissioned() {
+ return this.decommissioned;
+ }
+
+ /**
+ * Set the decommissioned property: Indicates if the model is decommissioned. Decommissioned models cannot be
+ * referenced by newly created digital twins.
+ *
+ * @param decommissioned the decommissioned value to set.
+ * @return the ModelData object itself.
+ */
+ public ModelData setDecommissioned(Boolean decommissioned) {
+ this.decommissioned = decommissioned;
+ return this;
+ }
+
+ /**
+ * Get the model property: The model definition.
+ *
+ * @return the model value.
+ */
+ public Object getModel() {
+ return this.model;
+ }
+
+ /**
+ * Set the model property: The model definition.
+ *
+ * @param model the model value to set.
+ * @return the ModelData object itself.
+ */
+ public ModelData setModel(Object model) {
+ this.model = model;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/PagedModelDataCollection.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/PagedModelDataCollection.java
new file mode 100644
index 000000000000..aa404a997e84
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/PagedModelDataCollection.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The PagedModelDataCollection model. */
+@Fluent
+public final class PagedModelDataCollection {
+ /*
+ * The ModelData objects.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * A URI to retrieve the next page of objects.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /**
+ * Get the value property: The ModelData objects.
+ *
+ * @return the value value.
+ */
+ public List getValue() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The ModelData objects.
+ *
+ * @param value the value value to set.
+ * @return the PagedModelDataCollection object itself.
+ */
+ public PagedModelDataCollection setValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: A URI to retrieve the next page of objects.
+ *
+ * @return the nextLink value.
+ */
+ public String getNextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: A URI to retrieve the next page of objects.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the PagedModelDataCollection object itself.
+ */
+ public PagedModelDataCollection setNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+}
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/QueryResult.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/QueryResult.java
new file mode 100644
index 000000000000..3f1abe3f5853
--- /dev/null
+++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/models/QueryResult.java
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.digitaltwins.core.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The QueryResult model. */
+@Fluent
+public final class QueryResult {
+ /*
+ * The query results.
+ */
+ @JsonProperty(value = "items")
+ private List