|
36 | 36 | import com.microsoft.windowsazure.core.utils.CollectionStringBuilder;
|
37 | 37 | import com.microsoft.windowsazure.exception.ServiceException;
|
38 | 38 | import com.microsoft.windowsazure.tracing.CloudTracing;
|
| 39 | +import java.io.IOException; |
| 40 | +import java.io.InputStream; |
| 41 | +import java.io.StringWriter; |
| 42 | +import java.net.URLEncoder; |
| 43 | +import java.util.ArrayList; |
| 44 | +import java.util.HashMap; |
| 45 | +import java.util.concurrent.Callable; |
| 46 | +import java.util.concurrent.Future; |
39 | 47 | import org.apache.commons.io.IOUtils;
|
40 | 48 | import org.apache.http.HttpResponse;
|
41 | 49 | import org.apache.http.HttpStatus;
|
|
48 | 56 | import org.codehaus.jackson.node.NullNode;
|
49 | 57 | import org.codehaus.jackson.node.ObjectNode;
|
50 | 58 |
|
51 |
| -import java.io.IOException; |
52 |
| -import java.io.InputStream; |
53 |
| -import java.io.StringWriter; |
54 |
| -import java.net.URLEncoder; |
55 |
| -import java.util.ArrayList; |
56 |
| -import java.util.HashMap; |
57 |
| -import java.util.concurrent.Callable; |
58 |
| -import java.util.concurrent.Future; |
59 |
| - |
60 | 59 | /**
|
61 | 60 | * Operations for managing Traffic Manager endpoints.
|
62 | 61 | */
|
@@ -180,7 +179,7 @@ public EndpointCreateOrUpdateResponse createOrUpdate(String resourceGroupName, S
|
180 | 179 | url = url + "/";
|
181 | 180 | url = url + URLEncoder.encode(endpointName, "UTF-8");
|
182 | 181 | ArrayList<String> queryParameters = new ArrayList<String>();
|
183 |
| - queryParameters.add("api-version=" + "2015-04-28-preview"); |
| 182 | + queryParameters.add("api-version=" + "2015-11-01"); |
184 | 183 | if (queryParameters.size() > 0) {
|
185 | 184 | url = url + "?" + CollectionStringBuilder.join(queryParameters, "&");
|
186 | 185 | }
|
@@ -252,6 +251,10 @@ public EndpointCreateOrUpdateResponse createOrUpdate(String resourceGroupName, S
|
252 | 251 | if (parameters.getEndpoint().getProperties().getEndpointMonitorStatus() != null) {
|
253 | 252 | ((ObjectNode) propertiesValue).put("endpointMonitorStatus", parameters.getEndpoint().getProperties().getEndpointMonitorStatus());
|
254 | 253 | }
|
| 254 | + |
| 255 | + if (parameters.getEndpoint().getProperties().getMinChildEndpoints() != null) { |
| 256 | + ((ObjectNode) propertiesValue).put("minChildEndpoints", parameters.getEndpoint().getProperties().getMinChildEndpoints()); |
| 257 | + } |
255 | 258 | }
|
256 | 259 |
|
257 | 260 | StringWriter stringWriter = new StringWriter();
|
@@ -369,6 +372,13 @@ public EndpointCreateOrUpdateResponse createOrUpdate(String resourceGroupName, S
|
369 | 372 | endpointMonitorStatusInstance = endpointMonitorStatusValue.getTextValue();
|
370 | 373 | propertiesInstance.setEndpointMonitorStatus(endpointMonitorStatusInstance);
|
371 | 374 | }
|
| 375 | + |
| 376 | + JsonNode minChildEndpointsValue = propertiesValue2.get("minChildEndpoints"); |
| 377 | + if (minChildEndpointsValue != null && minChildEndpointsValue instanceof NullNode == false) { |
| 378 | + long minChildEndpointsInstance; |
| 379 | + minChildEndpointsInstance = minChildEndpointsValue.getLongValue(); |
| 380 | + propertiesInstance.setMinChildEndpoints(minChildEndpointsInstance); |
| 381 | + } |
372 | 382 | }
|
373 | 383 | }
|
374 | 384 |
|
@@ -476,7 +486,7 @@ public OperationResponse delete(String resourceGroupName, String profileName, St
|
476 | 486 | url = url + "/";
|
477 | 487 | url = url + URLEncoder.encode(endpointName, "UTF-8");
|
478 | 488 | ArrayList<String> queryParameters = new ArrayList<String>();
|
479 |
| - queryParameters.add("api-version=" + "2015-04-28-preview"); |
| 489 | + queryParameters.add("api-version=" + "2015-11-01"); |
480 | 490 | if (queryParameters.size() > 0) {
|
481 | 491 | url = url + "?" + CollectionStringBuilder.join(queryParameters, "&");
|
482 | 492 | }
|
@@ -616,7 +626,7 @@ public EndpointGetResponse get(String resourceGroupName, String profileName, Str
|
616 | 626 | url = url + "/";
|
617 | 627 | url = url + URLEncoder.encode(endpointName, "UTF-8");
|
618 | 628 | ArrayList<String> queryParameters = new ArrayList<String>();
|
619 |
| - queryParameters.add("api-version=" + "2015-04-28-preview"); |
| 629 | + queryParameters.add("api-version=" + "2015-11-01"); |
620 | 630 | if (queryParameters.size() > 0) {
|
621 | 631 | url = url + "?" + CollectionStringBuilder.join(queryParameters, "&");
|
622 | 632 | }
|
@@ -746,6 +756,13 @@ public EndpointGetResponse get(String resourceGroupName, String profileName, Str
|
746 | 756 | endpointMonitorStatusInstance = endpointMonitorStatusValue.getTextValue();
|
747 | 757 | propertiesInstance.setEndpointMonitorStatus(endpointMonitorStatusInstance);
|
748 | 758 | }
|
| 759 | + |
| 760 | + JsonNode minChildEndpointsValue = propertiesValue.get("minChildEndpoints"); |
| 761 | + if (minChildEndpointsValue != null && minChildEndpointsValue instanceof NullNode == false) { |
| 762 | + long minChildEndpointsInstance; |
| 763 | + minChildEndpointsInstance = minChildEndpointsValue.getLongValue(); |
| 764 | + propertiesInstance.setMinChildEndpoints(minChildEndpointsInstance); |
| 765 | + } |
749 | 766 | }
|
750 | 767 | }
|
751 | 768 |
|
@@ -864,7 +881,7 @@ public EndpointUpdateResponse update(String resourceGroupName, String profileNam
|
864 | 881 | url = url + "/";
|
865 | 882 | url = url + URLEncoder.encode(endpointName, "UTF-8");
|
866 | 883 | ArrayList<String> queryParameters = new ArrayList<String>();
|
867 |
| - queryParameters.add("api-version=" + "2015-04-28-preview"); |
| 884 | + queryParameters.add("api-version=" + "2015-11-01"); |
868 | 885 | if (queryParameters.size() > 0) {
|
869 | 886 | url = url + "?" + CollectionStringBuilder.join(queryParameters, "&");
|
870 | 887 | }
|
@@ -936,6 +953,10 @@ public EndpointUpdateResponse update(String resourceGroupName, String profileNam
|
936 | 953 | if (parameters.getEndpoint().getProperties().getEndpointMonitorStatus() != null) {
|
937 | 954 | ((ObjectNode) propertiesValue).put("endpointMonitorStatus", parameters.getEndpoint().getProperties().getEndpointMonitorStatus());
|
938 | 955 | }
|
| 956 | + |
| 957 | + if (parameters.getEndpoint().getProperties().getMinChildEndpoints() != null) { |
| 958 | + ((ObjectNode) propertiesValue).put("minChildEndpoints", parameters.getEndpoint().getProperties().getMinChildEndpoints()); |
| 959 | + } |
939 | 960 | }
|
940 | 961 |
|
941 | 962 | StringWriter stringWriter = new StringWriter();
|
@@ -1053,6 +1074,13 @@ public EndpointUpdateResponse update(String resourceGroupName, String profileNam
|
1053 | 1074 | endpointMonitorStatusInstance = endpointMonitorStatusValue.getTextValue();
|
1054 | 1075 | propertiesInstance.setEndpointMonitorStatus(endpointMonitorStatusInstance);
|
1055 | 1076 | }
|
| 1077 | + |
| 1078 | + JsonNode minChildEndpointsValue = propertiesValue2.get("minChildEndpoints"); |
| 1079 | + if (minChildEndpointsValue != null && minChildEndpointsValue instanceof NullNode == false) { |
| 1080 | + long minChildEndpointsInstance; |
| 1081 | + minChildEndpointsInstance = minChildEndpointsValue.getLongValue(); |
| 1082 | + propertiesInstance.setMinChildEndpoints(minChildEndpointsInstance); |
| 1083 | + } |
1056 | 1084 | }
|
1057 | 1085 | }
|
1058 | 1086 |
|
|
0 commit comments