{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/comments/223858773","pull_request_review_id":163090999,"id":223858773,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzg1ODc3Mw==","diff_hunk":"@@ -0,0 +1,310 @@\n+// Copyright (c) Microsoft. All rights reserved.\n+\n+package com.microsoft.azure.iotsolutions.iothubmanager.services;\n+\n+import com.fasterxml.jackson.databind.JsonNode;\n+import com.fasterxml.jackson.databind.node.ObjectNode;\n+import com.google.inject.Inject;\n+import com.microsoft.azure.iotsolutions.iothubmanager.services.exceptions.ExternalDependencyException;\n+import com.microsoft.azure.iotsolutions.iothubmanager.services.exceptions.InvalidInputException;\n+import com.microsoft.azure.iotsolutions.iothubmanager.services.exceptions.ResourceNotFoundException;\n+import com.microsoft.azure.iotsolutions.iothubmanager.services.helpers.QueryConditionTranslator;\n+import com.microsoft.azure.iotsolutions.iothubmanager.services.models.DeploymentServiceListModel;\n+import com.microsoft.azure.iotsolutions.iothubmanager.services.models.DeploymentServiceModel;\n+import com.microsoft.azure.iotsolutions.iothubmanager.services.models.DeploymentStatus;\n+import com.microsoft.azure.sdk.iot.service.Configuration;\n+import com.microsoft.azure.sdk.iot.service.RegistryManager;\n+import com.microsoft.azure.sdk.iot.service.devicetwin.DeviceTwin;\n+import com.microsoft.azure.sdk.iot.service.devicetwin.DeviceTwinDevice;\n+import com.microsoft.azure.sdk.iot.service.devicetwin.Query;\n+import com.microsoft.azure.sdk.iot.service.devicetwin.SqlQuery;\n+import com.microsoft.azure.sdk.iot.service.exceptions.IotHubException;\n+import com.microsoft.azure.sdk.iot.service.exceptions.IotHubNotFoundException;\n+import org.apache.commons.lang3.BooleanUtils;\n+import org.apache.commons.lang3.StringUtils;\n+import play.Logger;\n+import play.libs.Json;\n+\n+import java.io.IOException;\n+import java.util.Comparator;\n+import java.util.HashMap;\n+import java.util.HashSet;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Set;\n+import java.util.UUID;\n+import java.util.concurrent.CompletableFuture;\n+import java.util.concurrent.CompletionException;\n+import java.util.concurrent.CompletionStage;\n+import java.util.stream.Collectors;\n+\n+import static play.libs.Json.fromJson;\n+\n+public final class Deployments implements IDeployments {\n+\n+    private static final Logger.ALogger log = Logger.of(Deployments.class);\n+    private static final int MAX_DEPLOYMENTS = 20;\n+\n+    private static final String DEPLOYMENT_NAME_LABEL = \"Name\";\n+    private static final String DEPLOYMENT_GROUP_ID_LABEL = \"DeviceGroupId\";\n+    private static final String RM_CREATED_LABEL = \"RMDeployment\";\n+    private static final String DEVICE_GROUP_ID_PARAM = \"deviceGroupId\";\n+    private static final String DEVICE_GROUP_QUERY_PARAM = \"deviceGroupQuery\";\n+    private static final String NAME_PARAM = \"name\";\n+    private static final String PACKAGE_CONTENT_PARAM = \"packageContent\";\n+    private static final String SCHEMA_VERSION = \"schemaVersion\";\n+    private static final String APPLIED_DEVICES_QUERY =\n+            \"moduleId = '$edgeAgent' and configurations.[[%s]].status = 'Applied'\";\n+    private static final String SUCCESSFUL_DEVICES_QUERY = APPLIED_DEVICES_QUERY +\n+            \" and properties.desired.$version = properties.reported.lastDesiredVersion\" +\n+            \" and properties.reported.lastDesiredStatus.code = 200\";\n+    private static final String FAILED_DEVICES_QUERY = APPLIED_DEVICES_QUERY +\n+            \" and properties.desired.$version = properties.reported.lastDesiredVersion\" +\n+            \" and properties.reported.lastDesiredStatus.code != 200\";\n+\n+    private final RegistryManager registry;\n+    private final DeviceTwin deviceTwin;\n+    private final String ioTHubHostName;\n+\n+    @Inject\n+    public Deployments(final IIoTHubWrapper ioTHubService) throws Exception {\n+        this.registry = ioTHubService.getRegistryManagerClient();\n+        this.deviceTwin = ioTHubService.getDeviceTwinClient();\n+        this.ioTHubHostName = ioTHubService.getIotHubHostName();\n+    }\n+\n+    public Deployments(final String ioTHubHostName,\n+                       final DeviceTwin deviceTwin,\n+                       final RegistryManager registry) {\n+        this.registry = registry;\n+        this.deviceTwin = deviceTwin;\n+        this.ioTHubHostName = ioTHubHostName;\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override\n+    public CompletionStage<DeploymentServiceListModel> listAsync() throws\n+            ExternalDependencyException {\n+        try {\n+            final List<Configuration> deployments = this.registry.getConfigurations(MAX_DEPLOYMENTS);\n+\n+            if (deployments == null) {\n+                throw new CompletionException(\n+                        new ResourceNotFoundException(String.format(\"No deployments found for %s hub.\", this\n+                                .ioTHubHostName)));\n+            }\n+\n+            final List<DeploymentServiceModel> serviceModelDeployments =\n+                    deployments.stream().filter(Deployments::deploymentMadeByRM)\n+                            .map(config -> {\n+                                try {\n+                                    return new DeploymentServiceModel(config);\n+                                } catch (InvalidInputException e) {\n+                                    throw new CompletionException(e);\n+                                }\n+                            })\n+                            .sorted(Comparator.comparing(DeploymentServiceModel::getName))\n+                            .collect(Collectors.toList());\n+            return CompletableFuture.supplyAsync(() -> new DeploymentServiceListModel(serviceModelDeployments));\n+        } catch (IOException | IotHubException e) {\n+            final String message = \"Unable to list deployments\";\n+            log.error(message, e);\n+            throw new ExternalDependencyException(message, e);\n+        }\n+\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override\n+    public CompletionStage<DeploymentServiceModel> getAsync(String id, boolean includeDeviceStatus) throws\n+            ExternalDependencyException {\n+        try {\n+            final Configuration deployment = this.registry.getConfiguration(id);\n+\n+            if (deployment == null) {\n+                throw new CompletionException(\n+                    new ResourceNotFoundException(String.format(\"No deployment with id %s found for %s hub.\",\n+                                                                id, this.ioTHubHostName)));\n+            }\n+\n+            final DeploymentServiceModel result;\n+            try {\n+                result = new DeploymentServiceModel(deployment);\n+            } catch (InvalidInputException e) {\n+                throw new CompletionException(e);\n+            }\n+\n+            if (includeDeviceStatus) {\n+                Map<String, DeploymentStatus> deviceStatuses = null;\n+\n+                try {\n+                    deviceStatuses = this.getDeviceStatuses(id);\n+                } catch(Exception ex) {\n+                    log.error(\"Unable to retrieve device statuses for deployment \" + id, ex);\n+                }\n+\n+                result.getDeploymentMetrics().setDeviceStatuses(deviceStatuses);\n+            }\n+            return CompletableFuture.supplyAsync(() -> result);\n+        } catch (IotHubNotFoundException e) {\n+            throw new CompletionException(\n+                    new ResourceNotFoundException(String.format(\"No deployment with id %s found for %s hub.\",\n+                            id, this.ioTHubHostName)));\n+        } catch (IOException | IotHubException e) {\n+            final String message = \"Unable to list deployments\";\n+            log.error(message, e);\n+            throw new ExternalDependencyException(message, e);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override\n+    public CompletionStage<DeploymentServiceModel> createAsync(DeploymentServiceModel deployment) throws\n+            InvalidInputException {\n+        this.verifyDeploymentArgument(DEVICE_GROUP_ID_PARAM, deployment.getDeviceGroupId());\n+        this.verifyDeploymentArgument(DEVICE_GROUP_QUERY_PARAM, deployment.getDeviceGroupQuery());\n+        this.verifyDeploymentArgument(NAME_PARAM, deployment.getName());\n+        this.verifyDeploymentArgument(PACKAGE_CONTENT_PARAM, deployment.getPackageContent());\n+        this.verifyDeploymentArgument(DEVICE_GROUP_ID_PARAM, deployment.getDeviceGroupId());\n+\n+        if (deployment.getPriority() < 0) {\n+            throw new InvalidInputException(\"Invalid input. A priority should be provided greater than 0.\");\n+        }\n+\n+        try {\n+            final Configuration edgeConfig = createEdgeConfiguration(deployment);\n+            final Configuration result = this.registry.addConfiguration(edgeConfig);\n+            return CompletableFuture.completedFuture(new DeploymentServiceModel(result));\n+        }\n+        catch (InvalidInputException e) {\n+            log.error(\"Unable to create deployment. Invalid group or package information provided\", e);\n+            throw new CompletionException(e);\n+        }\n+        catch (IotHubException | IOException e) {\n+            log.error(\"Unable to create deployment when communicating with the hub.\", e);\n+            throw new CompletionException(e);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override\n+    public CompletionStage<Boolean> deleteAsync(String id) throws ExternalDependencyException {\n+        try {\n+            this.registry.removeConfiguration(id);\n+            return CompletableFuture.completedFuture(true);\n+        } catch (IotHubNotFoundException e) {\n+            throw new CompletionException(\n+                    new ResourceNotFoundException(String.format(\"No deployment with id %s found for %s hub.\",\n+                            id, this.ioTHubHostName)));\n+        } catch (IOException|IotHubException e) {\n+            final String message = \"Unable to delete deployment with id: \" + id;\n+            log.error(message, e);\n+            throw new ExternalDependencyException(message, e);\n+        }\n+    }\n+\n+    /**\n+     * Does 3 queries to the IoTHub to get the status of the deployment per device.\n+     *\n+     * @param deploymentId - Deployment id for the deployment to query.\n+     * @return Map of deviceId to the {@link DeploymentStatus}.\n+     */\n+    private Map<String, DeploymentStatus> getDeviceStatuses(String deploymentId) throws IOException {\n+        final Set<String> appliedDevices = this.getDevicesInQuery(APPLIED_DEVICES_QUERY, deploymentId);","path":"iothub-manager/app/com/microsoft/azure/iotsolutions/iothubmanager/services/Deployments.java","position":221,"original_position":221,"commit_id":"41a3a4d81aa7e1c6ca1fd2aa10b121526e131bf5","original_commit_id":"41a3a4d81aa7e1c6ca1fd2aa10b121526e131bf5","user":{"login":"zhang-hua","id":2011059,"node_id":"MDQ6VXNlcjIwMTEwNTk=","avatar_url":"https://avatars1.githubusercontent.com/u/2011059?v=4","gravatar_id":"","url":"https://api.github.com/users/zhang-hua","html_url":"https://github.com/zhang-hua","followers_url":"https://api.github.com/users/zhang-hua/followers","following_url":"https://api.github.com/users/zhang-hua/following{/other_user}","gists_url":"https://api.github.com/users/zhang-hua/gists{/gist_id}","starred_url":"https://api.github.com/users/zhang-hua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhang-hua/subscriptions","organizations_url":"https://api.github.com/users/zhang-hua/orgs","repos_url":"https://api.github.com/users/zhang-hua/repos","events_url":"https://api.github.com/users/zhang-hua/events{/privacy}","received_events_url":"https://api.github.com/users/zhang-hua/received_events","type":"User","site_admin":false},"body":"nit: use '*deviceIds' might be better to understand.","created_at":"2018-10-09T20:50:28Z","updated_at":"2018-10-09T20:50:28Z","html_url":"https://github.com/Azure/remote-monitoring-services-java/pull/58#discussion_r223858773","pull_request_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/58","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/comments/223858773"},"html":{"href":"https://github.com/Azure/remote-monitoring-services-java/pull/58#discussion_r223858773"},"pull_request":{"href":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/58","id":218142241,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4MTQyMjQx","html_url":"https://github.com/Azure/remote-monitoring-services-java/pull/58","diff_url":"https://github.com/Azure/remote-monitoring-services-java/pull/58.diff","patch_url":"https://github.com/Azure/remote-monitoring-services-java/pull/58.patch","issue_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/issues/58","number":58,"state":"open","locked":false,"title":"Add ability to create list and delete edge deployments in deployments…","user":{"login":"elvinm","id":12952875,"node_id":"MDQ6VXNlcjEyOTUyODc1","avatar_url":"https://avatars1.githubusercontent.com/u/12952875?v=4","gravatar_id":"","url":"https://api.github.com/users/elvinm","html_url":"https://github.com/elvinm","followers_url":"https://api.github.com/users/elvinm/followers","following_url":"https://api.github.com/users/elvinm/following{/other_user}","gists_url":"https://api.github.com/users/elvinm/gists{/gist_id}","starred_url":"https://api.github.com/users/elvinm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elvinm/subscriptions","organizations_url":"https://api.github.com/users/elvinm/orgs","repos_url":"https://api.github.com/users/elvinm/repos","events_url":"https://api.github.com/users/elvinm/events{/privacy}","received_events_url":"https://api.github.com/users/elvinm/received_events","type":"User","site_admin":false},"body":"# Types of changes\r\n<!-- Please put an `x` (e.g. [x]) in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)\r\n\r\n# Checklist:\r\n<!-- Please put an `x` (e.g. [x]) in all the boxes that apply: -->\r\n- [x] All new and existing tests passed.\r\n- [x] The code follows the code style and conventions of this project.\r\n- [x] The change requires a change to the documentation.\r\n- [x] I have updated the documentation accordingly. \r\n\r\n# Description of the change\r\nAddition of a deployments controller to create list and delete edge deployment and expandable into ADM deployments.\r\n\r\nThe packages controller supports:\r\nGET    /v1/deployments          \r\nGET    /v1/deployments/:id\r\nPOST   /v1/deployments\r\nDELETE /v1/deployments/:id  \r\n\r\nExample usage can be seen inside of integration tests in the pull request [here](https://github.com/Azure/azure-iot-pcs-remote-monitoring-dotnet-tests/pull/42).\r\n\r\n# Motivation for the change\r\nAdds the ability to schedule a deployment of an edge deployment manifest to a group of devices based on their target condition query. Also exposes details of the status of the deployment.\r\n\r\nThis is the java equivalent of [this pull request](https://github.com/Azure/remote-monitoring-services-dotnet/pull/115)","created_at":"2018-09-25T22:49:45Z","updated_at":"2018-10-09T20:50:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1264911f0369c2f7720abda347293c2db1522112","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1008902990,"node_id":"MDU6TGFiZWwxMDA4OTAyOTkw","url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/labels/iothub-manager","name":"iothub-manager","color":"adff96","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/58/commits","review_comments_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/58/comments","review_comment_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/issues/58/comments","statuses_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/statuses/41a3a4d81aa7e1c6ca1fd2aa10b121526e131bf5","head":{"label":"Azure:edgeDeployments","ref":"edgeDeployments","sha":"41a3a4d81aa7e1c6ca1fd2aa10b121526e131bf5","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":141646262,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE2NDYyNjI=","name":"remote-monitoring-services-java","full_name":"Azure/remote-monitoring-services-java","private":false,"owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Azure/remote-monitoring-services-java","description":"Azure IoT Java solution for Remote Monitoring","fork":false,"url":"https://api.github.com/repos/Azure/remote-monitoring-services-java","forks_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/forks","keys_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/teams","hooks_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/hooks","issue_events_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/events","assignees_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/tags","blobs_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/languages","stargazers_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/stargazers","contributors_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/contributors","subscribers_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/subscribers","subscription_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/subscription","commits_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/merges","archive_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/downloads","issues_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/labels{/name}","releases_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/deployments","created_at":"2018-07-20T01:05:34Z","updated_at":"2018-10-02T00:12:34Z","pushed_at":"2018-10-09T20:30:53Z","git_url":"git://github.com/Azure/remote-monitoring-services-java.git","ssh_url":"git@github.com:Azure/remote-monitoring-services-java.git","clone_url":"https://github.com/Azure/remote-monitoring-services-java.git","svn_url":"https://github.com/Azure/remote-monitoring-services-java","homepage":null,"size":2531,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":19,"watchers":1,"default_branch":"master"}},"base":{"label":"Azure:edgePackages","ref":"edgePackages","sha":"6ab3d7acaaf9dbf53538e0f812428c7d9357970c","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":141646262,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE2NDYyNjI=","name":"remote-monitoring-services-java","full_name":"Azure/remote-monitoring-services-java","private":false,"owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Azure/remote-monitoring-services-java","description":"Azure IoT Java solution for Remote Monitoring","fork":false,"url":"https://api.github.com/repos/Azure/remote-monitoring-services-java","forks_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/forks","keys_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/teams","hooks_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/hooks","issue_events_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/events","assignees_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/tags","blobs_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/languages","stargazers_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/stargazers","contributors_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/contributors","subscribers_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/subscribers","subscription_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/subscription","commits_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/merges","archive_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/downloads","issues_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/labels{/name}","releases_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/remote-monitoring-services-java/deployments","created_at":"2018-07-20T01:05:34Z","updated_at":"2018-10-02T00:12:34Z","pushed_at":"2018-10-09T20:30:53Z","git_url":"git://github.com/Azure/remote-monitoring-services-java.git","ssh_url":"git@github.com:Azure/remote-monitoring-services-java.git","clone_url":"https://github.com/Azure/remote-monitoring-services-java.git","svn_url":"https://github.com/Azure/remote-monitoring-services-java","homepage":null,"size":2531,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":19,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/58"},"html":{"href":"https://github.com/Azure/remote-monitoring-services-java/pull/58"},"issue":{"href":"https://api.github.com/repos/Azure/remote-monitoring-services-java/issues/58"},"comments":{"href":"https://api.github.com/repos/Azure/remote-monitoring-services-java/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/remote-monitoring-services-java/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/remote-monitoring-services-java/statuses/41a3a4d81aa7e1c6ca1fd2aa10b121526e131bf5"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"zhang-hua"}}