From 940f342e30a26386f7d7f7af693d4fa9c7d69699 Mon Sep 17 00:00:00 2001 From: Kai Zimmermann Date: Mon, 16 Sep 2019 07:45:02 +0200 Subject: [PATCH] Split client module into api and core. --- README.md | 2 +- twin-management-client/pom.xml | 5 +- .../twin-management-client-api/pom.xml | 37 ++++++ .../com/microsoft/twins/api/DevicesApi.java | 5 +- .../com/microsoft/twins/api/EndpointsApi.java | 5 +- .../com/microsoft/twins/api/KeyStoresApi.java | 109 ++++++++-------- .../com/microsoft/twins/api/MatchersApi.java | 117 +++++++++--------- .../microsoft/twins/api/OntologiesApi.java | 5 +- .../microsoft/twins/api/PropertyKeysApi.java | 10 +- .../com/microsoft/twins/api/ResourcesApi.java | 5 +- .../twins/api/RoleAssignmentsApi.java | 5 +- .../com/microsoft/twins/api/SensorsApi.java | 5 +- .../com/microsoft/twins/api/SpacesApi.java | 12 +- .../com/microsoft/twins/api/SystemApi.java | 3 +- .../com/microsoft/twins/api/TypesApi.java | 5 +- .../twins/api/UserDefinedFunctionsApi.java | 13 +- .../com/microsoft/twins/api/UsersApi.java | 5 +- .../event/model/TopologyOperationEvent.java | 0 .../twins/model/AbstractRetrieve.java | 0 .../twins/model/BlobMetadataContentInfo.java | 0 .../twins/model/BlobMetadataCreate.java | 0 .../twins/model/BlobMetadataRetrieve.java | 0 .../twins/model/BlobMetadataUpdate.java | 0 .../microsoft/twins/model/CategoryEnum.java | 0 .../microsoft/twins/model/ComparisonEnum.java | 0 .../twins/model/ConditionCreate.java | 0 .../twins/model/ConditionRetrieve.java | 0 .../twins/model/ConditionUpdate.java | 0 .../microsoft/twins/model/DeviceCreate.java | 0 .../microsoft/twins/model/DeviceRetrieve.java | 0 .../microsoft/twins/model/DeviceUpdate.java | 0 .../microsoft/twins/model}/EncodingUtils.java | 2 +- .../microsoft/twins/model/EndpointCreate.java | 0 .../twins/model/EndpointRetrieve.java | 0 .../twins/model/ErrorInformation.java | 0 .../microsoft/twins/model/EventTypesEnum.java | 0 .../twins/model/ExtendedPropertyCreate.java | 0 .../twins/model/ExtendedPropertyFilters.java | 0 .../model/ExtendedPropertyKeyCreate.java | 0 .../model/ExtendedPropertyKeyRetrieve.java | 0 .../model/ExtendedPropertyKeyUpdate.java | 0 .../twins/model/ExtendedPropertyRetrieve.java | 0 .../twins/model/ExtendedTypeCreate.java | 0 .../twins/model/ExtendedTypeRetrieve.java | 0 .../twins/model/ExtendedTypeUpdate.java | 0 .../microsoft/twins/model/FilterClause.java | 0 .../twins/model/FilterQueryOption.java | 0 .../twins/model/FilterQueryValidator.java | 0 .../IEdmDirectValueAnnotationsManager.java | 0 .../com/microsoft/twins/model/IEdmModel.java | 0 .../twins/model/IEdmSchemaElement.java | 0 .../com/microsoft/twins/model/IEdmTerm.java | 0 .../com/microsoft/twins/model/IEdmType.java | 0 .../twins/model/IEdmTypeReference.java | 0 .../model/IEdmVocabularyAnnotatable.java | 0 .../twins/model/IEdmVocabularyAnnotation.java | 0 .../microsoft/twins/model/IEnumEntity.java | 0 .../twins/model/InlineCountQueryOption.java | 0 .../microsoft/twins/model/KeyStoreCreate.java | 0 .../twins/model/KeyStoreRetrieve.java | 0 .../microsoft/twins/model/KeyStoreUpdate.java | 0 .../com/microsoft/twins/model/Location.java | 0 .../microsoft/twins/model/MatcherCreate.java | 0 .../twins/model/MatcherEvaluationResults.java | 0 .../twins/model/MatcherRetrieve.java | 0 .../microsoft/twins/model/MatcherUpdate.java | 0 .../twins/model/ODataQueryContext.java | 0 .../twins/model/ODataQueryOptionsDevice.java | 0 .../ODataQueryOptionsDeviceBlobMetadata.java | 0 .../ODataQueryOptionsExtendedPropertyKey.java | 0 .../model/ODataQueryOptionsExtendedType.java | 0 .../model/ODataQueryOptionsKeyStore.java | 0 .../twins/model/ODataQueryOptionsMatcher.java | 0 .../model/ODataQueryOptionsOntology.java | 0 ...ataQueryOptionsRoleAssignmentRetrieve.java | 0 .../twins/model/ODataQueryOptionsSensor.java | 0 .../twins/model/ODataQueryOptionsSpace.java | 0 .../ODataQueryOptionsSpaceBlobMetadata.java | 0 .../model/ODataQueryOptionsSpaceResource.java | 0 .../twins/model/ODataQueryOptionsUser.java | 0 .../ODataQueryOptionsUserBlobMetadata.java | 0 .../ODataQueryOptionsUserDefinedFunction.java | 0 .../twins/model/ODataQueryValidator.java | 0 .../twins/model/ODataRawQueryOptions.java | 0 .../twins/model/ObjectIdTypeEnum.java | 0 .../twins/model/OntologyRetrieve.java | 0 .../microsoft/twins/model/OntologyUpdate.java | 0 .../microsoft/twins/model/OrderByClause.java | 0 .../microsoft/twins/model/OrderByNode.java | 0 .../twins/model/OrderByQueryOption.java | 0 .../twins/model/OrderByQueryValidator.java | 0 .../com/microsoft/twins/model/Permission.java | 0 .../twins/model/PrimitiveDataTypeEnum.java | 0 .../model/PropertiesAndTreeFiltersModel.java | 0 .../microsoft/twins/model/RangeVariable.java | 0 .../com/microsoft/twins/model/RegionEnum.java | 0 .../twins/model/RoleAssignmentCreate.java | 0 .../twins/model/RoleAssignmentRetrieve.java | 0 .../twins/model/RoleDefinitionRetrieve.java | 0 .../com/microsoft/twins/model/ScopeEnum.java | 0 .../twins/model/SecurityKeyRetrieve.java | 0 .../twins/model/SecurityKeyUpdate.java | 0 .../twins/model/SelectExpandClause.java | 0 .../twins/model/SelectExpandQueryOption.java | 0 .../model/SelectExpandQueryValidator.java | 0 .../com/microsoft/twins/model/SelectItem.java | 0 .../microsoft/twins/model/SensorCreate.java | 0 .../twins/model/SensorCreateNoParent.java | 0 .../twins/model/SensorHistoryValue.java | 0 .../microsoft/twins/model/SensorRetrieve.java | 0 .../microsoft/twins/model/SensorUpdate.java | 0 .../microsoft/twins/model/SensorValue.java | 0 .../microsoft/twins/model/SharingEnum.java | 0 .../twins/model/SingleValueNode.java | 0 .../com/microsoft/twins/model/SizeEnum.java | 0 .../twins/model/SkipQueryOption.java | 0 .../twins/model/SkipQueryValidator.java | 0 .../microsoft/twins/model/SpaceCreate.java | 0 .../twins/model/SpaceResourceCreate.java | 0 .../twins/model/SpaceResourceRetrieve.java | 0 .../twins/model/SpaceResourceUpdate.java | 0 .../microsoft/twins/model/SpaceRetrieve.java | 0 .../model/SpaceRetrieveWithChildren.java | 0 .../model/SpaceRetrieveWithProperties.java | 0 .../microsoft/twins/model/SpaceTypeEnum.java | 0 .../microsoft/twins/model/SpaceUpdate.java | 0 .../com/microsoft/twins/model/StatusEnum.java | 0 .../com/microsoft/twins/model/TargetEnum.java | 0 .../com/microsoft/twins/model/TimeZone.java | 0 .../microsoft/twins/model/TopQueryOption.java | 0 .../twins/model/TopQueryValidator.java | 0 .../twins/model/TreeFilterModel.java | 0 .../com/microsoft/twins/model/TypeEnum.java | 0 .../com/microsoft/twins/model/UserCreate.java | 0 .../twins/model/UserCreateWithSpace.java | 0 .../model/UserDefinedFunctionCreate.java | 0 .../model/UserDefinedFunctionRetrieve.java | 0 .../model/UserDefinedFunctionUpdate.java | 0 .../microsoft/twins/model/UserRetrieve.java | 0 .../com/microsoft/twins/model/UserUpdate.java | 0 .../DigitalTwinClientAutoConfiguration.java | 2 +- .../twin-management-client-core/pom.xml | 20 ++- .../{ => client}/AadRequestInterceptor.java | 2 +- .../{ => client}/CorrelationIdContext.java | 2 +- .../CorrelationIdRequestInterceptor.java | 2 +- .../twins/{ => client}/TwinsApiClient.java | 47 +++---- .../twins/error/RetryOnStatusHandler.java | 20 +-- .../microsoft/twins/api/AbstractApiTest.java | 2 +- .../api/error/FeignErrorHandlingTest.java | 2 +- twin-reflector-proxy/README.md | 10 +- .../azure/arm/templates/kubernetesDeploy.json | 4 +- .../azure/arm/templates/vnetDeploy.json | 10 +- .../twin-reflector-proxy-api/pom.xml | 2 +- .../reflector/model/FeedbackMessage.java | 5 + .../twins/reflector/model/IngressMessage.java | 5 + .../twins/reflector/model/MessageType.java | 22 +++- .../twins/reflector/model/Property.java | 4 + .../twins/reflector/model/Relationship.java | 4 + .../twins/reflector/AadHealthIndicator.java | 2 +- .../TwinReflectorProxyAutoConfiguration.java | 2 +- .../twins/reflector/TwinsHealthIndicator.java | 2 +- .../ingress/IngressMessageListener.java | 2 +- .../proxy/DigitalTwinMetadataProxy.java | 29 +++-- .../proxy/DigitalTwinTopologyProxy.java | 67 ++++++++++ .../v1/Cachedv1DigitalTwinMetadataProxy.java | 6 +- .../v1/Cachedv1DigitalTwinTopologyProxy.java | 17 ++- .../twins/eventssample/MessageConsumer.java | 2 +- .../SimulateFactoryCommandLineRunner.java | 2 +- 168 files changed, 384 insertions(+), 262 deletions(-) create mode 100644 twin-management-client/twin-management-client-api/pom.xml rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/DevicesApi.java (99%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/EndpointsApi.java (97%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/KeyStoresApi.java (78%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/MatchersApi.java (69%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/OntologiesApi.java (97%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/PropertyKeysApi.java (97%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/ResourcesApi.java (98%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/RoleAssignmentsApi.java (98%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/SensorsApi.java (99%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/SpacesApi.java (99%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/SystemApi.java (96%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/TypesApi.java (98%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/UserDefinedFunctionsApi.java (95%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/api/UsersApi.java (99%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/event/model/TopologyOperationEvent.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/AbstractRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/BlobMetadataContentInfo.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/BlobMetadataCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/BlobMetadataRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/BlobMetadataUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/CategoryEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ComparisonEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ConditionCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ConditionRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ConditionUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/DeviceCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/DeviceRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/DeviceUpdate.java (100%) rename twin-management-client/{twin-management-client-core/src/main/java/com/microsoft/twins => twin-management-client-api/src/main/java/com/microsoft/twins/model}/EncodingUtils.java (96%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/EndpointCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/EndpointRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ErrorInformation.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/EventTypesEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ExtendedPropertyCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ExtendedPropertyFilters.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ExtendedPropertyRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ExtendedTypeCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ExtendedTypeRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ExtendedTypeUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/FilterClause.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/FilterQueryOption.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/FilterQueryValidator.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/IEdmDirectValueAnnotationsManager.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/IEdmModel.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/IEdmSchemaElement.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/IEdmTerm.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/IEdmType.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/IEdmTypeReference.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/IEdmVocabularyAnnotatable.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/IEdmVocabularyAnnotation.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/IEnumEntity.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/InlineCountQueryOption.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/KeyStoreCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/KeyStoreRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/KeyStoreUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/Location.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/MatcherCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/MatcherEvaluationResults.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/MatcherRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/MatcherUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryContext.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsDevice.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsDeviceBlobMetadata.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsExtendedPropertyKey.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsExtendedType.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsKeyStore.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsMatcher.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsOntology.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsRoleAssignmentRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSensor.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpace.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpaceBlobMetadata.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpaceResource.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUser.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUserBlobMetadata.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUserDefinedFunction.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataQueryValidator.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ODataRawQueryOptions.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ObjectIdTypeEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/OntologyRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/OntologyUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/OrderByClause.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/OrderByNode.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/OrderByQueryOption.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/OrderByQueryValidator.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/Permission.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/PrimitiveDataTypeEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/PropertiesAndTreeFiltersModel.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/RangeVariable.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/RegionEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/RoleAssignmentCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/RoleAssignmentRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/RoleDefinitionRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/ScopeEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SecurityKeyRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SecurityKeyUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SelectExpandClause.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SelectExpandQueryOption.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SelectExpandQueryValidator.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SelectItem.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SensorCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SensorCreateNoParent.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SensorHistoryValue.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SensorRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SensorUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SensorValue.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SharingEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SingleValueNode.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SizeEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SkipQueryOption.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SkipQueryValidator.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SpaceCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SpaceResourceCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SpaceResourceRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SpaceResourceUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SpaceRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SpaceRetrieveWithChildren.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SpaceRetrieveWithProperties.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SpaceTypeEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/SpaceUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/StatusEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/TargetEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/TimeZone.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/TopQueryOption.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/TopQueryValidator.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/TreeFilterModel.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/TypeEnum.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/UserCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/UserCreateWithSpace.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/UserDefinedFunctionCreate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/UserDefinedFunctionRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/UserDefinedFunctionUpdate.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/UserRetrieve.java (100%) rename twin-management-client/{twin-management-client-core => twin-management-client-api}/src/main/java/com/microsoft/twins/model/UserUpdate.java (100%) rename twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/{ => client}/AadRequestInterceptor.java (99%) rename twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/{ => client}/CorrelationIdContext.java (93%) rename twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/{ => client}/CorrelationIdRequestInterceptor.java (92%) rename twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/{ => client}/TwinsApiClient.java (81%) diff --git a/README.md b/README.md index ce1e0f5..40ba982 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Azure Digital Twins - Java support collection -This projects aims to provide modules and samples for leveraging [Azure Digital Twins](https://docs.microsoft.com/en-us/azure/digital-twins/about-digital-twins) service from Java based applications. The project is community maintained and will provide generic Java components as well as off-the-shelf Spring Boot integration and auto configuration. +This projects aims to provide modules and samples for leveraging [Azure Digital Twins](https://docs.microsoft.com/en-us/azure/digital-twins/about-digital-twins) service from Java based applications. The project is community maintained and will provide generic Java components as well as off-the-shelf Spring Boot integration with auto configuration. [![Build status](https://dev.azure.com/kaiatms/Twins-Event-Ingress/_apis/build/status/ADT%20Java%20collection%20-%20MASTER%20build)](https://dev.azure.com/kaiatms/Twins-Event-Ingress/_build/latest?definitionId=20) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.microsoft.twins%3Aazure-digital-twins-java&metric=alert_status)](https://sonarcloud.io/dashboard?id=com.microsoft.twins%3Aazure-digital-twins-java) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=com.microsoft.twins%3Aazure-digital-twins-java&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=com.microsoft.twins%3Aazure-digital-twins-java) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=com.microsoft.twins%3Aazure-digital-twins-java&metric=security_rating)](https://sonarcloud.io/dashboard?id=com.microsoft.twins%3Aazure-digital-twins-java) diff --git a/twin-management-client/pom.xml b/twin-management-client/pom.xml index 2a33fac..3973290 100644 --- a/twin-management-client/pom.xml +++ b/twin-management-client/pom.xml @@ -17,8 +17,9 @@ pom + twin-management-client-api twin-management-client-core twin-management-client-autoconfigure - twin-management-client-starter - + twin-management-client-starter + \ No newline at end of file diff --git a/twin-management-client/twin-management-client-api/pom.xml b/twin-management-client/twin-management-client-api/pom.xml new file mode 100644 index 0000000..b22b3db --- /dev/null +++ b/twin-management-client/twin-management-client-api/pom.xml @@ -0,0 +1,37 @@ + + + 4.0.0 + + com.microsoft.twins + twin-management-client + 0.1.0-SNAPSHOT + + twin-management-client-api + Twin Management Client :: Api + + + + io.github.openfeign + feign-core + + + io.github.openfeign + feign-jackson + + + javax.validation + validation-api + + + + org.projectlombok + lombok + provided + + + + \ No newline at end of file diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/DevicesApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/DevicesApi.java similarity index 99% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/DevicesApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/DevicesApi.java index 3114410..90d85eb 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/DevicesApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/DevicesApi.java @@ -8,12 +8,11 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; import com.microsoft.twins.model.BlobMetadataRetrieve; import com.microsoft.twins.model.DeviceCreate; import com.microsoft.twins.model.DeviceRetrieve; import com.microsoft.twins.model.DeviceUpdate; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.ExtendedPropertyCreate; import com.microsoft.twins.model.KeyStoreRetrieve; import com.microsoft.twins.model.Location; @@ -24,7 +23,7 @@ import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface DevicesApi extends TwinsApiClient.Api { +public interface DevicesApi { /** * Creates a device * diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/EndpointsApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/EndpointsApi.java similarity index 97% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/EndpointsApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/EndpointsApi.java index 93f8b92..f8a6b0a 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/EndpointsApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/EndpointsApi.java @@ -7,8 +7,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.EndpointCreate; import com.microsoft.twins.model.EndpointRetrieve; import com.microsoft.twins.model.EventTypesEnum; @@ -17,7 +16,7 @@ import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface EndpointsApi extends TwinsApiClient.Api { +public interface EndpointsApi { /** * Creates an endpoint * diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/KeyStoresApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/KeyStoresApi.java similarity index 78% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/KeyStoresApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/KeyStoresApi.java index 32d1ff0..b537344 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/KeyStoresApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/KeyStoresApi.java @@ -7,8 +7,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.KeyStoreCreate; import com.microsoft.twins.model.KeyStoreRetrieve; import com.microsoft.twins.model.KeyStoreUpdate; @@ -19,7 +18,7 @@ import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface KeyStoresApi extends TwinsApiClient.Api { +public interface KeyStoresApi { /** * Creates a key store * @@ -33,9 +32,9 @@ public interface KeyStoresApi extends TwinsApiClient.Api { /** * Creates a key store * - * @param name (optional) + * @param name (optional) * @param description (optional) - * @param spaceId (optional) + * @param spaceId (optional) * @return UUID */ @RequestLine("POST /api/v1.0/keystores") @@ -65,7 +64,7 @@ public interface KeyStoresApi extends TwinsApiClient.Api { /** * Deletes the given key * - * @param id The store identifier (required) + * @param id The store identifier (required) * @param key The key identifier (required) */ @RequestLine("DELETE /api/v1.0/keystores/{id}/keys/{key}") @@ -75,8 +74,8 @@ public interface KeyStoresApi extends TwinsApiClient.Api { /** * Gets a token for the specified device using the specified key * - * @param id The key store identifier (required) - * @param key The key identifier (required) + * @param id The key store identifier (required) + * @param key The key identifier (required) * @param deviceMac The device to generate the token for (required) * @return String */ @@ -94,15 +93,15 @@ public interface KeyStoresApi extends TwinsApiClient.Api { * {@link KeyStoresGenerateTokenFromKeyByIdQueryParams} class that allows for building up this map * in a fluent style. * - * @param id The key store identifier (required) - * @param key The key identifier (required) + * @param id The key store identifier (required) + * @param key The key identifier (required) * @param queryParams Map of query parameters as name-value pairs - *

- * The following elements may be specified in the query map: - *

- * + *

+ * The following elements may be specified in the query map: + *

+ * * @return String * */ @@ -127,7 +126,7 @@ public interface KeyStoresApi extends TwinsApiClient.Api { /** * Gets a token for the specified device for the last valid key. * - * @param id The identifier (required) + * @param id The identifier (required) * @param deviceMac The device to generate the token for (required) * @return String */ @@ -145,14 +144,14 @@ public interface KeyStoresApi extends TwinsApiClient.Api { * {@link KeyStoresGenerateTokenFromLastKeyQueryParams} class that allows for building up this map * in a fluent style. * - * @param id The identifier (required) + * @param id The identifier (required) * @param queryParams Map of query parameters as name-value pairs - *

- * The following elements may be specified in the query map: - *

- * + *

+ * The following elements may be specified in the query map: + *

+ * * @return String * */ @@ -177,9 +176,9 @@ public interface KeyStoresApi extends TwinsApiClient.Api { /** * Retrieves key stores * - * @param spaceId Optional filter on parent space id (optional) + * @param spaceId Optional filter on parent space id (optional) * @param includes Comma separated list of what to include, for example \"Space,Keys\". - * Defaults to None (optional) + * Defaults to None (optional) * @return java.util.List<KeyStoreRetrieve> */ @RequestLine("GET /api/v1.0/keystores?spaceId={spaceId}&includes={includes}") @@ -196,14 +195,14 @@ public interface KeyStoresApi extends TwinsApiClient.Api { * allows for building up this map in a fluent style. * * @param queryParams Map of query parameters as name-value pairs - *

- * The following elements may be specified in the query map: - *

- * + *

+ * The following elements may be specified in the query map: + *

+ * * @return java.util.List<KeyStoreRetrieve> * */ @@ -233,15 +232,14 @@ public interface KeyStoresApi extends TwinsApiClient.Api { /** * Retrieves a key store * - * @param id The identifier (required) + * @param id The identifier (required) * @param includes Comma separated list of what to include, for example \"Space,Keys\". - * Defaults to None (optional) + * Defaults to None (optional) * @return KeyStoreRetrieve */ @RequestLine("GET /api/v1.0/keystores/{id}?includes={includes}") @Headers({"Accept: */*",}) - KeyStoreRetrieve keyStoresRetrieveById(@Param("id") UUID id, - @Param("includes") String includes); + KeyStoreRetrieve keyStoresRetrieveById(@Param("id") UUID id, @Param("includes") String includes); /** * Retrieves a key store @@ -252,15 +250,15 @@ public interface KeyStoresApi extends TwinsApiClient.Api { * {@link KeyStoresRetrieveByIdQueryParams} class that allows for building up this map in a fluent * style. * - * @param id The identifier (required) + * @param id The identifier (required) * @param queryParams Map of query parameters as name-value pairs - *

- * The following elements may be specified in the query map: - *

- * + *

+ * The following elements may be specified in the query map: + *

+ * * @return KeyStoreRetrieve * */ @@ -285,7 +283,7 @@ public interface KeyStoresApi extends TwinsApiClient.Api { /** * Retrieves the given key * - * @param id The key store identifier (required) + * @param id The key store identifier (required) * @param key The key identifier (required) * @return SecurityKeyRetrieve */ @@ -317,7 +315,7 @@ public interface KeyStoresApi extends TwinsApiClient.Api { * Updates a key store * * @param body The store information (required) - * @param id The identifier (required) + * @param id The identifier (required) */ @RequestLine("PATCH /api/v1.0/keystores/{id}") @Headers({"Accept: */*",}) @@ -326,8 +324,8 @@ public interface KeyStoresApi extends TwinsApiClient.Api { /** * Updates a key store * - * @param id The identifier (required) - * @param name (optional) + * @param id The identifier (required) + * @param name (optional) * @param description (optional) */ @RequestLine("PATCH /api/v1.0/keystores/{id}") @@ -339,19 +337,18 @@ public interface KeyStoresApi extends TwinsApiClient.Api { * Updates the given key * * @param body The key data (required) - * @param id The store identifier (required) - * @param key The key identifier (required) + * @param id The store identifier (required) + * @param key The key identifier (required) */ @RequestLine("PATCH /api/v1.0/keystores/{id}/keys/{key}") @Headers({"Accept: */*",}) - void keyStoresUpdateKey(SecurityKeyUpdate body, @Param("id") UUID id, - @Param("key") Integer key); + void keyStoresUpdateKey(SecurityKeyUpdate body, @Param("id") UUID id, @Param("key") Integer key); /** * Updates the given key * - * @param id The store identifier (required) - * @param key The key identifier (required) + * @param id The store identifier (required) + * @param key The key identifier (required) * @param status (optional) */ @RequestLine("PATCH /api/v1.0/keystores/{id}/keys/{key}") diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/MatchersApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/MatchersApi.java similarity index 69% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/MatchersApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/MatchersApi.java index 673bee2..1792a38 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/MatchersApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/MatchersApi.java @@ -7,10 +7,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; import com.microsoft.twins.model.ConditionCreate; import com.microsoft.twins.model.ConditionUpdate; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.MatcherCreate; import com.microsoft.twins.model.MatcherEvaluationResults; import com.microsoft.twins.model.MatcherRetrieve; @@ -20,7 +19,7 @@ import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface MatchersApi extends TwinsApiClient.Api { +public interface MatchersApi { /** * Creates a matcher * @@ -34,11 +33,11 @@ public interface MatchersApi extends TwinsApiClient.Api { /** * Creates a matcher * - * @param name (optional) - * @param description (optional) + * @param name (optional) + * @param description (optional) * @param friendlyName (optional) - * @param conditions (optional) - * @param spaceId (optional) + * @param conditions (optional) + * @param spaceId (optional) * @return UUID */ @RequestLine("POST /api/v1.0/matchers") @@ -59,8 +58,8 @@ public interface MatchersApi extends TwinsApiClient.Api { /** * Evaluates the matcher for a sensor * - * @param id Matcher identifier (required) - * @param sensorId Sensor identifier (required) + * @param id Matcher identifier (required) + * @param sensorId Sensor identifier (required) * @param enableLogging If true, return verbose logs for the evaluation (optional) * @return MatcherEvaluationResults */ @@ -77,16 +76,15 @@ public interface MatchersApi extends TwinsApiClient.Api { * query parameters, especially when used with the {@link MatchersEvaluateQueryParams} class that * allows for building up this map in a fluent style. * - * @param id Matcher identifier (required) - * @param sensorId Sensor identifier (required) + * @param id Matcher identifier (required) + * @param sensorId Sensor identifier (required) * @param queryParams Map of query parameters as name-value pairs - *

- * The following elements may be specified in the query map: - *

- * + *

+ * The following elements may be specified in the query map: + *

+ * * @return MatcherEvaluationResults * */ @@ -112,16 +110,16 @@ public interface MatchersApi extends TwinsApiClient.Api { /** * Retrieves matchers * - * @param ids Optional ';' delimited list of ids (optional) - * @param names Optional ';' delimited list of names (optional) - * @param includes Comma separated list of what to include, for example - * \"Space,Condition\". Defaults to None (optional) - * @param spaceId Optionally filter on objects based on their location in the topology - * relative to the specified spaceId (optional) - * @param traverse None (the default) for the specified spaceId only, Down for space and - * descendants, Up for spaceId and ancestors, Any for both (optional) - * @param minLevel Optional filter on minimum level, inclusive (optional) - * @param maxLevel Optional filter on maximum level, inclusive (optional) + * @param ids Optional ';' delimited list of ids (optional) + * @param names Optional ';' delimited list of names (optional) + * @param includes Comma separated list of what to include, for example + * \"Space,Condition\". Defaults to None (optional) + * @param spaceId Optionally filter on objects based on their location in the topology relative to + * the specified spaceId (optional) + * @param traverse None (the default) for the specified spaceId only, Down for space and + * descendants, Up for spaceId and ancestors, Any for both (optional) + * @param minLevel Optional filter on minimum level, inclusive (optional) + * @param maxLevel Optional filter on maximum level, inclusive (optional) * @param minRelative Specify if min level is absolute or relative (optional) * @param maxRelative Specify if max level is absolute or relative (optional) * @return java.util.List<MatcherRetrieve> @@ -143,26 +141,23 @@ public interface MatchersApi extends TwinsApiClient.Api { * allows for building up this map in a fluent style. * * @param queryParams Map of query parameters as name-value pairs - *

- * The following elements may be specified in the query map: - *

- * + *

+ * The following elements may be specified in the query map: + *

+ * * @return java.util.List<MatcherRetrieve> * */ @@ -224,7 +219,7 @@ public interface MatchersApi extends TwinsApiClient.Api { /** * Retrieves a matcher * - * @param id Matcher identifier (required) + * @param id Matcher identifier (required) * @param includes Comma separated list of what to include (optional) * @return MatcherRetrieve */ @@ -241,14 +236,14 @@ public interface MatchersApi extends TwinsApiClient.Api { * {@link MatchersRetrieveByIdQueryParams} class that allows for building up this map in a fluent * style. * - * @param id Matcher identifier (required) + * @param id Matcher identifier (required) * @param queryParams Map of query parameters as name-value pairs - *

- * The following elements may be specified in the query map: - *

- * + *

+ * The following elements may be specified in the query map: + *

+ * * @return MatcherRetrieve * */ @@ -272,7 +267,7 @@ public interface MatchersApi extends TwinsApiClient.Api { * Update a matcher * * @param body The matcher information (required) - * @param id Matcher identifier (required) + * @param id Matcher identifier (required) */ @RequestLine("PATCH /api/v1.0/matchers/{id}") @Headers({"Accept: */*",}) @@ -281,11 +276,11 @@ public interface MatchersApi extends TwinsApiClient.Api { /** * Update a matcher * - * @param id Matcher identifier (required) - * @param name (optional) - * @param description (optional) + * @param id Matcher identifier (required) + * @param name (optional) + * @param description (optional) * @param friendlyName (optional) - * @param conditions (optional) + * @param conditions (optional) */ @RequestLine("PATCH /api/v1.0/matchers/{id}") @Headers({"Accept: */*",}) diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/OntologiesApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/OntologiesApi.java similarity index 97% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/OntologiesApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/OntologiesApi.java index cb8eac7..00e3f93 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/OntologiesApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/OntologiesApi.java @@ -6,8 +6,7 @@ package com.microsoft.twins.api; import java.util.HashMap; import java.util.List; import java.util.Map; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.OntologyRetrieve; import com.microsoft.twins.model.OntologyUpdate; import feign.Headers; @@ -15,7 +14,7 @@ import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface OntologiesApi extends TwinsApiClient.Api { +public interface OntologiesApi { /** * Gets a list of ontologies * diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/PropertyKeysApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/PropertyKeysApi.java similarity index 97% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/PropertyKeysApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/PropertyKeysApi.java index 71139df..14a8998 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/PropertyKeysApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/PropertyKeysApi.java @@ -7,17 +7,17 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.ExtendedPropertyKeyCreate; import com.microsoft.twins.model.ExtendedPropertyKeyRetrieve; import com.microsoft.twins.model.ExtendedPropertyKeyUpdate; +import com.microsoft.twins.model.ScopeEnum; import feign.Headers; import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface PropertyKeysApi extends TwinsApiClient.Api { +public interface PropertyKeysApi { /** * Creates a property key * @@ -138,7 +138,7 @@ public interface PropertyKeysApi extends TwinsApiClient.Api { return this; } - public PropertyKeysDeleteBySpaceQueryParams scope(final String value) { + public PropertyKeysDeleteBySpaceQueryParams scope(final ScopeEnum value) { put("scope", EncodingUtils.encode(value)); return this; } @@ -214,7 +214,7 @@ public interface PropertyKeysApi extends TwinsApiClient.Api { * method in a fluent style. */ public static class PropertyKeysRetrieveQueryParams extends HashMap { - public PropertyKeysRetrieveQueryParams scope(final String value) { + public PropertyKeysRetrieveQueryParams scope(final ScopeEnum value) { put("scope", EncodingUtils.encode(value)); return this; } diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/ResourcesApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/ResourcesApi.java similarity index 98% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/ResourcesApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/ResourcesApi.java index 2aad024..5b03136 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/ResourcesApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/ResourcesApi.java @@ -7,8 +7,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.SpaceResourceCreate; import com.microsoft.twins.model.SpaceResourceRetrieve; import com.microsoft.twins.model.SpaceResourceUpdate; @@ -18,7 +17,7 @@ import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface ResourcesApi extends TwinsApiClient.Api { +public interface ResourcesApi { /** * Creates a resource * diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/RoleAssignmentsApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/RoleAssignmentsApi.java similarity index 98% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/RoleAssignmentsApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/RoleAssignmentsApi.java index 39d342d..3f86ec5 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/RoleAssignmentsApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/RoleAssignmentsApi.java @@ -7,8 +7,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.RoleAssignmentCreate; import com.microsoft.twins.model.RoleAssignmentRetrieve; import feign.Headers; @@ -16,7 +15,7 @@ import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface RoleAssignmentsApi extends TwinsApiClient.Api { +public interface RoleAssignmentsApi { /** * Checks permissions for a given path, user, domain, tenant id, accessType and resource type * diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/SensorsApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/SensorsApi.java similarity index 99% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/SensorsApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/SensorsApi.java index 72d1e6b..bb6e7e5 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/SensorsApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/SensorsApi.java @@ -7,8 +7,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.ExtendedPropertyCreate; import com.microsoft.twins.model.Location; import com.microsoft.twins.model.MatcherRetrieve; @@ -21,7 +20,7 @@ import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface SensorsApi extends TwinsApiClient.Api { +public interface SensorsApi { /** * Creates a sensor * diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/SpacesApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/SpacesApi.java similarity index 99% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/SpacesApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/SpacesApi.java index 259b72c..03e0943 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/SpacesApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/SpacesApi.java @@ -8,9 +8,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; import com.microsoft.twins.model.BlobMetadataRetrieve; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.ExtendedPropertyCreate; import com.microsoft.twins.model.KeyStoreRetrieve; import com.microsoft.twins.model.Location; @@ -26,7 +25,7 @@ import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface SpacesApi extends TwinsApiClient.Api { +public interface SpacesApi { /** * Creates a space * @@ -367,8 +366,8 @@ public interface SpacesApi extends TwinsApiClient.Api { */ @RequestLine("GET /api/v1.0/spaces?ids={ids}&name={name}&types={types}&subtypes={subtypes}&statuses={statuses}&useParentSpace={useParentSpace}&userUpn={userUpn}&sensorDataTypes={sensorDataTypes}&includes={includes}&propertyKey={propertyKey}&propertyValue={propertyValue}&propertyValueSearchType={propertyValueSearchType}&spaceId={spaceId}&traverse={traverse}&minLevel={minLevel}&maxLevel={maxLevel}&minRelative={minRelative}&maxRelative={maxRelative}") @Headers({"Accept: */*",}) - List spacesRetrieve(@Param("ids") UUID ids, - @Param("name") String name, @Param("types") String types, @Param("subtypes") String subtypes, + List spacesRetrieve(@Param("ids") UUID ids, @Param("name") String name, + @Param("types") String types, @Param("subtypes") String subtypes, @Param("statuses") String statuses, @Param("useParentSpace") Boolean useParentSpace, @Param("userUpn") String userUpn, @Param("sensorDataTypes") String sensorDataTypes, @Param("includes") String includes, @Param("propertyKey") String propertyKey, @@ -790,8 +789,7 @@ public interface SpacesApi extends TwinsApiClient.Api { */ @RequestLine("GET /api/v1.0/spaces/{id}/keystore?includes={includes}") @Headers({"Accept: */*",}) - KeyStoreRetrieve spacesRetrieveKeyStore(@Param("id") UUID id, - @Param("includes") String includes); + KeyStoreRetrieve spacesRetrieveKeyStore(@Param("id") UUID id, @Param("includes") String includes); /** * Gets the first keystore by walking up the spaces hierarchy diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/SystemApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/SystemApi.java similarity index 96% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/SystemApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/SystemApi.java index fda186c..82e75d3 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/SystemApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/SystemApi.java @@ -4,13 +4,12 @@ package com.microsoft.twins.api; import java.util.List; -import com.microsoft.twins.TwinsApiClient; import com.microsoft.twins.model.IEnumEntity; import com.microsoft.twins.model.RoleDefinitionRetrieve; import feign.Headers; import feign.RequestLine; -public interface SystemApi extends TwinsApiClient.Api { +public interface SystemApi { /** * Retrieve all supported device statuses * diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/TypesApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/TypesApi.java similarity index 98% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/TypesApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/TypesApi.java index 586c27b..d88c61d 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/TypesApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/TypesApi.java @@ -7,9 +7,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; import com.microsoft.twins.model.CategoryEnum; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.ExtendedTypeCreate; import com.microsoft.twins.model.ExtendedTypeRetrieve; import com.microsoft.twins.model.ExtendedTypeUpdate; @@ -18,7 +17,7 @@ import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface TypesApi extends TwinsApiClient.Api { +public interface TypesApi { /** * Creates an extended type * diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/UserDefinedFunctionsApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/UserDefinedFunctionsApi.java similarity index 95% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/UserDefinedFunctionsApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/UserDefinedFunctionsApi.java index dfa28d1..6b0777d 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/UserDefinedFunctionsApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/UserDefinedFunctionsApi.java @@ -8,15 +8,14 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.UserDefinedFunctionRetrieve; import feign.Headers; import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface UserDefinedFunctionsApi extends TwinsApiClient.Api { +public interface UserDefinedFunctionsApi { /** * Creates a udf This is a multi-part request. For more information, see doc examples. Key value * pairs specified in the Content-Disposition header in the udf-chunk of the multipart request @@ -72,10 +71,10 @@ public interface UserDefinedFunctionsApi extends TwinsApiClient.Api { @RequestLine("GET /api/v1.0/userdefinedfunctions?names={names}&ids={ids}&includes={includes}&spaceId={spaceId}&traverse={traverse}&minLevel={minLevel}&maxLevel={maxLevel}&minRelative={minRelative}&maxRelative={maxRelative}") @Headers({"Accept: */*",}) List userDefinedFunctionsRetrieve(@Param("names") String names, - @Param("ids") UUID ids, @Param("includes") String includes, - @Param("spaceId") String spaceId, @Param("traverse") String traverse, - @Param("minLevel") Integer minLevel, @Param("maxLevel") Integer maxLevel, - @Param("minRelative") Boolean minRelative, @Param("maxRelative") Boolean maxRelative); + @Param("ids") UUID ids, @Param("includes") String includes, @Param("spaceId") String spaceId, + @Param("traverse") String traverse, @Param("minLevel") Integer minLevel, + @Param("maxLevel") Integer maxLevel, @Param("minRelative") Boolean minRelative, + @Param("maxRelative") Boolean maxRelative); /** * Gets a list of udfs diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/UsersApi.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/UsersApi.java similarity index 99% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/UsersApi.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/UsersApi.java index a39c351..5743bf7 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/api/UsersApi.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/api/UsersApi.java @@ -8,9 +8,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; -import com.microsoft.twins.EncodingUtils; -import com.microsoft.twins.TwinsApiClient; import com.microsoft.twins.model.BlobMetadataRetrieve; +import com.microsoft.twins.model.EncodingUtils; import com.microsoft.twins.model.ExtendedPropertyCreate; import com.microsoft.twins.model.Location; import com.microsoft.twins.model.UserCreateWithSpace; @@ -21,7 +20,7 @@ import feign.Param; import feign.QueryMap; import feign.RequestLine; -public interface UsersApi extends TwinsApiClient.Api { +public interface UsersApi { /** * Creates a blob This is a multi-part request. For more information, see sample app or doc * examples. Key value pairs specified in the Content-Disposition header in the blob-chunk of the diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/event/model/TopologyOperationEvent.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/event/model/TopologyOperationEvent.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/event/model/TopologyOperationEvent.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/event/model/TopologyOperationEvent.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/AbstractRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/AbstractRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/AbstractRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/AbstractRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/BlobMetadataContentInfo.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/BlobMetadataContentInfo.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/BlobMetadataContentInfo.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/BlobMetadataContentInfo.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/BlobMetadataCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/BlobMetadataCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/BlobMetadataCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/BlobMetadataCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/BlobMetadataRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/BlobMetadataRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/BlobMetadataRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/BlobMetadataRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/BlobMetadataUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/BlobMetadataUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/BlobMetadataUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/BlobMetadataUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/CategoryEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/CategoryEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/CategoryEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/CategoryEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ComparisonEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ComparisonEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ComparisonEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ComparisonEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ConditionCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ConditionCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ConditionCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ConditionCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ConditionRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ConditionRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ConditionRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ConditionRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ConditionUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ConditionUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ConditionUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ConditionUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/DeviceCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/DeviceCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/DeviceCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/DeviceCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/DeviceRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/DeviceRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/DeviceRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/DeviceRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/DeviceUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/DeviceUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/DeviceUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/DeviceUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/EncodingUtils.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/EncodingUtils.java similarity index 96% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/EncodingUtils.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/EncodingUtils.java index ea1c14a..29d47ef 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/EncodingUtils.java +++ b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/EncodingUtils.java @@ -1,7 +1,7 @@ /** * Copyright (c) Microsoft Corporation. Licensed under the MIT License. */ -package com.microsoft.twins; +package com.microsoft.twins.model; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/EndpointCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/EndpointCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/EndpointCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/EndpointCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/EndpointRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/EndpointRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/EndpointRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/EndpointRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ErrorInformation.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ErrorInformation.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ErrorInformation.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ErrorInformation.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/EventTypesEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/EventTypesEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/EventTypesEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/EventTypesEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyFilters.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyFilters.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyFilters.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyFilters.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyKeyUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedPropertyRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedPropertyRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedTypeCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedTypeCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedTypeCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedTypeCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedTypeRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedTypeRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedTypeRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedTypeRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedTypeUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedTypeUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ExtendedTypeUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ExtendedTypeUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/FilterClause.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/FilterClause.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/FilterClause.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/FilterClause.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/FilterQueryOption.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/FilterQueryOption.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/FilterQueryOption.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/FilterQueryOption.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/FilterQueryValidator.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/FilterQueryValidator.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/FilterQueryValidator.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/FilterQueryValidator.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmDirectValueAnnotationsManager.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmDirectValueAnnotationsManager.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmDirectValueAnnotationsManager.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmDirectValueAnnotationsManager.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmModel.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmModel.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmModel.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmModel.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmSchemaElement.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmSchemaElement.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmSchemaElement.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmSchemaElement.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmTerm.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmTerm.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmTerm.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmTerm.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmType.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmType.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmType.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmType.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmTypeReference.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmTypeReference.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmTypeReference.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmTypeReference.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmVocabularyAnnotatable.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmVocabularyAnnotatable.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmVocabularyAnnotatable.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmVocabularyAnnotatable.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmVocabularyAnnotation.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmVocabularyAnnotation.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEdmVocabularyAnnotation.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEdmVocabularyAnnotation.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEnumEntity.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEnumEntity.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/IEnumEntity.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/IEnumEntity.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/InlineCountQueryOption.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/InlineCountQueryOption.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/InlineCountQueryOption.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/InlineCountQueryOption.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/KeyStoreCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/KeyStoreCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/KeyStoreCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/KeyStoreCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/KeyStoreRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/KeyStoreRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/KeyStoreRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/KeyStoreRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/KeyStoreUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/KeyStoreUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/KeyStoreUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/KeyStoreUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/Location.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/Location.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/Location.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/Location.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/MatcherCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/MatcherCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/MatcherCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/MatcherCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/MatcherEvaluationResults.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/MatcherEvaluationResults.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/MatcherEvaluationResults.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/MatcherEvaluationResults.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/MatcherRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/MatcherRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/MatcherRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/MatcherRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/MatcherUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/MatcherUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/MatcherUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/MatcherUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryContext.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryContext.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryContext.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryContext.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsDevice.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsDevice.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsDevice.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsDevice.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsDeviceBlobMetadata.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsDeviceBlobMetadata.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsDeviceBlobMetadata.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsDeviceBlobMetadata.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsExtendedPropertyKey.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsExtendedPropertyKey.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsExtendedPropertyKey.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsExtendedPropertyKey.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsExtendedType.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsExtendedType.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsExtendedType.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsExtendedType.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsKeyStore.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsKeyStore.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsKeyStore.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsKeyStore.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsMatcher.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsMatcher.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsMatcher.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsMatcher.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsOntology.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsOntology.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsOntology.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsOntology.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsRoleAssignmentRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsRoleAssignmentRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsRoleAssignmentRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsRoleAssignmentRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSensor.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSensor.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSensor.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSensor.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpace.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpace.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpace.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpace.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpaceBlobMetadata.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpaceBlobMetadata.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpaceBlobMetadata.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpaceBlobMetadata.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpaceResource.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpaceResource.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpaceResource.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsSpaceResource.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUser.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUser.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUser.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUser.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUserBlobMetadata.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUserBlobMetadata.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUserBlobMetadata.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUserBlobMetadata.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUserDefinedFunction.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUserDefinedFunction.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUserDefinedFunction.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryOptionsUserDefinedFunction.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryValidator.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryValidator.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataQueryValidator.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataQueryValidator.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataRawQueryOptions.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataRawQueryOptions.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ODataRawQueryOptions.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ODataRawQueryOptions.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ObjectIdTypeEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ObjectIdTypeEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ObjectIdTypeEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ObjectIdTypeEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OntologyRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OntologyRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OntologyRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OntologyRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OntologyUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OntologyUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OntologyUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OntologyUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OrderByClause.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OrderByClause.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OrderByClause.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OrderByClause.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OrderByNode.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OrderByNode.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OrderByNode.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OrderByNode.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OrderByQueryOption.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OrderByQueryOption.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OrderByQueryOption.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OrderByQueryOption.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OrderByQueryValidator.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OrderByQueryValidator.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/OrderByQueryValidator.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/OrderByQueryValidator.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/Permission.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/Permission.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/Permission.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/Permission.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/PrimitiveDataTypeEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/PrimitiveDataTypeEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/PrimitiveDataTypeEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/PrimitiveDataTypeEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/PropertiesAndTreeFiltersModel.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/PropertiesAndTreeFiltersModel.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/PropertiesAndTreeFiltersModel.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/PropertiesAndTreeFiltersModel.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/RangeVariable.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/RangeVariable.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/RangeVariable.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/RangeVariable.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/RegionEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/RegionEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/RegionEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/RegionEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/RoleAssignmentCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/RoleAssignmentCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/RoleAssignmentCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/RoleAssignmentCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/RoleAssignmentRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/RoleAssignmentRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/RoleAssignmentRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/RoleAssignmentRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/RoleDefinitionRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/RoleDefinitionRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/RoleDefinitionRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/RoleDefinitionRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ScopeEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ScopeEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/ScopeEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/ScopeEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SecurityKeyRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SecurityKeyRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SecurityKeyRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SecurityKeyRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SecurityKeyUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SecurityKeyUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SecurityKeyUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SecurityKeyUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SelectExpandClause.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SelectExpandClause.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SelectExpandClause.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SelectExpandClause.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SelectExpandQueryOption.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SelectExpandQueryOption.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SelectExpandQueryOption.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SelectExpandQueryOption.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SelectExpandQueryValidator.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SelectExpandQueryValidator.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SelectExpandQueryValidator.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SelectExpandQueryValidator.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SelectItem.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SelectItem.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SelectItem.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SelectItem.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorCreateNoParent.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorCreateNoParent.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorCreateNoParent.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorCreateNoParent.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorHistoryValue.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorHistoryValue.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorHistoryValue.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorHistoryValue.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorValue.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorValue.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SensorValue.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SensorValue.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SharingEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SharingEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SharingEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SharingEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SingleValueNode.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SingleValueNode.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SingleValueNode.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SingleValueNode.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SizeEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SizeEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SizeEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SizeEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SkipQueryOption.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SkipQueryOption.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SkipQueryOption.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SkipQueryOption.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SkipQueryValidator.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SkipQueryValidator.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SkipQueryValidator.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SkipQueryValidator.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceResourceCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceResourceCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceResourceCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceResourceCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceResourceRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceResourceRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceResourceRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceResourceRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceResourceUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceResourceUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceResourceUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceResourceUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceRetrieveWithChildren.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceRetrieveWithChildren.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceRetrieveWithChildren.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceRetrieveWithChildren.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceRetrieveWithProperties.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceRetrieveWithProperties.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceRetrieveWithProperties.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceRetrieveWithProperties.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceTypeEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceTypeEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceTypeEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceTypeEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/SpaceUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/SpaceUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/StatusEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/StatusEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/StatusEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/StatusEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TargetEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TargetEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TargetEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TargetEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TimeZone.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TimeZone.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TimeZone.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TimeZone.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TopQueryOption.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TopQueryOption.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TopQueryOption.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TopQueryOption.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TopQueryValidator.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TopQueryValidator.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TopQueryValidator.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TopQueryValidator.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TreeFilterModel.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TreeFilterModel.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TreeFilterModel.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TreeFilterModel.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TypeEnum.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TypeEnum.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/TypeEnum.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/TypeEnum.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserCreateWithSpace.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserCreateWithSpace.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserCreateWithSpace.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserCreateWithSpace.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserDefinedFunctionCreate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserDefinedFunctionCreate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserDefinedFunctionCreate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserDefinedFunctionCreate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserDefinedFunctionRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserDefinedFunctionRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserDefinedFunctionRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserDefinedFunctionRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserDefinedFunctionUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserDefinedFunctionUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserDefinedFunctionUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserDefinedFunctionUpdate.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserRetrieve.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserRetrieve.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserRetrieve.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserRetrieve.java diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserUpdate.java b/twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserUpdate.java similarity index 100% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/model/UserUpdate.java rename to twin-management-client/twin-management-client-api/src/main/java/com/microsoft/twins/model/UserUpdate.java diff --git a/twin-management-client/twin-management-client-autoconfigure/src/main/java/com/microsoft/twins/spring/configuration/DigitalTwinClientAutoConfiguration.java b/twin-management-client/twin-management-client-autoconfigure/src/main/java/com/microsoft/twins/spring/configuration/DigitalTwinClientAutoConfiguration.java index 681338c..41c11df 100644 --- a/twin-management-client/twin-management-client-autoconfigure/src/main/java/com/microsoft/twins/spring/configuration/DigitalTwinClientAutoConfiguration.java +++ b/twin-management-client/twin-management-client-autoconfigure/src/main/java/com/microsoft/twins/spring/configuration/DigitalTwinClientAutoConfiguration.java @@ -9,7 +9,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; -import com.microsoft.twins.TwinsApiClient; import com.microsoft.twins.api.DevicesApi; import com.microsoft.twins.api.EndpointsApi; import com.microsoft.twins.api.KeyStoresApi; @@ -24,6 +23,7 @@ import com.microsoft.twins.api.SystemApi; import com.microsoft.twins.api.TypesApi; import com.microsoft.twins.api.UserDefinedFunctionsApi; import com.microsoft.twins.api.UsersApi; +import com.microsoft.twins.client.TwinsApiClient; @Configuration @EnableConfigurationProperties(DigitalTwinsClientProperties.class) diff --git a/twin-management-client/twin-management-client-core/pom.xml b/twin-management-client/twin-management-client-core/pom.xml index ffd53fa..e5086b8 100644 --- a/twin-management-client/twin-management-client-core/pom.xml +++ b/twin-management-client/twin-management-client-core/pom.xml @@ -16,16 +16,14 @@ Twin Management Client :: Implementation - + + com.microsoft.twins + twin-management-client-api + ${project.version} + + + - - io.github.openfeign - feign-core - - - io.github.openfeign - feign-jackson - io.github.openfeign feign-slf4j @@ -62,10 +60,6 @@ com.fasterxml.jackson.datatype jackson-datatype-jsr310 - - javax.validation - validation-api - commons-io diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/AadRequestInterceptor.java b/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/AadRequestInterceptor.java similarity index 99% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/AadRequestInterceptor.java rename to twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/AadRequestInterceptor.java index 4c2c803..653dbba 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/AadRequestInterceptor.java +++ b/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/AadRequestInterceptor.java @@ -1,7 +1,7 @@ /** * Copyright (c) Microsoft Corporation. Licensed under the MIT License. */ -package com.microsoft.twins; +package com.microsoft.twins.client; import java.net.MalformedURLException; import java.time.Duration; diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/CorrelationIdContext.java b/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/CorrelationIdContext.java similarity index 93% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/CorrelationIdContext.java rename to twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/CorrelationIdContext.java index bd2cfe5..6961dc2 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/CorrelationIdContext.java +++ b/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/CorrelationIdContext.java @@ -1,7 +1,7 @@ /** * Copyright (c) Microsoft Corporation. Licensed under the MIT License. */ -package com.microsoft.twins; +package com.microsoft.twins.client; import java.util.UUID; diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/CorrelationIdRequestInterceptor.java b/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/CorrelationIdRequestInterceptor.java similarity index 92% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/CorrelationIdRequestInterceptor.java rename to twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/CorrelationIdRequestInterceptor.java index 0c3076a..00839ed 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/CorrelationIdRequestInterceptor.java +++ b/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/CorrelationIdRequestInterceptor.java @@ -1,7 +1,7 @@ /** * Copyright (c) Microsoft Corporation. Licensed under the MIT License. */ -package com.microsoft.twins; +package com.microsoft.twins.client; import feign.RequestInterceptor; import feign.RequestTemplate; diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/TwinsApiClient.java b/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/TwinsApiClient.java similarity index 81% rename from twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/TwinsApiClient.java rename to twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/TwinsApiClient.java index ed14495..5e2cdee 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/TwinsApiClient.java +++ b/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/client/TwinsApiClient.java @@ -1,7 +1,7 @@ /** * Copyright (c) Microsoft Corporation. Licensed under the MIT License. */ -package com.microsoft.twins; +package com.microsoft.twins.client; import java.lang.reflect.Type; import java.text.SimpleDateFormat; @@ -38,9 +38,6 @@ import feign.jackson.JacksonEncoder; import feign.slf4j.Slf4jLogger; public class TwinsApiClient { - public interface Api { - } - protected ObjectMapper objectMapper; private final String twinsUrl; private Feign.Builder feignBuilder; @@ -105,73 +102,59 @@ public class TwinsApiClient { } public DevicesApi getDevicesApi() { - return buildClient(DevicesApi.class); + return feignBuilder.target(DevicesApi.class, twinsUrl); } public EndpointsApi getEndpointsApi() { - return buildClient(EndpointsApi.class); + return feignBuilder.target(EndpointsApi.class, twinsUrl); } public KeyStoresApi getKeyStoresApi() { - return buildClient(KeyStoresApi.class); + return feignBuilder.target(KeyStoresApi.class, twinsUrl); } public MatchersApi getMatchersApi() { - return buildClient(MatchersApi.class); + return feignBuilder.target(MatchersApi.class, twinsUrl); } public OntologiesApi getOntologiesApi() { - return buildClient(OntologiesApi.class); + return feignBuilder.target(OntologiesApi.class, twinsUrl); } public PropertyKeysApi getPropertyKeysApi() { - return buildClient(PropertyKeysApi.class); + return feignBuilder.target(PropertyKeysApi.class, twinsUrl); } public ResourcesApi getResourcesApi() { - return buildClient(ResourcesApi.class); + return feignBuilder.target(ResourcesApi.class, twinsUrl); } public RoleAssignmentsApi getRoleAssignmentsApi() { - return buildClient(RoleAssignmentsApi.class); + return feignBuilder.target(RoleAssignmentsApi.class, twinsUrl); } public SensorsApi getSensorsApi() { - return buildClient(SensorsApi.class); + return feignBuilder.target(SensorsApi.class, twinsUrl); } public SpacesApi getSpacesApi() { - return buildClient(SpacesApi.class); + return feignBuilder.target(SpacesApi.class, twinsUrl); } public SystemApi getSystemApi() { - return buildClient(SystemApi.class); + return feignBuilder.target(SystemApi.class, twinsUrl); } public TypesApi getTypesApi() { - return buildClient(TypesApi.class); + return feignBuilder.target(TypesApi.class, twinsUrl); } public UserDefinedFunctionsApi getUserDefinedFunctionsApi() { - return buildClient(UserDefinedFunctionsApi.class); + return feignBuilder.target(UserDefinedFunctionsApi.class, twinsUrl); } public UsersApi getUsersApi() { - return buildClient(UsersApi.class); - } - - /** - * Creates a feign client for given API interface. - * - * Usage: ApiClient apiClient = new ApiClient(); apiClient.setBasePath("http://localhost:8080"); - * XYZApi api = apiClient.buildClient(XYZApi.class); XYZResponse response = api.someMethod(...); - * - * @param Type - * @param clientClass Client class - * @return The Client - */ - private T buildClient(final Class clientClass) { - return feignBuilder.target(clientClass, twinsUrl); + return feignBuilder.target(UsersApi.class, twinsUrl); } private static class JacksonEncoderWithContentType extends JacksonEncoder { diff --git a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/error/RetryOnStatusHandler.java b/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/error/RetryOnStatusHandler.java index dde9ff1..9cc0b3c 100644 --- a/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/error/RetryOnStatusHandler.java +++ b/twin-management-client/twin-management-client-core/src/main/java/com/microsoft/twins/error/RetryOnStatusHandler.java @@ -31,18 +31,22 @@ public class RetryOnStatusHandler extends ErrorDecoder.Default { return new RetryableException(response.status(), "to many request: retry in a second", response.request().httpMethod(), cal.getTime()); case 400: - if (response.body() != null) { - try (InputStream message = response.body().asInputStream()) { - log.error("Client error. Response with Body: [{}]", - IOUtils.toString(message, Charset.defaultCharset())); - } catch (final IOException e) { - log.error("Could not print Client error body", e); - } - } + logResponseBody(response); return super.decode(methodKey, response); default: return super.decode(methodKey, response); } } + private static void logResponseBody(final Response response) { + if (response.body() != null) { + try (InputStream message = response.body().asInputStream()) { + log.error("Client error. Response with Body: [{}]", + IOUtils.toString(message, Charset.defaultCharset())); + } catch (final IOException e) { + log.error("Could not print Client error body", e); + } + } + } + } diff --git a/twin-management-client/twin-management-client-core/src/test/java/com/microsoft/twins/api/AbstractApiTest.java b/twin-management-client/twin-management-client-core/src/test/java/com/microsoft/twins/api/AbstractApiTest.java index 76a1168..35b8ca2 100644 --- a/twin-management-client/twin-management-client-core/src/test/java/com/microsoft/twins/api/AbstractApiTest.java +++ b/twin-management-client/twin-management-client-core/src/test/java/com/microsoft/twins/api/AbstractApiTest.java @@ -3,7 +3,7 @@ */ package com.microsoft.twins.api; -import com.microsoft.twins.TwinsApiClient; +import com.microsoft.twins.client.TwinsApiClient; public abstract class AbstractApiTest { diff --git a/twin-management-client/twin-management-client-core/src/test/java/com/microsoft/twins/api/error/FeignErrorHandlingTest.java b/twin-management-client/twin-management-client-core/src/test/java/com/microsoft/twins/api/error/FeignErrorHandlingTest.java index a71acd9..494c7aa 100644 --- a/twin-management-client/twin-management-client-core/src/test/java/com/microsoft/twins/api/error/FeignErrorHandlingTest.java +++ b/twin-management-client/twin-management-client-core/src/test/java/com/microsoft/twins/api/error/FeignErrorHandlingTest.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import com.microsoft.twins.TwinsApiClient; import com.microsoft.twins.api.DevicesApi; +import com.microsoft.twins.client.TwinsApiClient; import feign.Client; import feign.Request; import feign.Request.HttpMethod; diff --git a/twin-reflector-proxy/README.md b/twin-reflector-proxy/README.md index df87464..05f8d22 100644 --- a/twin-reflector-proxy/README.md +++ b/twin-reflector-proxy/README.md @@ -1,18 +1,22 @@ # Twin Reflector Proxy -This module aims to provide a dispatcher application that consumes Azure Event Hub event streams which contain topology changes and/or telemetry ingress. The goal is to provide cloud ingress point that serves as a bride between arbitrary IoT protocol gateways and Azure Digital Twins. +This module aims to provide a dispatcher application that consumes [Azure Event Hubs](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-about) message streams with topology changes and/or telemetry ingress. The goal is to provide cloud ingress point that serves as a bride between arbitrary IoT protocol gateways and [Azure Digital Twins (ADT)](https://docs.microsoft.com/en-us/azure/digital-twins/about-digital-twins). Disclaimer: the module is still work in progress and implementation pieces at this point have a PoC character at best. ## Overview -Twin instances (Create or update) are provided as event including properties, attributes and relationships. The events are processed from Azure Event Hub and mapped into several ADT RESTful management API calls. +Twin instances (create or update) are provided as message including properties, attributes and relationships. The messages are processed from Azure Event Hubs and mapped into (multiple) ADT RESTful management API calls. + +The proxy supports the concept of a lazy topology build by means that it will not assume that every topology element nows at creation time where it is located in the overall topology. It does so by attaching the element temporarily directly to the tenant until the final position is known. + +Azure Digital Twin entity caching is included as well to reduce ADT calls for better performance and lower cost. ![twin-reflector_building-block-view](overview.png) ## Deployment -see [deployment](deployment/azure) folder for further guidance on how to install the Twin Reflector Proxy on Microsoft Azure. +see [deployment](deployment/azure) folder for further guidance on how to install the proxy on Microsoft Azure. ## Modules diff --git a/twin-reflector-proxy/deployment/azure/arm/templates/kubernetesDeploy.json b/twin-reflector-proxy/deployment/azure/arm/templates/kubernetesDeploy.json index 34aed31..08225ed 100644 --- a/twin-reflector-proxy/deployment/azure/arm/templates/kubernetesDeploy.json +++ b/twin-reflector-proxy/deployment/azure/arm/templates/kubernetesDeploy.json @@ -11,7 +11,7 @@ }, "clusterName": { "type": "string", - "defaultValue": "dittoakscluster", + "defaultValue": "proxyakscluster", "metadata": { "description": "The name of the Managed Cluster resource." } @@ -150,7 +150,7 @@ "publicIPAddressName": { "type": "string", "metadata": { - "description": "Public IP address name that will be used by Ditto service." + "description": "Public IP address name that will be used by proxy service." } }, "serviceCidr": { diff --git a/twin-reflector-proxy/deployment/azure/arm/templates/vnetDeploy.json b/twin-reflector-proxy/deployment/azure/arm/templates/vnetDeploy.json index f612df4..fab95a9 100644 --- a/twin-reflector-proxy/deployment/azure/arm/templates/vnetDeploy.json +++ b/twin-reflector-proxy/deployment/azure/arm/templates/vnetDeploy.json @@ -4,30 +4,30 @@ "parameters": { "vnetName": { "type": "string", - "defaultValue": "DittoVNet", + "defaultValue": "proxyVNet", "metadata": { - "description": "Ditto VNet name" + "description": "proxy VNet name" } }, "vnetAddressPrefix": { "type": "string", "defaultValue": "10.0.0.0/8", "metadata": { - "description": "Ditto Address Prefix" + "description": "proxy Address Prefix" } }, "aksSubnetPrefix": { "type": "string", "defaultValue": "10.240.0.0/16", "metadata": { - "description": "Ditto AKS Subnet Prefix" + "description": "proxy AKS Subnet Prefix" } }, "aksSubnetName": { "type": "string", "defaultValue": "AksSubnet", "metadata": { - "description": "Ditto AKS Subnet Name" + "description": "proxy AKS Subnet Name" } }, "location": { diff --git a/twin-reflector-proxy/twin-reflector-proxy-api/pom.xml b/twin-reflector-proxy/twin-reflector-proxy-api/pom.xml index ed59b6f..9e91f50 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-api/pom.xml +++ b/twin-reflector-proxy/twin-reflector-proxy-api/pom.xml @@ -15,7 +15,7 @@ twin-reflector-proxy-api Twin Reflector Proxy :: Api - + com.fasterxml.jackson.core jackson-annotations diff --git a/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/FeedbackMessage.java b/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/FeedbackMessage.java index 59bc212..3475d29 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/FeedbackMessage.java +++ b/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/FeedbackMessage.java @@ -14,6 +14,11 @@ import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; +/** + * Message send out by the proxy as feedback or asynchronous response after an + * {@link IngressMessage} has been processed. + * + */ @ToString @EqualsAndHashCode @Getter diff --git a/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/IngressMessage.java b/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/IngressMessage.java index e184a64..66b92cf 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/IngressMessage.java +++ b/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/IngressMessage.java @@ -17,6 +17,11 @@ import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; +/** + * Ingress message that may contains topology changes as well telemetry data. Contains mandatory as + * well as optional fields. Message are of a defined {@link MessageType}. + * + */ @ToString @EqualsAndHashCode @Getter diff --git a/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/MessageType.java b/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/MessageType.java index 7e32b9f..ab18a74 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/MessageType.java +++ b/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/MessageType.java @@ -5,8 +5,28 @@ package com.microsoft.twins.reflector.model; import com.fasterxml.jackson.annotation.JsonCreator; +/** + * type of the {@link IngressMessage} provides as header field. + * + */ public enum MessageType { - FULL, PARTIAL, DELETE; + + /** + * Full update, all attributes or properties that are not part of the {@link IngressMessage} are + * deleted. + */ + FULL, + + /** + * Partial update. Attributes or properties that are not already part of the topology are added, + * others updated. + */ + PARTIAL, + + /** + * Topology element delete. + */ + DELETE; @JsonCreator public static MessageType fromString(final String key) { diff --git a/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/Property.java b/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/Property.java index 132b41c..2e5fec3 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/Property.java +++ b/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/Property.java @@ -14,6 +14,10 @@ import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; +/** + * ADT properties. The name field is the ExtendedPropertyKey. + * + */ @ToString @EqualsAndHashCode @Getter diff --git a/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/Relationship.java b/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/Relationship.java index 068224f..1295a37 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/Relationship.java +++ b/twin-reflector-proxy/twin-reflector-proxy-api/src/main/java/com/microsoft/twins/reflector/model/Relationship.java @@ -12,6 +12,10 @@ import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; +/** + * Relationships to other ADT topology elements. + * + */ @ToString @EqualsAndHashCode @Getter diff --git a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/AadHealthIndicator.java b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/AadHealthIndicator.java index a0d9277..e883ec2 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/AadHealthIndicator.java +++ b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/AadHealthIndicator.java @@ -6,8 +6,8 @@ package com.microsoft.twins.reflector; import java.util.Optional; import org.springframework.boot.actuate.health.AbstractHealthIndicator; import org.springframework.boot.actuate.health.Health.Builder; +import com.microsoft.twins.client.TwinsApiClient; import org.springframework.boot.actuate.health.HealthIndicator; -import com.microsoft.twins.TwinsApiClient; import lombok.RequiredArgsConstructor; diff --git a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/TwinReflectorProxyAutoConfiguration.java b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/TwinReflectorProxyAutoConfiguration.java index d91699d..9f57f25 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/TwinReflectorProxyAutoConfiguration.java +++ b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/TwinReflectorProxyAutoConfiguration.java @@ -12,13 +12,13 @@ import org.springframework.cloud.stream.annotation.EnableBinding; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; -import com.microsoft.twins.TwinsApiClient; import com.microsoft.twins.api.DevicesApi; import com.microsoft.twins.api.EndpointsApi; import com.microsoft.twins.api.PropertyKeysApi; import com.microsoft.twins.api.SensorsApi; import com.microsoft.twins.api.SpacesApi; import com.microsoft.twins.api.TypesApi; +import com.microsoft.twins.client.TwinsApiClient; import com.microsoft.twins.reflector.ingress.IngressMessageListener; import com.microsoft.twins.reflector.ingress.ReflectorIngressSink; import com.microsoft.twins.reflector.proxy.DigitalTwinMetadataProxy; diff --git a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/TwinsHealthIndicator.java b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/TwinsHealthIndicator.java index 5bae0fd..570d27c 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/TwinsHealthIndicator.java +++ b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/TwinsHealthIndicator.java @@ -8,7 +8,7 @@ import org.springframework.boot.actuate.health.AbstractHealthIndicator; import org.springframework.boot.actuate.health.Health.Builder; import org.springframework.boot.actuate.health.HealthIndicator; import org.springframework.util.CollectionUtils; -import com.microsoft.twins.TwinsApiClient; +import com.microsoft.twins.client.TwinsApiClient; import com.microsoft.twins.model.RoleDefinitionRetrieve; import lombok.RequiredArgsConstructor; diff --git a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/ingress/IngressMessageListener.java b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/ingress/IngressMessageListener.java index cca5702..a3e0f70 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/ingress/IngressMessageListener.java +++ b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/ingress/IngressMessageListener.java @@ -19,7 +19,7 @@ import org.springframework.messaging.support.ErrorMessage; import org.springframework.validation.annotation.Validated; import com.microsoft.applicationinsights.TelemetryClient; import com.microsoft.applicationinsights.core.dependencies.google.common.collect.Maps; -import com.microsoft.twins.CorrelationIdContext; +import com.microsoft.twins.client.CorrelationIdContext; import com.microsoft.twins.reflector.TwinReflectorProxyProperties; import com.microsoft.twins.reflector.TwinReflectorProxyProperties.Feedback; import com.microsoft.twins.reflector.error.AbstractIngressFailedException; diff --git a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/DigitalTwinMetadataProxy.java b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/DigitalTwinMetadataProxy.java index 70732ca..9a96cc3 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/DigitalTwinMetadataProxy.java +++ b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/DigitalTwinMetadataProxy.java @@ -6,6 +6,7 @@ package com.microsoft.twins.reflector.proxy; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import com.microsoft.twins.model.CategoryEnum; +import com.microsoft.twins.model.ScopeEnum; /** * Proxy service for twin metadata, e.g. types and property keys. @@ -13,27 +14,41 @@ import com.microsoft.twins.model.CategoryEnum; */ public interface DigitalTwinMetadataProxy { - String getPropertykey(@NotEmpty String name, @NotEmpty String scope); + /** + * Retrieve property key if it exists or create otherwise. + * + * @param name of the property key + * @param scope of the property + * @return property key. + */ + String getOrCreatePropertykey(@NotEmpty String name, @NotNull ScopeEnum scope); default int getDeviceType(@NotEmpty final String name) { - return getType(name, CategoryEnum.DEVICETYPE); + return getOrCreateType(name, CategoryEnum.DEVICETYPE); } default int getDeviceSubType(@NotEmpty final String name) { - return getType(name, CategoryEnum.DEVICESUBTYPE); + return getOrCreateType(name, CategoryEnum.DEVICESUBTYPE); } default int getSpaceType(@NotEmpty final String name) { - return getType(name, CategoryEnum.SPACETYPE); + return getOrCreateType(name, CategoryEnum.SPACETYPE); } default int getSpaceSubType(@NotEmpty final String name) { - return getType(name, CategoryEnum.SPACESUBTYPE); + return getOrCreateType(name, CategoryEnum.SPACESUBTYPE); } default int getSpaceStatus(@NotEmpty final String name) { - return getType(name, CategoryEnum.SPACESTATUS); + return getOrCreateType(name, CategoryEnum.SPACESTATUS); } - int getType(@NotEmpty String name, @NotNull CategoryEnum category); + /** + * Retrieve topology element type if it exists or create otherwise. + * + * @param name of the type + * @param category of the type + * @return ID of the type + */ + int getOrCreateType(@NotEmpty String name, @NotNull CategoryEnum category); } diff --git a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/DigitalTwinTopologyProxy.java b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/DigitalTwinTopologyProxy.java index 0a95e08..1575804 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/DigitalTwinTopologyProxy.java +++ b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/DigitalTwinTopologyProxy.java @@ -12,6 +12,7 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import com.microsoft.twins.model.DeviceRetrieve; import com.microsoft.twins.model.SpaceRetrieve; +import com.microsoft.twins.reflector.model.MessageType; import com.microsoft.twins.reflector.model.Property; @@ -21,12 +22,46 @@ import com.microsoft.twins.reflector.model.Property; */ public interface DigitalTwinTopologyProxy { + /** + * Creates a new device topology element in ADT. + * + * @param name of the device + * @param parent of the device, e.g. space. + * @param gateway of the device for Azure IoT Hub operations. + * @param properties of the device + * @param attributes of the device + * @return the ID of the created device. + */ UUID createDevice(@NotEmpty String name, @NotNull UUID parent, @NotNull UUID gateway, Collection properties, Map attributes); + /** + * Updates device complete, i.e. all properties or attributes not provided by the caller are + * removed from the device. + * + * @param id of the device + * @param parent of the device, e.g. space. + * @param gateway of the device for Azure IoT Hub operations. + * @param properties of the device + * @param attributes of the device + * + * @see MessageType#FULL + */ void updateDeviceComplete(@NotNull UUID id, @NotNull UUID parent, @NotNull UUID gateway, Collection properties, Map attributes); + /** + * Updates device partial, i.e. all properties or attributes not provided by the caller are kept + * on the device and only the provided ones are set. + * + * @param id of the device + * @param parent of the device, e.g. space. + * @param gateway of the device for Azure IoT Hub operations. + * @param properties of the device + * @param attributes of the device + * + * @see MessageType#PARTIAL + */ void updateDevicePartial(@NotNull UUID id, UUID parent, UUID gateway, Collection properties, Map attributes); @@ -34,12 +69,44 @@ public interface DigitalTwinTopologyProxy { updateDevicePartial(id, parent, null, null, null); } + /** + * Creates a new space topology element in ADT. + * + * @param name of the device + * @param parent of the device, e.g. space. + * @param properties of the device + * @param attributes of the device + * + * @return the ID of the created space. + */ UUID createSpace(@NotEmpty String name, @NotNull UUID parent, Collection properties, Map attributes); + /** + * Updates space complete, i.e. all properties or attributes not provided by the caller are + * removed from the space. + * + * @param id of the device + * @param parent of the device, e.g. space. + * @param properties of the device + * @param attributes of the device + * + * @see MessageType#FULL + */ void updateSpaceComplete(@NotNull UUID id, @NotNull UUID parent, Collection properties, Map attributes); + /** + * Updates space partial, i.e. all properties or attributes not provided by the caller are kept on + * the space and only the provided ones are set. + * + * @param id of the device + * @param parent of the device, e.g. space. + * @param properties of the device + * @param attributes of the device + * + * @see MessageType#PARTIAL + */ void updateSpacePartial(@NotNull UUID id, UUID parent, Collection properties, Map attributes); diff --git a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/v1/Cachedv1DigitalTwinMetadataProxy.java b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/v1/Cachedv1DigitalTwinMetadataProxy.java index b903085..f6459cc 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/v1/Cachedv1DigitalTwinMetadataProxy.java +++ b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/v1/Cachedv1DigitalTwinMetadataProxy.java @@ -41,7 +41,7 @@ public class Cachedv1DigitalTwinMetadataProxy implements DigitalTwinMetadataProx @Override @Cacheable(CACHE_PROPERTY_KEY_BY_NAME_AND_SCOPE) - public String getPropertykey(final String name, final String scope) { + public String getOrCreatePropertykey(final String name, final ScopeEnum scope) { final Optional found = propertyKeysApi .propertyKeysRetrieve(new PropertyKeysApi.PropertyKeysRetrieveQueryParams() .spaceId(tenantResolver.getTenant()).scope(scope)) @@ -51,7 +51,7 @@ public class Cachedv1DigitalTwinMetadataProxy implements DigitalTwinMetadataProx log.debug("PropertyKey [{}] in scope [{}] not found. I will create one", name, scope); propertyKeysApi.propertyKeysCreate( new ExtendedPropertyKeyCreate().name(name).spaceId(tenantResolver.getTenant()) - .scope(ScopeEnum.fromValue(scope)).primitiveDataType(PrimitiveDataTypeEnum.STRING)); + .scope(scope).primitiveDataType(PrimitiveDataTypeEnum.STRING)); } return name; @@ -60,7 +60,7 @@ public class Cachedv1DigitalTwinMetadataProxy implements DigitalTwinMetadataProx @Override @Cacheable(CACHE_TYPE_BY_NAME_AND_CATEGORY) - public int getType(final String name, final CategoryEnum category) { + public int getOrCreateType(final String name, final CategoryEnum category) { final List found = typesApi.typesRetrieve(new TypesRetrieveQueryParams().spaceId(tenantResolver.getTenant()) .names(WHITE_SPACE.matcher(name).replaceAll("")).categories(category)); diff --git a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/v1/Cachedv1DigitalTwinTopologyProxy.java b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/v1/Cachedv1DigitalTwinTopologyProxy.java index ac83840..7466dfb 100644 --- a/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/v1/Cachedv1DigitalTwinTopologyProxy.java +++ b/twin-reflector-proxy/twin-reflector-proxy-core/src/main/java/com/microsoft/twins/reflector/proxy/v1/Cachedv1DigitalTwinTopologyProxy.java @@ -18,17 +18,18 @@ import org.springframework.cache.annotation.Caching; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import org.springframework.validation.annotation.Validated; -import com.microsoft.twins.CorrelationIdContext; import com.microsoft.twins.api.DevicesApi; import com.microsoft.twins.api.DevicesApi.DevicesRetrieveQueryParams; import com.microsoft.twins.api.SensorsApi; import com.microsoft.twins.api.SpacesApi; import com.microsoft.twins.api.SpacesApi.SpacesRetrieveQueryParams; +import com.microsoft.twins.client.CorrelationIdContext; import com.microsoft.twins.model.DeviceCreate; import com.microsoft.twins.model.DeviceRetrieve; import com.microsoft.twins.model.DeviceUpdate; import com.microsoft.twins.model.DeviceUpdate.StatusEnum; import com.microsoft.twins.model.ExtendedPropertyCreate; +import com.microsoft.twins.model.ScopeEnum; import com.microsoft.twins.model.SensorRetrieve; import com.microsoft.twins.model.SpaceCreate; import com.microsoft.twins.model.SpaceRetrieve; @@ -53,8 +54,6 @@ public class Cachedv1DigitalTwinTopologyProxy implements DigitalTwinTopologyProx private static final String UNKOWN_TYPE = "None"; private static final String UNKOWN_SPACE_STATUS = "None"; - private static final String ENTITY_TYPE_SPACE = "spaces"; - private static final String ENTITY_TYPE_DEVICE = "devices"; private final DigitalTwinMetadataProxy metadataProxy; @@ -76,7 +75,7 @@ public class Cachedv1DigitalTwinTopologyProxy implements DigitalTwinTopologyProx if (!CollectionUtils.isEmpty(properties)) { properties.stream() .map(p -> new ExtendedPropertyCreate() - .name(metadataProxy.getPropertykey(p.getName(), ENTITY_TYPE_DEVICE)) + .name(metadataProxy.getOrCreatePropertykey(p.getName(), ScopeEnum.DEVICES)) .value(p.getValue())) .forEach(device::addPropertiesItem); } @@ -99,7 +98,7 @@ public class Cachedv1DigitalTwinTopologyProxy implements DigitalTwinTopologyProx if (!CollectionUtils.isEmpty(properties)) { devicesApi.devicesUpdateProperties(properties.stream() .map(p -> new ExtendedPropertyCreate() - .name(metadataProxy.getPropertykey(p.getName(), ENTITY_TYPE_DEVICE)) + .name(metadataProxy.getOrCreatePropertykey(p.getName(), ScopeEnum.DEVICES)) .value(p.getValue())) .collect(Collectors.toList()), id); } @@ -174,7 +173,7 @@ public class Cachedv1DigitalTwinTopologyProxy implements DigitalTwinTopologyProx if (!CollectionUtils.isEmpty(properties)) { devicesApi.devicesUpdateProperties(properties.stream() .map(p -> new ExtendedPropertyCreate() - .name(metadataProxy.getPropertykey(p.getName(), ENTITY_TYPE_DEVICE)) + .name(metadataProxy.getOrCreatePropertykey(p.getName(), ScopeEnum.DEVICES)) .value(p.getValue())) .collect(Collectors.toList()), id); } @@ -200,7 +199,7 @@ public class Cachedv1DigitalTwinTopologyProxy implements DigitalTwinTopologyProx if (!CollectionUtils.isEmpty(properties)) { properties.stream() .map(p -> new ExtendedPropertyCreate() - .name(metadataProxy.getPropertykey(p.getName(), ENTITY_TYPE_SPACE)) + .name(metadataProxy.getOrCreatePropertykey(p.getName(), ScopeEnum.SPACES)) .value(p.getValue())) .forEach(space::addPropertiesItem); } @@ -224,7 +223,7 @@ public class Cachedv1DigitalTwinTopologyProxy implements DigitalTwinTopologyProx if (!CollectionUtils.isEmpty(properties)) { spacesApi.spacesUpdateProperties(properties.stream() .map(p -> new ExtendedPropertyCreate() - .name(metadataProxy.getPropertykey(p.getName(), ENTITY_TYPE_SPACE)) + .name(metadataProxy.getOrCreatePropertykey(p.getName(), ScopeEnum.SPACES)) .value(p.getValue())) .collect(Collectors.toList()), id); } @@ -248,7 +247,7 @@ public class Cachedv1DigitalTwinTopologyProxy implements DigitalTwinTopologyProx if (!CollectionUtils.isEmpty(properties)) { spacesApi.spacesUpdateProperties(properties.stream() .map(p -> new ExtendedPropertyCreate() - .name(metadataProxy.getPropertykey(p.getName(), ENTITY_TYPE_SPACE)) + .name(metadataProxy.getOrCreatePropertykey(p.getName(), ScopeEnum.SPACES)) .value(p.getValue())) .collect(Collectors.toList()), id); } diff --git a/twin-samples/twin-consume-events-sample/src/main/java/com/microsoft/twins/eventssample/MessageConsumer.java b/twin-samples/twin-consume-events-sample/src/main/java/com/microsoft/twins/eventssample/MessageConsumer.java index 06a53d4..2393acd 100644 --- a/twin-samples/twin-consume-events-sample/src/main/java/com/microsoft/twins/eventssample/MessageConsumer.java +++ b/twin-samples/twin-consume-events-sample/src/main/java/com/microsoft/twins/eventssample/MessageConsumer.java @@ -10,10 +10,10 @@ import org.slf4j.LoggerFactory; import org.springframework.jms.annotation.JmsListener; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import com.microsoft.twins.TwinsApiClient; import com.microsoft.twins.api.DevicesApi.DevicesRetrieveQueryParams; import com.microsoft.twins.api.SpacesApi; import com.microsoft.twins.api.SpacesApi.SpacesRetrieveQueryParams; +import com.microsoft.twins.client.TwinsApiClient; import com.microsoft.twins.event.model.TopologyOperationEvent; import com.microsoft.twins.model.DeviceRetrieve; import com.microsoft.twins.model.SpaceRetrieveWithChildren; diff --git a/twin-samples/twin-management-client-sample/src/main/java/com/microsoft/twins/sample/SimulateFactoryCommandLineRunner.java b/twin-samples/twin-management-client-sample/src/main/java/com/microsoft/twins/sample/SimulateFactoryCommandLineRunner.java index 044c054..d895265 100644 --- a/twin-samples/twin-management-client-sample/src/main/java/com/microsoft/twins/sample/SimulateFactoryCommandLineRunner.java +++ b/twin-samples/twin-management-client-sample/src/main/java/com/microsoft/twins/sample/SimulateFactoryCommandLineRunner.java @@ -12,12 +12,12 @@ import org.apache.commons.lang3.RandomStringUtils; import org.springframework.boot.CommandLineRunner; import org.springframework.stereotype.Component; import com.google.common.collect.Lists; -import com.microsoft.twins.TwinsApiClient; import com.microsoft.twins.api.DevicesApi; import com.microsoft.twins.api.DevicesApi.DevicesRetrieveQueryParams; import com.microsoft.twins.api.ResourcesApi; import com.microsoft.twins.api.SpacesApi; import com.microsoft.twins.api.SpacesApi.SpacesRetrieveQueryParams; +import com.microsoft.twins.client.TwinsApiClient; import com.microsoft.twins.api.TypesApi; import com.microsoft.twins.model.CategoryEnum; import com.microsoft.twins.model.DeviceCreate;