Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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;
}

}
Original file line number Diff line number Diff line change
@@ -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<TrafficViewEnrollmentStatus> {
/** 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<TrafficViewEnrollmentStatus> values() {
return values(TrafficViewEnrollmentStatus.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -53,6 +54,15 @@ public class ProfileInner extends TrackedResourceInner {
@JsonProperty(value = "properties.endpoints")
private List<EndpointInner> 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.
*
Expand Down Expand Up @@ -153,4 +163,24 @@ public ProfileInner withEndpoints(List<EndpointInner> 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;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Response<ResponseBody>> checkTrafficManagerRelativeDnsNameAvailability(@Body CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
Observable<Response<ResponseBody>> 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")
Expand Down Expand Up @@ -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();
}

Expand All @@ -114,7 +115,7 @@ public TrafficManagerNameAvailabilityInner checkTrafficManagerRelativeDnsNameAva
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<TrafficManagerNameAvailabilityInner> checkTrafficManagerRelativeDnsNameAvailabilityAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters, final ServiceCallback<TrafficManagerNameAvailabilityInner> serviceCallback) {
public ServiceFuture<TrafficManagerNameAvailabilityInner> checkTrafficManagerRelativeDnsNameAvailabilityAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters, final ServiceCallback<TrafficManagerNameAvailabilityInner> serviceCallback) {
return ServiceFuture.fromResponse(checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(parameters), serviceCallback);
}

Expand All @@ -125,7 +126,7 @@ public ServiceFuture<TrafficManagerNameAvailabilityInner> checkTrafficManagerRel
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the TrafficManagerNameAvailabilityInner object
*/
public Observable<TrafficManagerNameAvailabilityInner> checkTrafficManagerRelativeDnsNameAvailabilityAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters) {
public Observable<TrafficManagerNameAvailabilityInner> checkTrafficManagerRelativeDnsNameAvailabilityAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) {
return checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(parameters).map(new Func1<ServiceResponse<TrafficManagerNameAvailabilityInner>, TrafficManagerNameAvailabilityInner>() {
@Override
public TrafficManagerNameAvailabilityInner call(ServiceResponse<TrafficManagerNameAvailabilityInner> response) {
Expand All @@ -141,7 +142,7 @@ public TrafficManagerNameAvailabilityInner call(ServiceResponse<TrafficManagerNa
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the TrafficManagerNameAvailabilityInner object
*/
public Observable<ServiceResponse<TrafficManagerNameAvailabilityInner>> checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters) {
public Observable<ServiceResponse<TrafficManagerNameAvailabilityInner>> checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) {
if (parameters == null) {
throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
}
Expand Down Expand Up @@ -238,7 +239,11 @@ public Observable<ServiceResponse<List<ProfileInner>>> listByResourceGroupWithSe
public Observable<ServiceResponse<List<ProfileInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<ProfileInner>> result = listByResourceGroupDelegate(response);
ServiceResponse<List<ProfileInner>> clientResponse = new ServiceResponse<List<ProfileInner>>(result.body().items(), result.response());
List<ProfileInner> items = null;
if (result.body() != null) {
items = result.body().items();
}
ServiceResponse<List<ProfileInner>> clientResponse = new ServiceResponse<List<ProfileInner>>(items, result.response());
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
Expand Down Expand Up @@ -315,7 +320,11 @@ public Observable<ServiceResponse<List<ProfileInner>>> listWithServiceResponseAs
public Observable<ServiceResponse<List<ProfileInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<ProfileInner>> result = listDelegate(response);
ServiceResponse<List<ProfileInner>> clientResponse = new ServiceResponse<List<ProfileInner>>(result.body().items(), result.response());
List<ProfileInner> items = null;
if (result.body() != null) {
items = result.body().items();
}
ServiceResponse<List<ProfileInner>> clientResponse = new ServiceResponse<List<ProfileInner>>(items, result.response());
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}
Loading