{"action":"opened","number":176,"pull_request":{"url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/pulls/176","id":128056156,"html_url":"https://github.com/Azure/autorest-clientruntime-for-java/pull/176","diff_url":"https://github.com/Azure/autorest-clientruntime-for-java/pull/176.diff","patch_url":"https://github.com/Azure/autorest-clientruntime-for-java/pull/176.patch","issue_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/issues/176","number":176,"state":"open","locked":false,"title":"Enabling user to poll long running operations","user":{"login":"anuchandy","id":1471612,"avatar_url":"https://avatars2.githubusercontent.com/u/1471612?v=3","gravatar_id":"","url":"https://api.github.com/users/anuchandy","html_url":"https://github.com/anuchandy","followers_url":"https://api.github.com/users/anuchandy/followers","following_url":"https://api.github.com/users/anuchandy/following{/other_user}","gists_url":"https://api.github.com/users/anuchandy/gists{/gist_id}","starred_url":"https://api.github.com/users/anuchandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuchandy/subscriptions","organizations_url":"https://api.github.com/users/anuchandy/orgs","repos_url":"https://api.github.com/users/anuchandy/repos","events_url":"https://api.github.com/users/anuchandy/events{/privacy}","received_events_url":"https://api.github.com/users/anuchandy/received_events","type":"User","site_admin":false},"body":"**What is changed in AzureClient?**\r\n\r\n***Following methods are added.***\r\n\r\n**beginPutOrPatchAsync**\r\n\r\n```java\r\nAzureClient.<T> Single<PollingState<T>> beginPutOrPatchAsync(Observable<Response<ResponseBody>> observable, final Type resourceType)\r\n```\r\n\r\nInitiate a LRO PUT or PATCH operation and returns serializable PollingState representing the LRO. This state can be used later to resume the polling.\r\n\r\n**beginPostOrDeleteAsync**\r\n\r\n```java\r\nAzureClient.<T> Single<PollingState<T>> beginPostOrDeleteAsync(Observable<Response<ResponseBody>> observable, final Type resourceType)\r\n```\r\n\r\nInitiate a LRO POST or DELETE operation and returns serializable PollingState representing the LRO. This state can be used later to resume the polling.\r\n\r\n**pollSingleAsync**\r\n\r\n```java\r\nAzureClient.<T> Single<PollingState<T>> pollSingleAsync(final PollingState<T> pollingState, final Type resourceType)\r\n```\r\n\r\nGiven a pollingState (state of PUT_PATCH or POST_DELETE) this method poll once and returns the current polling state\r\n\r\n**pollAsync**\r\n\r\n```java\r\nAzureClient.<T> Observable<PollingState<T>> pollAsync(final PollingState<T> pollingState, final Type resourceType)\r\n```\r\n\r\nGiven a pollingState (of state of PUT_PATCH or POST_DELETE) this method keeps on polling and emits each pollingState. Since the return type is Observable, user can apply all operators to have further control (poll n times, timeout etc..)\r\n\r\n***How this affects the auto generated code?***\r\n\r\nThe `begin[Action]Async` methods in the inner collection will eventually return `Single<PollingState<T>>` (i.e. they internally calls `beginPostOrDeleteAsync` or `beginPutOrPatchAsync`). Now user can use the above other methods in the AzureClient to do polling.\r\n","created_at":"2017-06-29T02:11:12Z","updated_at":"2017-06-29T02:11:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/pulls/176/commits","review_comments_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/pulls/176/comments","review_comment_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/issues/176/comments","statuses_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/statuses/481f050fd8074602f8928c54d8f7168b76929747","head":{"label":"anuchandy:externalize-polling","ref":"externalize-polling","sha":"481f050fd8074602f8928c54d8f7168b76929747","user":{"login":"anuchandy","id":1471612,"avatar_url":"https://avatars2.githubusercontent.com/u/1471612?v=3","gravatar_id":"","url":"https://api.github.com/users/anuchandy","html_url":"https://github.com/anuchandy","followers_url":"https://api.github.com/users/anuchandy/followers","following_url":"https://api.github.com/users/anuchandy/following{/other_user}","gists_url":"https://api.github.com/users/anuchandy/gists{/gist_id}","starred_url":"https://api.github.com/users/anuchandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuchandy/subscriptions","organizations_url":"https://api.github.com/users/anuchandy/orgs","repos_url":"https://api.github.com/users/anuchandy/repos","events_url":"https://api.github.com/users/anuchandy/events{/privacy}","received_events_url":"https://api.github.com/users/anuchandy/received_events","type":"User","site_admin":false},"repo":{"id":57333292,"name":"autorest-clientruntime-for-java","full_name":"anuchandy/autorest-clientruntime-for-java","owner":{"login":"anuchandy","id":1471612,"avatar_url":"https://avatars2.githubusercontent.com/u/1471612?v=3","gravatar_id":"","url":"https://api.github.com/users/anuchandy","html_url":"https://github.com/anuchandy","followers_url":"https://api.github.com/users/anuchandy/followers","following_url":"https://api.github.com/users/anuchandy/following{/other_user}","gists_url":"https://api.github.com/users/anuchandy/gists{/gist_id}","starred_url":"https://api.github.com/users/anuchandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuchandy/subscriptions","organizations_url":"https://api.github.com/users/anuchandy/orgs","repos_url":"https://api.github.com/users/anuchandy/repos","events_url":"https://api.github.com/users/anuchandy/events{/privacy}","received_events_url":"https://api.github.com/users/anuchandy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anuchandy/autorest-clientruntime-for-java","description":"The runtime libraries for AutoRest generated Java clients.","fork":true,"url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java","forks_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/forks","keys_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/teams","hooks_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/hooks","issue_events_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/issues/events{/number}","events_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/events","assignees_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/assignees{/user}","branches_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/branches{/branch}","tags_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/tags","blobs_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/statuses/{sha}","languages_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/languages","stargazers_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/stargazers","contributors_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/contributors","subscribers_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/subscribers","subscription_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/subscription","commits_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/contents/{+path}","compare_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/merges","archive_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/downloads","issues_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/issues{/number}","pulls_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/pulls{/number}","milestones_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/milestones{/number}","notifications_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/labels{/name}","releases_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/releases{/id}","deployments_url":"https://api.github.com/repos/anuchandy/autorest-clientruntime-for-java/deployments","created_at":"2016-04-28T20:57:48Z","updated_at":"2016-04-28T20:57:49Z","pushed_at":"2017-06-29T01:49:38Z","git_url":"git://github.com/anuchandy/autorest-clientruntime-for-java.git","ssh_url":"git@github.com:anuchandy/autorest-clientruntime-for-java.git","clone_url":"https://github.com/anuchandy/autorest-clientruntime-for-java.git","svn_url":"https://github.com/anuchandy/autorest-clientruntime-for-java","homepage":null,"size":50755,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"3c7dae4629abf01e64969bcad690d1bd202bc862","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars3.githubusercontent.com/u/6844498?v=3","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":56358351,"name":"autorest-clientruntime-for-java","full_name":"Azure/autorest-clientruntime-for-java","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars3.githubusercontent.com/u/6844498?v=3","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},"private":false,"html_url":"https://github.com/Azure/autorest-clientruntime-for-java","description":"The runtime libraries for AutoRest generated Java clients.","fork":false,"url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java","forks_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/forks","keys_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/teams","hooks_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/hooks","issue_events_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/events","assignees_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/tags","blobs_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/languages","stargazers_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/stargazers","contributors_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/contributors","subscribers_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/subscribers","subscription_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/subscription","commits_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/merges","archive_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/downloads","issues_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/labels{/name}","releases_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/deployments","created_at":"2016-04-16T01:01:29Z","updated_at":"2017-03-21T17:56:38Z","pushed_at":"2017-06-29T00:14:59Z","git_url":"git://github.com/Azure/autorest-clientruntime-for-java.git","ssh_url":"git@github.com:Azure/autorest-clientruntime-for-java.git","clone_url":"https://github.com/Azure/autorest-clientruntime-for-java.git","svn_url":"https://github.com/Azure/autorest-clientruntime-for-java","homepage":null,"size":50739,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":5,"forks":7,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/pulls/176"},"html":{"href":"https://github.com/Azure/autorest-clientruntime-for-java/pull/176"},"issue":{"href":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/issues/176"},"comments":{"href":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/issues/176/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/pulls/176/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/pulls/176/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/autorest-clientruntime-for-java/statuses/481f050fd8074602f8928c54d8f7168b76929747"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":613,"deletions":359,"changed_files":4}}
{"actor":{"display_login":"anuchandy"}}