diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java new file mode 100644 index 00000000000..7675b3e7a0e --- /dev/null +++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/CheckTrafficManagerRelativeDnsNameAvailabilityParameters.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.trafficmanager; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters supplied to check Traffic Manager name operation. + */ +public class CheckTrafficManagerRelativeDnsNameAvailabilityParameters { + /** + * The name of the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The type of the resource. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the CheckTrafficManagerRelativeDnsNameAvailabilityParameters object itself. + */ + public CheckTrafficManagerRelativeDnsNameAvailabilityParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the CheckTrafficManagerRelativeDnsNameAvailabilityParameters object itself. + */ + public CheckTrafficManagerRelativeDnsNameAvailabilityParameters withType(String type) { + this.type = type; + return this; + } + +} diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficViewEnrollmentStatus.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficViewEnrollmentStatus.java new file mode 100644 index 00000000000..b48ec80c32b --- /dev/null +++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficViewEnrollmentStatus.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.trafficmanager; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TrafficViewEnrollmentStatus. + */ +public final class TrafficViewEnrollmentStatus extends ExpandableStringEnum { + /** Static value Enabled for TrafficViewEnrollmentStatus. */ + public static final TrafficViewEnrollmentStatus ENABLED = fromString("Enabled"); + + /** Static value Disabled for TrafficViewEnrollmentStatus. */ + public static final TrafficViewEnrollmentStatus DISABLED = fromString("Disabled"); + + /** + * Creates or finds a TrafficViewEnrollmentStatus from its string representation. + * @param name a name to look for + * @return the corresponding TrafficViewEnrollmentStatus + */ + @JsonCreator + public static TrafficViewEnrollmentStatus fromString(String name) { + return fromString(name, TrafficViewEnrollmentStatus.class); + } + + /** + * @return known TrafficViewEnrollmentStatus values + */ + public static Collection values() { + return values(TrafficViewEnrollmentStatus.class); + } +} diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProfileInner.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProfileInner.java index bde303f6e09..4c3261f3992 100644 --- a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProfileInner.java +++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProfileInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.management.trafficmanager.DnsConfig; import com.microsoft.azure.management.trafficmanager.MonitorConfig; import java.util.List; +import com.microsoft.azure.management.trafficmanager.TrafficViewEnrollmentStatus; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -53,6 +54,15 @@ public class ProfileInner extends TrackedResourceInner { @JsonProperty(value = "properties.endpoints") private List endpoints; + /** + * Indicates whether Traffic View is 'Enabled' or 'Disabled' for the + * Traffic Manager profile. Null, indicates 'Disabled'. Enabling this + * feature will increase the cost of the Traffic Manage profile. Possible + * values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.trafficViewEnrollmentStatus") + private TrafficViewEnrollmentStatus trafficViewEnrollmentStatus; + /** * Get the profileStatus value. * @@ -153,4 +163,24 @@ public ProfileInner withEndpoints(List endpoints) { return this; } + /** + * Get the trafficViewEnrollmentStatus value. + * + * @return the trafficViewEnrollmentStatus value + */ + public TrafficViewEnrollmentStatus trafficViewEnrollmentStatus() { + return this.trafficViewEnrollmentStatus; + } + + /** + * Set the trafficViewEnrollmentStatus value. + * + * @param trafficViewEnrollmentStatus the trafficViewEnrollmentStatus value to set + * @return the ProfileInner object itself. + */ + public ProfileInner withTrafficViewEnrollmentStatus(TrafficViewEnrollmentStatus trafficViewEnrollmentStatus) { + this.trafficViewEnrollmentStatus = trafficViewEnrollmentStatus; + return this; + } + } diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProfilesInner.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProfilesInner.java index 2b153d1cc16..fac12c374ef 100644 --- a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProfilesInner.java +++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProfilesInner.java @@ -14,6 +14,7 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.trafficmanager.CheckTrafficManagerRelativeDnsNameAvailabilityParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -65,7 +66,7 @@ public ProfilesInner(Retrofit retrofit, TrafficManagerManagementClientImpl clien interface ProfilesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.trafficmanager.Profiles checkTrafficManagerRelativeDnsNameAvailability" }) @POST("providers/Microsoft.Network/checkTrafficManagerNameAvailability") - Observable> checkTrafficManagerRelativeDnsNameAvailability(@Body CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> checkTrafficManagerRelativeDnsNameAvailability(@Body CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.trafficmanager.Profiles listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles") @@ -102,7 +103,7 @@ interface ProfilesService { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the TrafficManagerNameAvailabilityInner object if successful. */ - public TrafficManagerNameAvailabilityInner checkTrafficManagerRelativeDnsNameAvailability(CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters) { + public TrafficManagerNameAvailabilityInner checkTrafficManagerRelativeDnsNameAvailability(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { return checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(parameters).toBlocking().single().body(); } @@ -114,7 +115,7 @@ public TrafficManagerNameAvailabilityInner checkTrafficManagerRelativeDnsNameAva * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture checkTrafficManagerRelativeDnsNameAvailabilityAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture checkTrafficManagerRelativeDnsNameAvailabilityAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(parameters), serviceCallback); } @@ -125,7 +126,7 @@ public ServiceFuture checkTrafficManagerRel * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TrafficManagerNameAvailabilityInner object */ - public Observable checkTrafficManagerRelativeDnsNameAvailabilityAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters) { + public Observable checkTrafficManagerRelativeDnsNameAvailabilityAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { return checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(parameters).map(new Func1, TrafficManagerNameAvailabilityInner>() { @Override public TrafficManagerNameAvailabilityInner call(ServiceResponse response) { @@ -141,7 +142,7 @@ public TrafficManagerNameAvailabilityInner call(ServiceResponse> checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters) { + public Observable> checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } @@ -238,7 +239,11 @@ public Observable>> listByResourceGroupWithSe public Observable>> call(Response response) { try { ServiceResponse> result = listByResourceGroupDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -315,7 +320,11 @@ public Observable>> listWithServiceResponseAs public Observable>> call(Response response) { try { ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProxyResourceInner.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProxyResourceInner.java index 0f98d0e08ea..4437d2aadb8 100644 --- a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProxyResourceInner.java +++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProxyResourceInner.java @@ -8,11 +8,91 @@ package com.microsoft.azure.management.trafficmanager.implementation; -import com.microsoft.azure.Resource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; /** * The resource model definition for a ARM proxy resource. It will have * everything other than required location and tags. */ -public class ProxyResourceInner extends Resource { +public class ProxyResourceInner extends ProxyResource { + /** + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The name of the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id value. + * + * @param id the id value to set + * @return the ProxyResourceInner object itself. + */ + public ProxyResourceInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the ProxyResourceInner object itself. + */ + public ProxyResourceInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the ProxyResourceInner object itself. + */ + public ProxyResourceInner withType(String type) { + this.type = type; + return this; + } + } diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/TrackedResourceInner.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/TrackedResourceInner.java index 9c537ce38b0..6170cbd762f 100644 --- a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/TrackedResourceInner.java +++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/TrackedResourceInner.java @@ -10,12 +10,12 @@ import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.Resource; +import com.microsoft.azure.ProxyResource; /** * The resource model definition for a ARM tracked top level resource. */ -public class TrackedResourceInner extends Resource { +public class TrackedResourceInner extends ProxyResource { /** * Resource tags. */ @@ -28,6 +28,25 @@ public class TrackedResourceInner extends Resource { @JsonProperty(value = "location") private String location; + /** + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The name of the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. + */ + @JsonProperty(value = "type") + private String type; + /** * Get the tags value. * @@ -68,4 +87,64 @@ public TrackedResourceInner withLocation(String location) { return this; } + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id value. + * + * @param id the id value to set + * @return the TrackedResourceInner object itself. + */ + public TrackedResourceInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name value. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name value. + * + * @param name the name value to set + * @return the TrackedResourceInner object itself. + */ + public TrackedResourceInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the TrackedResourceInner object itself. + */ + public TrackedResourceInner withType(String type) { + this.type = type; + return this; + } + }