View Javadoc
1   // Copyright (c) Microsoft Corporation. All rights reserved.
2   // Licensed under the MIT License.
3   
4   package com.azure.common.entities;
5   
6   import com.fasterxml.jackson.annotation.JsonProperty;
7   
8   import java.util.Map;
9   
10  /**
11   * Maps to the JSON return values from http://httpbin.org.
12   */
13  public class HttpBinJSON {
14      @JsonProperty()
15      private String url;
16  
17      @JsonProperty()
18      private Map<String, String> headers;
19  
20      @JsonProperty()
21      private Object data;
22  
23      /**
24       * Gets the URL associated with this request.
25       *
26       * @return he URL associated with the request.
27       */
28      public String url() {
29          return url;
30      }
31  
32      /**
33       * Sets the URL associated with this request.
34       *
35       * @param url The URL associated with the request.
36       */
37      public void url(String url) {
38          this.url = url;
39      }
40  
41      /**
42       * Gets the response headers.
43       *
44       * @return The response headers.
45       */
46      public Map<String, String> headers() {
47          return headers;
48      }
49  
50      /**
51       * Sets the response headers.
52       *
53       * @param headers The response headers.
54       */
55      public void headers(Map<String, String> headers) {
56          this.headers = headers;
57      }
58  
59      /**
60       * Gets the response body.
61       *
62       * @return The response body.
63       */
64      public Object data() {
65          return data;
66      }
67  
68      /**
69       * Sets the response body.
70       *
71       * @param data The response body.
72       */
73      public void data(Object data) {
74          this.data = data;
75      }
76  }