diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/GroupableResource.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/GroupableResource.java
index 2049a7538139e..be337f64e8e91 100644
--- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/GroupableResource.java
+++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/GroupableResource.java
@@ -8,6 +8,7 @@
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.resources.ResourceGroup;
+import com.microsoft.azure.management.resources.fluentcore.arm.Region;
import com.microsoft.azure.management.resources.fluentcore.model.Creatable;
/**
@@ -23,10 +24,11 @@ public interface GroupableResource extends Resource {
/**
* Grouping of all the definition stages.
*/
-
interface DefinitionStages {
/**
* A resource definition allowing a resource group to be selected.
+ *
+ * Region of the groupable resource will be used for new resource group
*
* @param the next stage of the resource definition
*/
@@ -36,11 +38,25 @@ interface WithGroup extends
}
/**
- * A resource definition allowing a new resource group to be created.
+ * A resource definition allowing a resource group to be selected.
+ *
+ * Region has to be specified explicitly to create a new resource group
*
* @param the next stage of the resource definition
*/
- interface WithNewResourceGroup {
+ interface WithGroupAndRegion extends
+ WithExistingResourceGroup,
+ WithNewResourceGroupWithRegion {
+ }
+
+ /**
+ * A resource definition allowing a new resource group to be created in the same
+ * region as groupable resource.
+ *
+ * @param the next stage of the resource definition
+ */
+ interface WithNewResourceGroup extends
+ WithCreatableResourceGroup {
/**
* Creates a new resource group to put the resource in.
*
@@ -58,7 +74,45 @@ interface WithNewResourceGroup {
* @return the next stage of the resource definition
*/
T withNewResourceGroup();
+ }
+
+ /**
+ * A resource definition allowing a new resource group to be created in a different
+ * region .
+ *
+ * @param the next stage of the resource definition
+ */
+ interface WithNewResourceGroupWithRegion extends
+ WithCreatableResourceGroup {
+ /**
+ * Creates a new resource group to put the resource in.
+ *
+ * The group will be created in the same location as the resource.
+ *
+ * @param name the name of the new group
+ * @param region the region where resource group needs to be created
+ * @return the next stage of the resource definition
+ */
+ T withNewResourceGroup(String name, Region region);
+ /**
+ * Creates a new resource group to put the resource in.
+ *
+ * The group will be created in the same location as the resource.
+ * The group's name is automatically derived from the resource's name.
+ *
+ * @param region the region where resource group needs to be created
+ * @return the next stage of the resource definition
+ */
+ T withNewResourceGroup(Region region);
+ }
+
+ /**
+ * A resource definition allowing a new creatable resource group to be specified.
+ *
+ * @param the next stage of the resource definition
+ */
+ interface WithCreatableResourceGroup {
/**
* Creates a new resource group to put the resource in, based on the definition specified.
* @param groupDefinition a creatable definition for a new resource group
diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/implementation/GroupableResourceImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/implementation/GroupableResourceImpl.java
index daa5fb6332fd8..ddf2388b6ee23 100644
--- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/implementation/GroupableResourceImpl.java
+++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/implementation/GroupableResourceImpl.java
@@ -7,6 +7,7 @@
package com.microsoft.azure.management.resources.fluentcore.arm.models.implementation;
import com.microsoft.azure.management.resources.ResourceGroup;
+import com.microsoft.azure.management.resources.fluentcore.arm.Region;
import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils;
import com.microsoft.azure.management.resources.fluentcore.arm.implementation.ManagerBase;
import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource;
@@ -82,6 +83,20 @@ public final FluentModelImplT withNewResourceGroup(String groupName) {
this.myManager.resourceManager().resourceGroups().define(groupName).withRegion(this.regionName()));
}
+ /**
+ * Creates a new resource group to put the resource in.
+ *
+ * The group will be created in the same location as the resource.
+ *
+ * @param groupName the name of the new group
+ * @param region the region where resource group needs to be created
+ * @return the next stage of the resource definition
+ */
+ public final FluentModelImplT withNewResourceGroup(String groupName, Region region) {
+ return this.withNewResourceGroup(
+ this.myManager.resourceManager().resourceGroups().define(groupName).withRegion(region));
+ }
+
/**
* Creates a new resource group to put the resource in.
*
@@ -93,6 +108,19 @@ public final FluentModelImplT withNewResourceGroup() {
return this.withNewResourceGroup(this.name() + "group");
}
+ /**
+ * Creates a new resource group to put the resource in.
+ *
+ * The group will be created in the same location as the resource.
+ * The group's name is automatically derived from the resource's name.
+ *
+ * @param region the region where resource group needs to be created
+ * @return the next stage of the resource definition
+ */
+ public final FluentModelImplT withNewResourceGroup(Region region) {
+ return this.withNewResourceGroup(this.name() + "group", region);
+ }
+
/**
* Creates a new resource group to put the resource in, based on the definition specified.
* @param creatable a creatable definition for a new resource group
diff --git a/azure-mgmt-trafficmanager/pom.xml b/azure-mgmt-trafficmanager/pom.xml
new file mode 100644
index 0000000000000..44335d5458d40
--- /dev/null
+++ b/azure-mgmt-trafficmanager/pom.xml
@@ -0,0 +1,136 @@
+
+
+ 4.0.0
+
+ com.microsoft.azure
+ azure-parent
+ 1.0.0-beta4-SNAPSHOT
+ ../pom.xml
+
+
+ azure-mgmt-trafficmanager
+ jar
+
+ Microsoft Azure SDK for Traffic Manager Management
+ This package contains Microsoft Azure Traffic Manager Management SDK.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ UTF-8
+
+
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+ 1.0.0-beta3
+
+
+ com.microsoft.azure
+ azure-mgmt-resources
+ 1.0.0-beta4-SNAPSHOT
+
+
+ junit
+ junit
+ test
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ 1.0.0-beta3
+ test
+
+
+ com.microsoft.azure
+ azure-mgmt-storage
+ 1.0.0-beta4-SNAPSHOT
+
+
+ com.microsoft.azure
+ api-annotations
+ 0.0.1
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+ /**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */]]>
+
+
+
+
+
+
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/CheckProfileDnsNameAvailabilityResult.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/CheckProfileDnsNameAvailabilityResult.java
new file mode 100644
index 0000000000000..3fd6ca0818b06
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/CheckProfileDnsNameAvailabilityResult.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+import com.microsoft.azure.management.trafficmanager.implementation.TrafficManagerNameAvailabilityInner;
+
+/**
+ * The {@link com.microsoft.azure.management.trafficmanager.TrafficManagerProfiles#checkDnsNameAvailability} action result.
+ */
+public class CheckProfileDnsNameAvailabilityResult {
+ private TrafficManagerNameAvailabilityInner inner;
+
+ /**
+ * Creates an instance of CheckProfileDnsNameAvailabilityResult.
+ *
+ * @param inner the inner object
+ */
+ public CheckProfileDnsNameAvailabilityResult(TrafficManagerNameAvailabilityInner inner) {
+ this.inner = inner;
+ }
+
+ /**
+ * @return true if the DNS name is available to use, false if the name has already been taken
+ * or invalid and cannot be used.
+ */
+ public boolean isAvailable() {
+ return inner.nameAvailable();
+ }
+
+ /**
+ * @return the reason that the DNS name could not be used
+ */
+ public ProfileDnsNameUnavailableReason reason() {
+ return new ProfileDnsNameUnavailableReason(inner.reason());
+ }
+
+ /**
+ * @return an error message explaining the reason value in more detail
+ */
+ public String message() {
+ return inner.message();
+ }
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/DnsConfig.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/DnsConfig.java
new file mode 100644
index 0000000000000..d77a9d5789fec
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/DnsConfig.java
@@ -0,0 +1,98 @@
+/**
+ * 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;
+
+
+/**
+ * Class containing DNS settings in a Traffic Manager profile.
+ */
+public class DnsConfig {
+ /**
+ * Gets or sets the relative DNS name provided by this Traffic Manager
+ * profile. This value is combined with the DNS domain name used by
+ * Azure Traffic Manager to form the fully-qualified domain name (FQDN)
+ * of the profile.
+ */
+ private String relativeName;
+
+ /**
+ * Gets or sets the fully-qualified domain name (FQDN) of the Traffic
+ * Manager profile. This is formed from the concatenation of the
+ * RelativeName with the DNS domain used by Azure Traffic Manager.
+ */
+ private String fqdn;
+
+ /**
+ * Gets or sets the DNS Ttime-To-Live (TTL), in seconds. This informs the
+ * local DNS resolvers and DNS clients how long to cache DNS responses
+ * provided by this Traffic Manager profile.
+ */
+ private Long ttl;
+
+ /**
+ * Get the relativeName value.
+ *
+ * @return the relativeName value
+ */
+ public String relativeName() {
+ return this.relativeName;
+ }
+
+ /**
+ * Set the relativeName value.
+ *
+ * @param relativeName the relativeName value to set
+ * @return the DnsConfig object itself.
+ */
+ public DnsConfig withRelativeName(String relativeName) {
+ this.relativeName = relativeName;
+ return this;
+ }
+
+ /**
+ * Get the fqdn value.
+ *
+ * @return the fqdn value
+ */
+ public String fqdn() {
+ return this.fqdn;
+ }
+
+ /**
+ * Set the fqdn value.
+ *
+ * @param fqdn the fqdn value to set
+ * @return the DnsConfig object itself.
+ */
+ public DnsConfig withFqdn(String fqdn) {
+ this.fqdn = fqdn;
+ return this;
+ }
+
+ /**
+ * Get the ttl value.
+ *
+ * @return the ttl value
+ */
+ public Long ttl() {
+ return this.ttl;
+ }
+
+ /**
+ * Set the ttl value.
+ *
+ * @param ttl the ttl value to set
+ * @return the DnsConfig object itself.
+ */
+ public DnsConfig withTtl(Long ttl) {
+ this.ttl = ttl;
+ return this;
+ }
+
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/EndpointMonitorStatus.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/EndpointMonitorStatus.java
new file mode 100644
index 0000000000000..416d4c309df07
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/EndpointMonitorStatus.java
@@ -0,0 +1,67 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+/**
+ * Traffic manager profile endpoint monitor statuses.
+ */
+public class EndpointMonitorStatus {
+ /** Static value Inactive for EndpointMonitorStatus. */
+ public static final EndpointMonitorStatus INACTIVE = new EndpointMonitorStatus("Inactive");
+
+ /** Static value Disabled for EndpointMonitorStatus. */
+ public static final EndpointMonitorStatus DISABLED = new EndpointMonitorStatus("Disabled");
+
+ /** Static value Online for EndpointMonitorStatus. */
+ public static final EndpointMonitorStatus ONLINE = new EndpointMonitorStatus("Online");
+
+ /** Static value Degraded for EndpointMonitorStatus. */
+ public static final EndpointMonitorStatus DEGRADED = new EndpointMonitorStatus("Degraded");
+
+ /** Static value CheckingEndpoint for EndpointMonitorStatus. */
+ public static final EndpointMonitorStatus CHECKING_ENDPOINT = new EndpointMonitorStatus("CheckingEndpoint");
+
+ /** Static value Stopped for EndpointMonitorStatus. */
+ public static final EndpointMonitorStatus STOPPED = new EndpointMonitorStatus("Stopped");
+
+ private String value;
+
+ /**
+ * Creates EndpointMonitorStatus.
+ *
+ * @param value the status
+ */
+ public EndpointMonitorStatus(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @Override
+ public int hashCode() {
+ return this.value.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ String value = this.toString();
+ if (!(obj instanceof EndpointMonitorStatus)) {
+ return false;
+ }
+ if (obj == this) {
+ return true;
+ }
+ EndpointMonitorStatus rhs = (EndpointMonitorStatus) obj;
+ if (value == null) {
+ return rhs.value == null;
+ } else {
+ return value.equals(rhs.value);
+ }
+ }
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/EndpointType.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/EndpointType.java
new file mode 100644
index 0000000000000..4aa0f709a5e25
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/EndpointType.java
@@ -0,0 +1,63 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+/**
+ * Possible endpoint types supported in a Traffic manager profile.
+ */
+public enum EndpointType {
+ /**
+ * Enum value Microsoft.Network/trafficManagerProfiles/azureEndpoints.
+ */
+ AZURE("Microsoft.Network/trafficManagerProfiles/azureEndpoints"),
+
+ /**
+ * Enum value Microsoft.Network/trafficManagerProfiles/externalEndpoints.
+ */
+ EXTERNAL("Microsoft.Network/trafficManagerProfiles/externalEndpoints"),
+
+ /**
+ * Enum value Microsoft.Network/trafficManagerProfiles/nestedEndpoints.
+ */
+ NESTED_PROFILE("Microsoft.Network/trafficManagerProfiles/nestedEndpoints");
+
+ private String value;
+
+ EndpointType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a string value to a TrafficRoutingMethod instance.
+ *
+ * @param value the string value to parse.
+ * @return the parsed TrafficRoutingMethod object, or null if unable to parse.
+ */
+ public static EndpointType fromValue(String value) {
+ EndpointType[] items = EndpointType.values();
+ for (EndpointType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ /**
+ * @return the local name of the endpoint type
+ */
+ public String localName() {
+ if (this.value != null) {
+ return this.value.substring(this.value.lastIndexOf('/') + 1);
+ }
+ return null;
+ }
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/MonitorConfig.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/MonitorConfig.java
new file mode 100644
index 0000000000000..d043abc9269ff
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/MonitorConfig.java
@@ -0,0 +1,119 @@
+/**
+ * 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;
+
+
+/**
+ * Class containing endpoint monitoring settings in a Traffic Manager profile.
+ */
+public class MonitorConfig {
+ /**
+ * Gets or sets the profile-level monitoring status of the Traffic Manager
+ * profile.
+ */
+ private String profileMonitorStatus;
+
+ /**
+ * Gets or sets the protocol (HTTP or HTTPS) used to probe for endpoint
+ * health.
+ */
+ private String protocol;
+
+ /**
+ * Gets or sets the TCP port used to probe for endpoint health.
+ */
+ private Long port;
+
+ /**
+ * Gets or sets the path relative to the endpoint domain name used to
+ * probe for endpoint health.
+ */
+ private String path;
+
+ /**
+ * Get the profileMonitorStatus value.
+ *
+ * @return the profileMonitorStatus value
+ */
+ public String profileMonitorStatus() {
+ return this.profileMonitorStatus;
+ }
+
+ /**
+ * Set the profileMonitorStatus value.
+ *
+ * @param profileMonitorStatus the profileMonitorStatus value to set
+ * @return the MonitorConfig object itself.
+ */
+ public MonitorConfig withProfileMonitorStatus(String profileMonitorStatus) {
+ this.profileMonitorStatus = profileMonitorStatus;
+ return this;
+ }
+
+ /**
+ * Get the protocol value.
+ *
+ * @return the protocol value
+ */
+ public String protocol() {
+ return this.protocol;
+ }
+
+ /**
+ * Set the protocol value.
+ *
+ * @param protocol the protocol value to set
+ * @return the MonitorConfig object itself.
+ */
+ public MonitorConfig withProtocol(String protocol) {
+ this.protocol = protocol;
+ return this;
+ }
+
+ /**
+ * Get the port value.
+ *
+ * @return the port value
+ */
+ public Long port() {
+ return this.port;
+ }
+
+ /**
+ * Set the port value.
+ *
+ * @param port the port value to set
+ * @return the MonitorConfig object itself.
+ */
+ public MonitorConfig withPort(Long port) {
+ this.port = port;
+ return this;
+ }
+
+ /**
+ * Get the path value.
+ *
+ * @return the path value
+ */
+ public String path() {
+ return this.path;
+ }
+
+ /**
+ * Set the path value.
+ *
+ * @param path the path value to set
+ * @return the MonitorConfig object itself.
+ */
+ public MonitorConfig withPath(String path) {
+ this.path = path;
+ return this;
+ }
+
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/ProfileDnsNameUnavailableReason.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/ProfileDnsNameUnavailableReason.java
new file mode 100644
index 0000000000000..3486e439fc6e7
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/ProfileDnsNameUnavailableReason.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+/**
+ * The reason for unavailability of traffic manager profile DNS name.
+ */
+public class ProfileDnsNameUnavailableReason {
+ /** Static value Invalid for ProfileDnsNameUnavailableReason. */
+ public static final ProfileDnsNameUnavailableReason INVALID = new ProfileDnsNameUnavailableReason("Invalid");
+
+ /** Static value AlreadyExists for ProfileDnsNameUnavailableReason. */
+ public static final ProfileDnsNameUnavailableReason ALREADYEXISTS = new ProfileDnsNameUnavailableReason("AlreadyExists");
+
+ private String value;
+
+ /**
+ * Creates ProfileDnsNameUnavailableReason.
+ *
+ * @param value the reason
+ */
+ public ProfileDnsNameUnavailableReason(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @Override
+ public int hashCode() {
+ return this.value.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ String value = this.toString();
+ if (!(obj instanceof ProfileDnsNameUnavailableReason)) {
+ return false;
+ }
+ if (obj == this) {
+ return true;
+ }
+ ProfileDnsNameUnavailableReason rhs = (ProfileDnsNameUnavailableReason) obj;
+ if (value == null) {
+ return rhs.value == null;
+ } else {
+ return value.equals(rhs.value);
+ }
+ }
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/ProfileMonitorStatus.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/ProfileMonitorStatus.java
new file mode 100644
index 0000000000000..7d4163280255a
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/ProfileMonitorStatus.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+/**
+ * Traffic manager profile statuses.
+ */
+public class ProfileMonitorStatus {
+ /** Static value Inactive for ProfileMonitorStatus. */
+ public static final ProfileMonitorStatus INACTIVE = new ProfileMonitorStatus("Inactive");
+
+ /** Static value Disabled for ProfileMonitorStatus. */
+ public static final ProfileMonitorStatus DISABLED = new ProfileMonitorStatus("Disabled");
+
+ /** Static value Online for ProfileMonitorStatus. */
+ public static final ProfileMonitorStatus ONLINE = new ProfileMonitorStatus("Online");
+
+ /** Static value Degraded for ProfileMonitorStatus. */
+ public static final ProfileMonitorStatus DEGRADED = new ProfileMonitorStatus("Degraded");
+
+ /** Static value CheckingEndpoint for ProfileMonitorStatus. */
+ public static final ProfileMonitorStatus CHECKING_ENDPOINT = new ProfileMonitorStatus("CheckingEndpoint");
+
+ private String value;
+
+ /**
+ * Creates ProfileMonitorStatus.
+ *
+ * @param value the status
+ */
+ public ProfileMonitorStatus(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @Override
+ public int hashCode() {
+ return this.value.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ String value = this.toString();
+ if (!(obj instanceof ProfileMonitorStatus)) {
+ return false;
+ }
+ if (obj == this) {
+ return true;
+ }
+ ProfileMonitorStatus rhs = (ProfileMonitorStatus) obj;
+ if (value == null) {
+ return rhs.value == null;
+ } else {
+ return value.equals(rhs.value);
+ }
+ }
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TargetAzureResourceType.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TargetAzureResourceType.java
new file mode 100644
index 0000000000000..68f3046dc1b35
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TargetAzureResourceType.java
@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+/**
+ * Target Azure resource types supported for an Azure endpoint in a traffic manager profile.
+ */
+public class TargetAzureResourceType {
+ /** Static value Microsoft.Network/publicIPAddresses for TargetAzureResourceType. */
+ public static final TargetAzureResourceType PUBLICIP = new TargetAzureResourceType("Microsoft.Network", "publicIPAddresses");
+
+ /** Static value Microsoft.Web/sites for TargetAzureResourceType. */
+ public static final TargetAzureResourceType WEBAPP = new TargetAzureResourceType("Microsoft.Web", "sites");
+
+ /** Static value Microsoft.ClassicCompute/domainNames for TargetAzureResourceType. */
+ public static final TargetAzureResourceType CLOUDSERVICE = new TargetAzureResourceType("Microsoft.ClassicCompute", "domainNames");
+
+ private String value;
+
+ /**
+ * Creates TargetAzureResourceType.
+ *
+ * @param resourceProviderName the resource provider name
+ * @param resourceType the resource type
+ */
+ public TargetAzureResourceType(String resourceProviderName, String resourceType) {
+ this.value = resourceProviderName + "/" + resourceType;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @Override
+ public int hashCode() {
+ return this.value.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ String value = this.toString();
+ if (!(obj instanceof TargetAzureResourceType)) {
+ return false;
+ }
+ if (obj == this) {
+ return true;
+ }
+ TargetAzureResourceType rhs = (TargetAzureResourceType) obj;
+ if (value == null) {
+ return rhs.value == null;
+ } else {
+ return value.equals(rhs.value);
+ }
+ }
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerAzureEndpoint.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerAzureEndpoint.java
new file mode 100644
index 0000000000000..2a94e6df6f04c
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerAzureEndpoint.java
@@ -0,0 +1,21 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+/**
+ * An immutable client-side representation of an Azure traffic manager profile Azure endpoint.
+ */
+public interface TrafficManagerAzureEndpoint extends TrafficManagerEndpoint {
+ /**
+ * @return the resource id of the target Azure resource.
+ */
+ String targetAzureResourceId();
+
+ /**
+ * @return the type of the target Azure resource.
+ */
+ TargetAzureResourceType targetResourceType();
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerEndpoint.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerEndpoint.java
new file mode 100644
index 0000000000000..c6da223646d4d
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerEndpoint.java
@@ -0,0 +1,612 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+import com.microsoft.azure.management.apigeneration.Fluent;
+import com.microsoft.azure.management.resources.fluentcore.arm.Region;
+import com.microsoft.azure.management.resources.fluentcore.arm.models.ExternalChildResource;
+import com.microsoft.azure.management.resources.fluentcore.model.Attachable;
+import com.microsoft.azure.management.resources.fluentcore.model.Settable;
+import com.microsoft.azure.management.resources.fluentcore.model.Wrapper;
+import com.microsoft.azure.management.trafficmanager.implementation.EndpointInner;
+
+/**
+ * An immutable client-side representation of an Azure traffic manager profile endpoint.
+ */
+@Fluent
+public interface TrafficManagerEndpoint extends
+ ExternalChildResource,
+ Wrapper {
+ /**
+ * @return the endpoint type
+ */
+ EndpointType endpointType();
+
+ /**
+ * @return the monitor status of the endpoint
+ */
+ EndpointMonitorStatus monitorStatus();
+
+ /**
+ * @return true if the endpoint is enabled, false otherwise
+ */
+ boolean isEnabled();
+
+ /**
+ * @return the weight of the endpoint which is used when traffic manager profile is configured with
+ * Weighted traffic-routing method
+ */
+ int routingWeight();
+
+ /**
+ * @return the priority of the endpoint which is used when traffic manager profile is configured with
+ * Priority traffic-routing method
+ */
+ int routingPriority();
+
+ /**
+ * The entirety of a traffic manager profile endpoint definition as a part of parent definition.
+ *
+ * @param the return type of the final {@link Attachable#attach()}
+ */
+ interface Definition extends
+ DefinitionStages.AzureTargetEndpointBlank,
+ DefinitionStages.ExternalTargetEndpointBlank,
+ DefinitionStages.NestedProfileTargetEndpointBlank,
+ DefinitionStages.WithAzureResource,
+ DefinitionStages.WithFqdn,
+ DefinitionStages.WithSourceTrafficRegion,
+ DefinitionStages.WithSourceTrafficRegionThenThreshold,
+ DefinitionStages.WithEndpointThreshold,
+ DefinitionStages.WithAttach {
+ }
+
+ /**
+ * Grouping of traffic manager profile endpoint definition stages as a part of parent traffic manager
+ * profile definition.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a traffic manager profile Azure endpoint definition.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface AzureTargetEndpointBlank extends WithAzureResource {
+ }
+
+ /**
+ * The first stage of a traffic manager profile external endpoint definition.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface ExternalTargetEndpointBlank extends WithFqdn {
+ }
+
+ /**
+ * The first stage of a traffic manager profile nested profile endpoint definition.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface NestedProfileTargetEndpointBlank extends WithNestedProfile {
+ }
+
+ /**
+ * The stage of the traffic manager profile Azure endpoint definition allowing to specify the ID
+ * of the target Azure resource.
+ *
+ * @param the return type of {@link UpdateDefinitionStages.WithAttach#attach()}
+ */
+ interface WithAzureResource {
+ /**
+ * Specifies the resource ID of an Azure resource.
+ *
+ * supported Azure resources are cloud service, web app or public ip
+ *
+ * @param resourceId the Azure resource id
+ * @return the next stage of the definition
+ */
+ WithAttach toResourceId(String resourceId);
+ }
+
+ /**
+ * The stage of the traffic manager profile external endpoint definition allowing to specify
+ * the FQDN.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithFqdn {
+ /**
+ * Specifies the FQDN of an external endpoint.
+ *
+ * @param externalFqdn the external FQDN
+ * @return the next stage of the endpoint definition
+ */
+ WithSourceTrafficRegion toFqdn(String externalFqdn);
+ }
+
+ /**
+ * The stage of the traffic manager endpoint definition allowing to specify the location of the external
+ * endpoint.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithSourceTrafficRegion {
+ /**
+ * Specifies the location of the endpoint that will be used when the parent profile is configured with
+ * Performance routing method {@link TrafficRoutingMethod#PERFORMANCE}.
+ *
+ * @param region the location
+ * @return the next stage of the endpoint definition
+ */
+ WithAttach fromRegion(Region region);
+ }
+
+ /**
+ * The stage of the traffic manager nested profile endpoint definition allowing to specify the profile.
+ *
+ * @param the return type of {@link UpdateDefinitionStages.WithAttach#attach()}
+ */
+ interface WithNestedProfile {
+ /**
+ * Specifies a nested traffic manager profile for the endpoint.
+ *
+ * @param profile the nested traffic manager profile
+ * @return the next stage of the definition
+ */
+ WithSourceTrafficRegionThenThreshold toProfile(TrafficManagerProfile profile);
+ }
+
+ /**
+ * The stage of the traffic manager endpoint definition allowing to specify the location of the nested
+ * profile endpoint.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithSourceTrafficRegionThenThreshold {
+ /**
+ * Specifies the location of the endpoint that will be used when the parent profile is configured with
+ * Performance routing method {@link TrafficRoutingMethod#PERFORMANCE}.
+ *
+ * @param region the location
+ * @return the next stage of the endpoint definition
+ */
+ WithEndpointThreshold fromRegion(Region region);
+ }
+
+ /**
+ * The stage of the nested traffic manager profile endpoint definition allowing to specify the minimum
+ * endpoints to be online in the nested profile to consider it as not degraded.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithEndpointThreshold extends WithAttach {
+ /**
+ * Specifies the minimum number of endpoints to be online for the nested profile to be considered healthy.
+ *
+ * @param count the number of endpoints
+ * @return the next stage of the endpoint definition
+ */
+ WithAttach withMinimumEndpointsToEnableTraffic(int count);
+ }
+
+ /**
+ * The stage of the traffic manager endpoint definition allowing to specify the endpoint weight.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithRoutingWeight {
+ /**
+ * Specifies the weight for the endpoint that will be used when the parent profile is configured with
+ * Weighted routing method {@link TrafficRoutingMethod#WEIGHTED}.
+ *
+ * @param weight the endpoint weight
+ * @return the next stage of the endpoint definition
+ */
+ WithAttach withRoutingWeight(int weight);
+ }
+
+ /**
+ * The stage of the traffic manager endpoint definition allowing to specify the endpoint priority.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithRoutingPriority {
+ /**
+ * Specifies the priority for the endpoint that will be used when the parent profile is configured with
+ * Priority routing method {@link TrafficRoutingMethod#PRIORITY}.
+ *
+ * @param priority the endpoint priority
+ * @return the next stage of the endpoint definition
+ */
+ WithAttach withRoutingPriority(int priority);
+ }
+
+ /**
+ * The stage of the traffic manager endpoint definition allowing to disable the endpoint.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithTrafficDisabled {
+ /**
+ * Specifies that this endpoint should be excluded from receiving traffic.
+ *
+ * @return the next stage of the endpoint definition
+ */
+ WithAttach withTrafficDisabled();
+ }
+
+ /** The final stage of the traffic manager profile endpoint definition.
+ *
+ * At this stage, any remaining optional settings can be specified, or the traffic manager profile endpoint
+ * definition can be attached to the parent traffic manager profile definition using {@link TrafficManagerEndpoint.DefinitionStages.WithAttach#attach()}.
+ * @param the return type of {@link TrafficManagerEndpoint.DefinitionStages.WithAttach#attach()}
+ */
+ interface WithAttach extends
+ Attachable.InDefinition,
+ DefinitionStages.WithRoutingWeight,
+ DefinitionStages.WithRoutingPriority,
+ DefinitionStages.WithTrafficDisabled {
+ }
+ }
+
+ /**
+ * The entirety of a traffic manager profile endpoint definition as a part of parent update.
+ *
+ * @param the return type of the final {@link Attachable#attach()}
+ */
+ interface UpdateDefinition extends
+ UpdateDefinitionStages.AzureTargetEndpointBlank,
+ UpdateDefinitionStages.ExternalTargetEndpointBlank,
+ UpdateDefinitionStages.NestedProfileTargetEndpointBlank,
+ UpdateDefinitionStages.WithAzureResource,
+ UpdateDefinitionStages.WithFqdn,
+ UpdateDefinitionStages.WithSourceTrafficRegion,
+ UpdateDefinitionStages.WithSourceTrafficRegionThenThreshold,
+ UpdateDefinitionStages.WithEndpointThreshold,
+ UpdateDefinitionStages.WithAttach {
+ }
+
+ /**
+ * Grouping of traffic manager profile endpoint definition stages as a part of parent traffic manager
+ * profile update.
+ */
+ interface UpdateDefinitionStages {
+ /**
+ * The first stage of a traffic manager profile Azure endpoint definition.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface AzureTargetEndpointBlank extends WithAzureResource {
+ }
+
+ /**
+ * The first stage of a traffic manager profile external endpoint definition.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface ExternalTargetEndpointBlank extends WithFqdn {
+ }
+
+ /**
+ * The first stage of a traffic manager profile nested profile endpoint definition.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface NestedProfileTargetEndpointBlank extends WithNestedProfile {
+ }
+
+ /**
+ * The stage of the traffic manager profile Azure endpoint definition allowing to specify the ID
+ * of the target Azure resource.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithAzureResource {
+ /**
+ * Specifies the resource ID of an Azure resource.
+ *
+ * supported Azure resources are cloud service, web app or public ip
+ *
+ * @param resourceId the Azure resource id
+ * @return the next stage of the definition
+ */
+ WithAttach toResourceId(String resourceId);
+ }
+
+ /**
+ * The stage of the traffic manager profile external endpoint definition allowing to specify
+ * the FQDN.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithFqdn {
+ /**
+ * Specifies the FQDN of an external endpoint.
+ *
+ * @param externalFqdn the external FQDN
+ * @return the next stage of the endpoint definition
+ */
+ WithSourceTrafficRegion toFqdn(String externalFqdn);
+ }
+
+ /**
+ * The stage of the traffic manager endpoint definition allowing to specify the location of the external
+ * endpoint.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithSourceTrafficRegion {
+ /**
+ * Specifies the location of the endpoint that will be used when the parent profile is configured with
+ * Performance routing method {@link TrafficRoutingMethod#PERFORMANCE}.
+ *
+ * @param region the location
+ * @return the next stage of the endpoint definition
+ */
+ WithAttach fromRegion(Region region);
+ }
+
+ /**
+ * The stage of the traffic manager nested profile endpoint definition allowing to specify the profile.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithNestedProfile {
+ /**
+ * Specifies a nested traffic manager profile for the endpoint.
+ *
+ * @param profile the nested traffic manager profile
+ * @return the next stage of the definition
+ */
+ WithSourceTrafficRegionThenThreshold toProfile(TrafficManagerProfile profile);
+ }
+
+ /**
+ * The stage of the traffic manager endpoint definition allowing to specify the location of the nested
+ * endpoint.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithSourceTrafficRegionThenThreshold {
+ /**
+ * Specifies the location of the endpoint that will be used when the parent profile is configured with
+ * Performance routing method {@link TrafficRoutingMethod#PERFORMANCE}.
+ *
+ * @param region the location
+ * @return the next stage of the endpoint definition
+ */
+ WithEndpointThreshold fromRegion(Region region);
+ }
+
+ /**
+ * The stage of the nested traffic manager profile endpoint definition allowing to specify the minimum
+ * endpoints to be online in the nested profile to consider it as not degraded.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithEndpointThreshold extends WithAttach {
+ /**
+ * Specifies the minimum number of endpoints to be online for the nested profile to be considered healthy.
+ *
+ * @param count the number of endpoints
+ * @return the next stage of the endpoint definition
+ */
+ WithAttach withMinimumEndpointsToEnableTraffic(int count);
+ }
+
+ /**
+ * The stage of the traffic manager endpoint definition allowing to specify the endpoint weight.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithRoutingWeight {
+ /**
+ * Specifies the weight for the endpoint that will be used when the weight-based routing method
+ * {@link TrafficRoutingMethod#WEIGHTED} is enabled on the profile.
+ *
+ * @param weight the endpoint weight
+ * @return the next stage of the definition
+ */
+ WithAttach withRoutingWeight(int weight);
+ }
+
+ /**
+ * The stage of the traffic manager endpoint definition allowing to specify the endpoint priority.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithRoutingPriority {
+ /**
+ * Specifies the weight for the endpoint that will be used when priority-based routing method
+ * is {@link TrafficRoutingMethod#PRIORITY} enabled on the profile.
+ *
+ * @param priority
+ * @return the next stage of the definition
+ */
+ WithAttach withRoutingPriority(int priority);
+ }
+
+ /**
+ * The stage of the traffic manager endpoint definition allowing to disable the endpoint.
+ *
+ * @param the return type of {@link WithAttach#attach()}
+ */
+ interface WithTrafficDisabled {
+ /**
+ * Specifies that this endpoint should be excluded from receiving traffic.
+ *
+ * @return the next stage of the definition
+ */
+ WithAttach withTrafficDisabled();
+ }
+
+ /** The final stage of the traffic manager profile endpoint definition.
+ *
+ * At this stage, any remaining optional settings can be specified, or the traffic manager profile endpoint
+ * definition can be attached to the parent traffic manager profile update using {@link TrafficManagerEndpoint.DefinitionStages.WithAttach#attach()}.
+ * @param the return type of {@link TrafficManagerEndpoint.DefinitionStages.WithAttach#attach()}
+ */
+ interface WithAttach extends
+ Attachable.InUpdate,
+ UpdateDefinitionStages.WithRoutingWeight,
+ UpdateDefinitionStages.WithRoutingPriority,
+ UpdateDefinitionStages.WithTrafficDisabled {
+ }
+ }
+
+ /**
+ * The entirety of an Azure endpoint update as a part of parent traffic manager profile profile update.
+ */
+ interface UpdateAzureEndpoint extends
+ UpdateStages.WithAzureResource,
+ Update {
+ }
+
+ /**
+ * The entirety of an external endpoint update as a part of parent traffic manager profile profile update.
+ */
+ interface UpdateExternalEndpoint extends
+ UpdateStages.WithFqdn,
+ UpdateStages.WithSourceTrafficRegion,
+ Update {
+ }
+
+ /**
+ * The entirety of a nested profile endpoint update as a part of parent traffic manager profile profile update.
+ */
+ interface UpdateNestedProfileEndpoint extends
+ UpdateStages.WithNestedProfileConfig,
+ UpdateStages.WithSourceTrafficRegion,
+ Update {
+ }
+
+ /**
+ * the set of configurations that can be updated for all endpoint irrespective of their type (Azure, external, nested profile).
+ */
+ interface Update extends
+ Settable,
+ UpdateStages.WithRoutingWeight,
+ UpdateStages.WithRoutingPriority,
+ UpdateStages.WithTrafficDisabledOrEnabled {
+ }
+
+ /**
+ * Grouping of traffic manager profile endpoint update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of an Azure endpoint update allowing to specify the target Azure resource.
+ */
+ interface WithAzureResource {
+ /**
+ * Specifies the resource ID of an Azure resource.
+ *
+ * supported Azure resources are cloud service, web app or public ip
+ *
+ * @param resourceId the Azure resource id
+ * @return the next stage of the update
+ */
+ Update toResourceId(String resourceId);
+ }
+
+ /**
+ * The stage of an external endpoint update allowing to specify the FQDN.
+ */
+ interface WithFqdn {
+ /**
+ * Specifies the FQDN of an external endpoint that is not hosted in Azure.
+ *
+ * @param externalFqdn the external FQDN
+ * @return the next stage of the endpoint update
+ */
+ UpdateExternalEndpoint toFqdn(String externalFqdn);
+ }
+
+ /**
+ * The stage of an nested profile endpoint update allowing to specify profile and
+ * minimum child endpoint.
+ */
+ interface WithNestedProfileConfig {
+ /**
+ * Specifies a nested traffic manager profile for the endpoint.
+ *
+ * @param nestedProfile the nested traffic manager profile
+ * @return the next stage of the update
+ */
+ UpdateNestedProfileEndpoint toProfile(TrafficManagerProfile nestedProfile);
+
+ /**
+ * Specifies the minimum number of endpoints to be online for the nested profile to be considered healthy.
+ *
+ * @param count number of endpoints
+ * @return the next stage of the endpoint update
+ */
+ UpdateNestedProfileEndpoint withMinimumEndpointsToEnableTraffic(int count);
+ }
+
+ /**
+ * The stage of the traffic manager endpoint update allowing to specify the location of the external
+ * or nested profile endpoints.
+ */
+ interface WithSourceTrafficRegion {
+ /**
+ * Specifies the region of the endpoint that will be used when the performance-based routing method
+ * {@link TrafficRoutingMethod#PERFORMANCE} is enabled on the profile.
+ *
+ * @param location the location
+ * @return the next stage of the endpoint update
+ */
+ Update fromRegion(Region location);
+ }
+
+ /**
+ * The stage of the traffic manager profile endpoint update allowing to specify the endpoint weight.
+ */
+ interface WithRoutingWeight {
+ /**
+ * Specifies the weight for the endpoint that will be used when the weight-based routing method
+ * {@link TrafficRoutingMethod#WEIGHTED} is enabled on the profile.
+ *
+ * @param weight the endpoint weight
+ * @return the next stage of the update
+ */
+ Update withRoutingWeight(int weight);
+ }
+
+ /**
+ * The stage of the traffic manager profile endpoint update allowing to specify the endpoint priority.
+ */
+ interface WithRoutingPriority {
+ /**
+ * Specifies the weight for the endpoint that will be used when priority-based routing method
+ * is {@link TrafficRoutingMethod#PRIORITY} enabled on the profile.
+ *
+ * @param priority the endpoint priority
+ * @return the next stage of the update
+ */
+ Update withRoutingPriority(int priority);
+ }
+
+ /**
+ * The stage of the traffic manager profile endpoint update allowing to enable or disable it.
+ */
+ interface WithTrafficDisabledOrEnabled {
+ /**
+ * Specifies that the endpoint should be excluded from receiving traffic.
+ *
+ * @return the next stage of the update
+ */
+ Update withTrafficDisabled();
+
+ /**
+ * Specifies that the endpoint should receive the traffic.
+ *
+ * @return the next stage of the update
+ */
+ Update withTrafficEnabled();
+ }
+ }
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerExternalEndpoint.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerExternalEndpoint.java
new file mode 100644
index 0000000000000..0a782c7dba422
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerExternalEndpoint.java
@@ -0,0 +1,23 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+import com.microsoft.azure.management.resources.fluentcore.arm.Region;
+
+/**
+ * An immutable client-side representation of an Azure traffic manager profile external endpoint.
+ */
+public interface TrafficManagerExternalEndpoint extends TrafficManagerEndpoint {
+ /**
+ * @return the fully qualified DNS name of the external endpoint
+ */
+ String fqdn();
+
+ /**
+ * @return the location of the traffic that the endpoint handles
+ */
+ Region sourceTrafficLocation();
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerNestedProfileEndpoint.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerNestedProfileEndpoint.java
new file mode 100644
index 0000000000000..9701c66d7ebce
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerNestedProfileEndpoint.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+import com.microsoft.azure.management.resources.fluentcore.arm.Region;
+
+/**
+ * An immutable client-side representation of an Azure traffic manager profile nested profile endpoint.
+ */
+public interface TrafficManagerNestedProfileEndpoint extends TrafficManagerEndpoint {
+ /**
+ * @return the nested traffic manager profile resource id
+ */
+ String nestedProfileId();
+
+ /**
+ * @return the number of child endpoints to be online to consider nested profile as healthy
+ */
+ int minimumChildEndpointCount();
+
+ /**
+ * @return the location of the traffic that the endpoint handles
+ */
+ Region sourceTrafficLocation();
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerProfile.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerProfile.java
new file mode 100644
index 0000000000000..991d2e72e3ded
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerProfile.java
@@ -0,0 +1,471 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+import com.microsoft.azure.management.apigeneration.Fluent;
+import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource;
+import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource;
+import com.microsoft.azure.management.resources.fluentcore.model.Appliable;
+import com.microsoft.azure.management.resources.fluentcore.model.Creatable;
+import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
+import com.microsoft.azure.management.resources.fluentcore.model.Updatable;
+import com.microsoft.azure.management.resources.fluentcore.model.Wrapper;
+import com.microsoft.azure.management.trafficmanager.implementation.ProfileInner;
+
+import java.util.Map;
+
+/**
+ * An immutable client-side representation of an Azure traffic manager profile.
+ */
+@Fluent
+public interface TrafficManagerProfile extends
+ GroupableResource,
+ Refreshable,
+ Wrapper,
+ Updatable {
+ /**
+ * @return the relative DNS name of the traffic manager profile
+ */
+ String dnsLabel();
+
+ /**
+ * @return fully qualified domain name (FQDN) of the traffic manager profile.
+ */
+ String fqdn();
+
+ /**
+ * @return the DNS Time-To-Live (TTL), in seconds
+ */
+ int timeToLive();
+
+ /**
+ * @return true if the traffic manager profile is enabled, false if enabled
+ */
+ boolean isEnabled();
+
+ /**
+ * @return the routing method used to route traffic to traffic manager profile endpoints
+ */
+ TrafficRoutingMethod trafficRoutingMethod();
+
+ /**
+ * @return profile monitor status which is combination of the endpoint monitor status values for all endpoints in
+ * the profile, and the configured profile status
+ */
+ ProfileMonitorStatus monitorStatus();
+
+ /**
+ * @return the port that is monitored to check the health of traffic manager profile endpoints
+ */
+ int monitoringPort();
+
+ /**
+ * @return the path that is monitored to check the health of traffic manager profile endpoints
+ */
+ String monitoringPath();
+
+ /**
+ *
+ * @return external endpoints in the traffic manager profile, indexed by the name
+ */
+ Map externalEndpoints();
+
+ /**
+ *
+ * @return Azure endpoints in the traffic manager profile, indexed by the name
+ */
+ Map azureEndpoints();
+
+ /**
+ *
+ * @return nested traffic manager profile endpoints in this traffic manager profile, indexed by the name
+ */
+ Map nestedProfileEndpoints();
+
+ /**
+ * The entirety of the traffic manager profile definition.
+ */
+ interface Definition extends
+ DefinitionStages.Blank,
+ DefinitionStages.WithLeafDomainLabel,
+ DefinitionStages.WithTrafficRoutingMethod,
+ DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of traffic manager profile definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The stage of the traffic manager profile definition allowing to specify the resource group.
+ */
+ interface Blank extends GroupableResource.DefinitionStages.WithGroupAndRegion {
+ }
+
+ /**
+ * The stage of the traffic manager profile definition allowing to specify the relative DNS name.
+ */
+ interface WithLeafDomainLabel {
+ /**
+ * Specify the relative DNS name of the profile.
+ *
+ * The fully qualified domain name (FQDN)
+ * will be constructed automatically by appending the rest of the domain to this label.
+ *
+ * @param dnsLabel the relative DNS name of the profile
+ * @return the next stage of the traffic manager profile definition
+ */
+ WithTrafficRoutingMethod withLeafDomainLabel(String dnsLabel);
+ }
+
+ /**
+ * The stage of the traffic manager profile definition allowing to specify the traffic routing method
+ * for the profile.
+ */
+ interface WithTrafficRoutingMethod {
+ /**
+ * Specify that end user traffic should be routed to the endpoint based on its priority
+ * i.e. use the endpoint with highest priority and if it is not available fallback to next highest
+ * priority endpoint.
+ *
+ * @return the next stage of the traffic manager profile definition
+ */
+ WithEndpoint withPriorityBasedRouting();
+
+ /**
+ * Specify that end user traffic should be distributed to the endpoints based on the weight assigned
+ * to the endpoint.
+ *
+ * @return the next stage of the traffic manager profile definition
+ */
+ WithEndpoint withWeightBasedRouting();
+
+ /**
+ * Specify that end user traffic should be routed based on the geographic location of the endpoint
+ * close to user.
+ *
+ * @return the next stage of the traffic manager profile definition
+ */
+ WithEndpoint withPerformanceBasedRouting();
+
+ /**
+ * Specify the traffic routing method for the profile.
+ *
+ * @param routingMethod the traffic routing method for the profile
+ * @return the next stage of the traffic manager profile definition
+ */
+ WithEndpoint withTrafficRoutingMethod(TrafficRoutingMethod routingMethod);
+ }
+
+ /**
+ * The stage of the traffic manager profile definition allowing to specify endpoint.
+ */
+ interface WithEndpoint {
+ /**
+ * Specifies definition of an Azure endpoint to be attached to the traffic manager profile.
+ *
+ * @param name the name for the endpoint
+ * @return the stage representing configuration for the endpoint
+ */
+ TrafficManagerEndpoint.DefinitionStages.AzureTargetEndpointBlank defineAzureTargetEndpoint(String name);
+
+ /**
+ * Specifies definition of an external endpoint to be attached to the traffic manager profile.
+ *
+ * @param name the name for the endpoint
+ * @return the stage representing configuration for the endpoint
+ */
+ TrafficManagerEndpoint.DefinitionStages.ExternalTargetEndpointBlank defineExternalTargetEndpoint(String name);
+
+ /**
+ * Specifies definition of an nested profile endpoint to be attached to the traffic manager profile.
+ *
+ * @param name the name for the endpoint
+ * @return the stage representing configuration for the endpoint
+ */
+ TrafficManagerEndpoint.DefinitionStages.NestedProfileTargetEndpointBlank defineNestedTargetEndpoint(String name);
+ }
+
+ /**
+ * The stage of the traffic manager profile definition allowing to specify the endpoint monitoring configuration.
+ */
+ interface WithMonitoringConfiguration {
+ /**
+ * Specify to use HTTP monitoring for the endpoints that checks for HTTP 200 response from the path '/'
+ * at regular intervals, using port 80.
+ *
+ * @return the next stage of the traffic manager profile definition
+ */
+ WithCreate withHttpMonitoring();
+
+ /**
+ * Specify to use HTTPS monitoring for the endpoints that checks for HTTPS 200 response from the path '/'
+ * at regular intervals, using port 443.
+ *
+ * @return the next stage of the traffic manager profile definition
+ */
+ WithCreate withHttpsMonitoring();
+
+ /**
+ * Specify the HTTP monitoring for the endpoints that checks for HTTP 200 response from the specified
+ * path at regular intervals, using the specified port.
+ *
+ * @param port the monitoring port
+ * @param path the monitoring path
+ * @return the next stage of the traffic manager profile definition
+ */
+ WithCreate withHttpMonitoring(int port, String path);
+
+ /**
+ * Specify the HTTPS monitoring for the endpoints that checks for HTTPS 200 response from the specified
+ * path at regular intervals, using the specified port.
+ *
+ * @param port the monitoring port
+ * @param path the monitoring path
+ * @return the next stage of the traffic manager profile definition
+ */
+ WithCreate withHttpsMonitoring(int port, String path);
+ }
+
+ /**
+ * The stage of the traffic manager profile definition allowing to specify the DNS TTL.
+ */
+ interface WithTtl {
+ /**
+ * Specify the DNS TTL in seconds.
+ *
+ * @param ttlInSeconds DNS TTL in seconds
+ * @return the next stage of the traffic manager profile definition
+ */
+ WithCreate withTimeToLive(int ttlInSeconds);
+ }
+
+ /**
+ * The stage of the traffic manager profile definition allowing to disable the profile.
+ */
+ interface WithProfileStatus {
+ /**
+ * Specify that the profile needs to be disabled.
+ *
+ * Disabling the profile will disables traffic to all endpoints in the profile
+ *
+ * @return the next stage of the traffic manager profile definition
+ */
+ WithCreate withProfileStatusDisabled();
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for the resource to be created
+ * (via {@link WithCreate#create()}), but also allows for any other optional settings to be specified.
+ */
+ interface WithCreate extends
+ Creatable,
+ Resource.DefinitionWithTags,
+ DefinitionStages.WithMonitoringConfiguration,
+ DefinitionStages.WithTtl,
+ DefinitionStages.WithProfileStatus,
+ DefinitionStages.WithEndpoint {
+ }
+ }
+
+ /**
+ * Grouping of traffic manager update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the traffic manager profile update allowing to specify the traffic routing method
+ * for the profile.
+ */
+ interface WithTrafficRoutingMethod {
+ /**
+ * Specify that end user traffic should be routed to the endpoint based on its priority
+ * i.e. use the endpoint with highest priority and if it is not available fallback to next highest
+ * priority endpoint.
+ *
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withPriorityBasedRouting();
+
+ /**
+ * Specify that end user traffic should be distributed to the endpoints based on the weight assigned
+ * to the endpoint.
+ *
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withWeightBasedRouting();
+
+ /**
+ * Specify that end user traffic should be routed based on the geographic location of the endpoint
+ * close to user.
+ *
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withPerformanceBasedRouting();
+
+ /**
+ * Specify the traffic routing method for the profile.
+ *
+ * @param routingMethod the traffic routing method for the profile
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withTrafficRoutingMethod(TrafficRoutingMethod routingMethod);
+ }
+
+ /**
+ * The stage of the traffic manager profile update allowing to specify the endpoint monitoring configuration.
+ */
+ interface WithMonitoringConfiguration {
+ /**
+ * Specify to use HTTP monitoring for the endpoints that checks for HTTP 200 response from the path '/'
+ * at regular intervals, using port 80.
+ *
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withHttpMonitoring();
+
+ /**
+ * Specify to use HTTPS monitoring for the endpoints that checks for HTTPS 200 response from the path '/'
+ * at regular intervals, using port 443.
+ *
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withHttpsMonitoring();
+
+ /**
+ * Specify the HTTP monitoring for the endpoints that checks for HTTP 200 response from the specified
+ * path at regular intervals, using the specified port.
+ *
+ * @param port the monitoring port
+ * @param path the monitoring path
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withHttpMonitoring(int port, String path);
+
+ /**
+ * Specify the HTTPS monitoring for the endpoints that checks for HTTPS 200 response from the specified
+ * path at regular intervals, using the specified port.
+ *
+ * @param port the monitoring port
+ * @param path the monitoring path
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withHttpsMonitoring(int port, String path);
+ }
+
+ /**
+ * The stage of the traffic manager profile update allowing to specify endpoints.
+ */
+ interface WithEndpoint {
+ /**
+ * Specifies definition of an Azure endpoint to be attached to the traffic manager profile.
+ *
+ * @param name the name for the endpoint
+ * @return the stage representing configuration for the endpoint
+ */
+ TrafficManagerEndpoint.UpdateDefinitionStages.AzureTargetEndpointBlank defineAzureTargetEndpoint(String name);
+
+ /**
+ * Specifies definition of an external endpoint to be attached to the traffic manager profile.
+ *
+ * @param name the name for the endpoint
+ * @return the stage representing configuration for the endpoint
+ */
+ TrafficManagerEndpoint.UpdateDefinitionStages.ExternalTargetEndpointBlank defineExternalTargetEndpoint(String name);
+
+ /**
+ * Specifies definition of an nested profile endpoint to be attached to the traffic manager profile.
+ *
+ * @param name the name for the endpoint
+ * @return the stage representing configuration for the endpoint
+ */
+ TrafficManagerEndpoint.UpdateDefinitionStages.NestedProfileTargetEndpointBlank defineNestedTargetEndpoint(String name);
+
+ /**
+ * Begins the description of an update of an existing Azure endpoint in this profile.
+ *
+ * @param name the name of the Azure endpoint
+ * @return the stage representing updating configuration for the Azure endpoint
+ */
+ TrafficManagerEndpoint.UpdateAzureEndpoint updateAzureTargetEndpoint(String name);
+
+ /**
+ * Begins the description of an update of an existing external endpoint in this profile.
+ *
+ * @param name the name of the external endpoint
+ * @return the stage representing updating configuration for the external endpoint
+ */
+ TrafficManagerEndpoint.UpdateExternalEndpoint updateExternalTargetEndpoint(String name);
+
+ /**
+ * Begins the description of an update of an existing nested traffic manager profile endpoint
+ * in this profile.
+ *
+ * @param name the name of the nested profile endpoint
+ * @return the stage representing updating configuration for the nested traffic manager profile endpoint
+ */
+ TrafficManagerEndpoint.UpdateNestedProfileEndpoint updateNestedProfileTargetEndpoint(String name);
+
+ /**
+ * Removes an endpoint in the profile.
+ *
+ * @param name the name of the endpoint
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withoutEndpoint(String name);
+ }
+
+ /**
+ * The stage of the traffic manager profile update allowing to specify the DNS TTL.
+ */
+ interface WithTtl {
+ /**
+ * Specify the DNS TTL in seconds.
+ *
+ * @param ttlInSeconds DNS TTL in seconds
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withTimeToLive(int ttlInSeconds);
+ }
+
+ /**
+ * The stage of the traffic manager profile update allowing to disable or enable the profile.
+ */
+ interface WithProfileStatus {
+ /**
+ * Specify that the profile needs to be disabled.
+ *
+ * Disabling the profile will disables traffic to all endpoints in the profile
+ *
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withProfileStatusDisabled();
+
+ /**
+ * Specify that the profile needs to be enabled.
+ *
+ * Enabling the profile will enables traffic to all endpoints in the profile
+ *
+ * @return the next stage of the traffic manager profile update
+ */
+ Update withProfileStatusEnabled();
+ }
+ }
+
+ /**
+ * The template for an update operation, containing all the settings that can be modified.
+ *
+ * Call {@link Update#apply()} to apply the changes to the resource in Azure.
+ */
+ interface Update extends
+ Appliable,
+ UpdateStages.WithTrafficRoutingMethod,
+ UpdateStages.WithMonitoringConfiguration,
+ UpdateStages.WithEndpoint,
+ UpdateStages.WithTtl,
+ UpdateStages.WithProfileStatus,
+ Resource.UpdateWithTags {
+ }
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerProfiles.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerProfiles.java
new file mode 100644
index 0000000000000..3e53d21a96b6a
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficManagerProfiles.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+import com.microsoft.azure.management.apigeneration.Fluent;
+import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup;
+import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup;
+import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById;
+import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
+import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
+import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
+import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
+import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;
+
+/**
+ * Entry point to traffic manager profile management API in Azure.
+ */
+@Fluent()
+public interface TrafficManagerProfiles extends
+ SupportsCreating,
+ SupportsListing,
+ SupportsListingByGroup,
+ SupportsGettingByGroup,
+ SupportsGettingById,
+ SupportsDeleting,
+ SupportsDeletingByGroup,
+ SupportsBatchCreation {
+
+ /**
+ * Checks that the DNS name is valid for traffic manager profile and is not in use.
+ *
+ * @param dnsNameLabel the DNS name to check
+ * @return whether the DNS is available to be used for a traffic manager profile and other info if not
+ */
+ CheckProfileDnsNameAvailabilityResult checkDnsNameAvailability(String dnsNameLabel);
+}
\ No newline at end of file
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficRoutingMethod.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficRoutingMethod.java
new file mode 100644
index 0000000000000..f1ec8939c0377
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/TrafficRoutingMethod.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+package com.microsoft.azure.management.trafficmanager;
+
+/**
+ * Possible routing methods supported by Traffic manager profile.
+ */
+public enum TrafficRoutingMethod {
+ /**
+ * Enum value Performance.
+ */
+ PERFORMANCE("Performance"),
+
+ /**
+ * Enum value Weighted.
+ */
+ WEIGHTED("Weighted"),
+
+ /**
+ * Enum value Priority.
+ */
+ PRIORITY("Priority");
+
+ private String value;
+
+ TrafficRoutingMethod(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a string value to a TrafficRoutingMethod instance.
+ *
+ * @param value the string value to parse.
+ * @return the parsed TrafficRoutingMethod object, or null if unable to parse.
+ */
+ public static TrafficRoutingMethod fromValue(String value) {
+ TrafficRoutingMethod[] items = TrafficRoutingMethod.values();
+ for (TrafficRoutingMethod item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner.java
new file mode 100644
index 0000000000000..fb5ca2acf6874
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner.java
@@ -0,0 +1,66 @@
+/**
+ * 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.implementation;
+
+
+/**
+ * Parameters supplied to check Traffic Manager name operation.
+ */
+public class CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner {
+ /**
+ * Gets or sets the name of the resource.
+ */
+ private String name;
+
+ /**
+ * Gets or sets the type of the resource.
+ */
+ 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 CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner object itself.
+ */
+ public CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner 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 CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner object itself.
+ */
+ public CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/EndpointInner.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/EndpointInner.java
new file mode 100644
index 0000000000000..4e25796ca44ca
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/EndpointInner.java
@@ -0,0 +1,315 @@
+/**
+ * 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.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Class representing a Traffic Manager endpoint.
+ */
+@JsonFlatten
+public class EndpointInner {
+ /**
+ * Gets or sets the ID of the Traffic Manager endpoint.
+ */
+ private String id;
+
+ /**
+ * Gets or sets the name of the Traffic Manager endpoint.
+ */
+ private String name;
+
+ /**
+ * Gets or sets the endpoint type of the Traffic Manager endpoint.
+ */
+ private String type;
+
+ /**
+ * Gets or sets the Azure Resource URI of the of the endpoint. Not
+ * applicable to endpoints of type 'ExternalEndpoints'.
+ */
+ @JsonProperty(value = "properties.targetResourceId")
+ private String targetResourceId;
+
+ /**
+ * Gets or sets the fully-qualified DNS name of the endpoint. Traffic
+ * Manager returns this value in DNS responses to direct traffic to this
+ * endpoint.
+ */
+ @JsonProperty(value = "properties.target")
+ private String target;
+
+ /**
+ * Gets or sets the status of the endpoint.. If the endpoint is Enabled,
+ * it is probed for endpoint health and is included in the traffic
+ * routing method. Possible values are 'Enabled' and 'Disabled'.
+ */
+ @JsonProperty(value = "properties.endpointStatus")
+ private String endpointStatus;
+
+ /**
+ * Gets or sets the weight of this endpoint when using the 'Weighted'
+ * traffic routing method. Possible values are from 1 to 1000.
+ */
+ @JsonProperty(value = "properties.weight")
+ private Long weight;
+
+ /**
+ * Gets or sets the priority of this endpoint when using the ‘Priority’
+ * traffic routing method. Possible values are from 1 to 1000, lower
+ * values represent higher priority. This is an optional parameter. If
+ * specified, it must be specified on all endpoints, and no two endpoints
+ * can share the same priority value.
+ */
+ @JsonProperty(value = "properties.priority")
+ private Long priority;
+
+ /**
+ * Specifies the location of the external or nested endpoints when using
+ * the ‘Performance’ traffic routing method.
+ */
+ @JsonProperty(value = "properties.endpointLocation")
+ private String endpointLocation;
+
+ /**
+ * Gets or sets the monitoring status of the endpoint.
+ */
+ @JsonProperty(value = "properties.endpointMonitorStatus")
+ private String endpointMonitorStatus;
+
+ /**
+ * Gets or sets the minimum number of endpoints that must be available in
+ * the child profile in order for the parent profile to be considered
+ * available. Only applicable to endpoint of type 'NestedEndpoints'.
+ */
+ @JsonProperty(value = "properties.minChildEndpoints")
+ private Long minChildEndpoints;
+
+ /**
+ * 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 EndpointInner object itself.
+ */
+ public EndpointInner 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 EndpointInner object itself.
+ */
+ public EndpointInner 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 EndpointInner object itself.
+ */
+ public EndpointInner withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the targetResourceId value.
+ *
+ * @return the targetResourceId value
+ */
+ public String targetResourceId() {
+ return this.targetResourceId;
+ }
+
+ /**
+ * Set the targetResourceId value.
+ *
+ * @param targetResourceId the targetResourceId value to set
+ * @return the EndpointInner object itself.
+ */
+ public EndpointInner withTargetResourceId(String targetResourceId) {
+ this.targetResourceId = targetResourceId;
+ return this;
+ }
+
+ /**
+ * Get the target value.
+ *
+ * @return the target value
+ */
+ public String target() {
+ return this.target;
+ }
+
+ /**
+ * Set the target value.
+ *
+ * @param target the target value to set
+ * @return the EndpointInner object itself.
+ */
+ public EndpointInner withTarget(String target) {
+ this.target = target;
+ return this;
+ }
+
+ /**
+ * Get the endpointStatus value.
+ *
+ * @return the endpointStatus value
+ */
+ public String endpointStatus() {
+ return this.endpointStatus;
+ }
+
+ /**
+ * Set the endpointStatus value.
+ *
+ * @param endpointStatus the endpointStatus value to set
+ * @return the EndpointInner object itself.
+ */
+ public EndpointInner withEndpointStatus(String endpointStatus) {
+ this.endpointStatus = endpointStatus;
+ return this;
+ }
+
+ /**
+ * Get the weight value.
+ *
+ * @return the weight value
+ */
+ public Long weight() {
+ return this.weight;
+ }
+
+ /**
+ * Set the weight value.
+ *
+ * @param weight the weight value to set
+ * @return the EndpointInner object itself.
+ */
+ public EndpointInner withWeight(Long weight) {
+ this.weight = weight;
+ return this;
+ }
+
+ /**
+ * Get the priority value.
+ *
+ * @return the priority value
+ */
+ public Long priority() {
+ return this.priority;
+ }
+
+ /**
+ * Set the priority value.
+ *
+ * @param priority the priority value to set
+ * @return the EndpointInner object itself.
+ */
+ public EndpointInner withPriority(Long priority) {
+ this.priority = priority;
+ return this;
+ }
+
+ /**
+ * Get the endpointLocation value.
+ *
+ * @return the endpointLocation value
+ */
+ public String endpointLocation() {
+ return this.endpointLocation;
+ }
+
+ /**
+ * Set the endpointLocation value.
+ *
+ * @param endpointLocation the endpointLocation value to set
+ * @return the EndpointInner object itself.
+ */
+ public EndpointInner withEndpointLocation(String endpointLocation) {
+ this.endpointLocation = endpointLocation;
+ return this;
+ }
+
+ /**
+ * Get the endpointMonitorStatus value.
+ *
+ * @return the endpointMonitorStatus value
+ */
+ public String endpointMonitorStatus() {
+ return this.endpointMonitorStatus;
+ }
+
+ /**
+ * Set the endpointMonitorStatus value.
+ *
+ * @param endpointMonitorStatus the endpointMonitorStatus value to set
+ * @return the EndpointInner object itself.
+ */
+ public EndpointInner withEndpointMonitorStatus(String endpointMonitorStatus) {
+ this.endpointMonitorStatus = endpointMonitorStatus;
+ return this;
+ }
+
+ /**
+ * Get the minChildEndpoints value.
+ *
+ * @return the minChildEndpoints value
+ */
+ public Long minChildEndpoints() {
+ return this.minChildEndpoints;
+ }
+
+ /**
+ * Set the minChildEndpoints value.
+ *
+ * @param minChildEndpoints the minChildEndpoints value to set
+ * @return the EndpointInner object itself.
+ */
+ public EndpointInner withMinChildEndpoints(Long minChildEndpoints) {
+ this.minChildEndpoints = minChildEndpoints;
+ return this;
+ }
+
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/EndpointsInner.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/EndpointsInner.java
new file mode 100644
index 0000000000000..1d34b471ebfac
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/EndpointsInner.java
@@ -0,0 +1,470 @@
+/**
+ * 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.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceResponseBuilder;
+import com.microsoft.azure.CloudException;
+import com.microsoft.rest.ServiceCall;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.PATCH;
+import retrofit2.http.Path;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in Endpoints.
+ */
+public final class EndpointsInner {
+ /** The Retrofit service to perform REST calls. */
+ private EndpointsService service;
+ /** The service client containing this operation class. */
+ private TrafficManagerManagementClientImpl client;
+
+ /**
+ * Initializes an instance of EndpointsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public EndpointsInner(Retrofit retrofit, TrafficManagerManagementClientImpl client) {
+ this.service = retrofit.create(EndpointsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Endpoints to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface EndpointsService {
+ @Headers("Content-Type: application/json; charset=utf-8")
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}")
+ Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointType") String endpointType, @Path("endpointName") String endpointName, @Path("subscriptionId") String subscriptionId, @Body EndpointInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers("Content-Type: application/json; charset=utf-8")
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointType") String endpointType, @Path("endpointName") String endpointName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers("Content-Type: application/json; charset=utf-8")
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointType") String endpointType, @Path("endpointName") String endpointName, @Path("subscriptionId") String subscriptionId, @Body EndpointInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers("Content-Type: application/json; charset=utf-8")
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("endpointType") String endpointType, @Path("endpointName") String endpointName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Update a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be updated.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be updated.
+ * @param endpointName The name of the Traffic Manager endpoint to be updated.
+ * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation.
+ * @return the EndpointInner object if successful.
+ */
+ public EndpointInner update(String resourceGroupName, String profileName, String endpointType, String endpointName, EndpointInner parameters) {
+ return updateWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).toBlocking().single().getBody();
+ }
+
+ /**
+ * Update a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be updated.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be updated.
+ * @param endpointName The name of the Traffic Manager endpoint to be updated.
+ * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @return the {@link ServiceCall} object
+ */
+ public ServiceCall updateAsync(String resourceGroupName, String profileName, String endpointType, String endpointName, EndpointInner parameters, final ServiceCallback serviceCallback) {
+ return ServiceCall.create(updateWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters), serviceCallback);
+ }
+
+ /**
+ * Update a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be updated.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be updated.
+ * @param endpointName The name of the Traffic Manager endpoint to be updated.
+ * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation.
+ * @return the observable to the EndpointInner object
+ */
+ public Observable updateAsync(String resourceGroupName, String profileName, String endpointType, String endpointName, EndpointInner parameters) {
+ return updateWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).map(new Func1, EndpointInner>() {
+ @Override
+ public EndpointInner call(ServiceResponse response) {
+ return response.getBody();
+ }
+ });
+ }
+
+ /**
+ * Update a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be updated.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be updated.
+ * @param endpointName The name of the Traffic Manager endpoint to be updated.
+ * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation.
+ * @return the observable to the EndpointInner object
+ */
+ public Observable> updateWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointType, String endpointName, EndpointInner parameters) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (profileName == null) {
+ throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
+ }
+ if (endpointType == null) {
+ throw new IllegalArgumentException("Parameter endpointType is required and cannot be null.");
+ }
+ if (endpointName == null) {
+ throw new IllegalArgumentException("Parameter endpointName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(parameters);
+ return service.update(resourceGroupName, profileName, endpointType, endpointName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = updateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return new AzureServiceResponseBuilder(this.client.mapperAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint.
+ * @param endpointName The name of the Traffic Manager endpoint.
+ * @return the EndpointInner object if successful.
+ */
+ public EndpointInner get(String resourceGroupName, String profileName, String endpointType, String endpointName) {
+ return getWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName).toBlocking().single().getBody();
+ }
+
+ /**
+ * Gets a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint.
+ * @param endpointName The name of the Traffic Manager endpoint.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @return the {@link ServiceCall} object
+ */
+ public ServiceCall getAsync(String resourceGroupName, String profileName, String endpointType, String endpointName, final ServiceCallback serviceCallback) {
+ return ServiceCall.create(getWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName), serviceCallback);
+ }
+
+ /**
+ * Gets a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint.
+ * @param endpointName The name of the Traffic Manager endpoint.
+ * @return the observable to the EndpointInner object
+ */
+ public Observable getAsync(String resourceGroupName, String profileName, String endpointType, String endpointName) {
+ return getWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName).map(new Func1, EndpointInner>() {
+ @Override
+ public EndpointInner call(ServiceResponse response) {
+ return response.getBody();
+ }
+ });
+ }
+
+ /**
+ * Gets a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint.
+ * @param endpointName The name of the Traffic Manager endpoint.
+ * @return the observable to the EndpointInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointType, String endpointName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (profileName == null) {
+ throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
+ }
+ if (endpointType == null) {
+ throw new IllegalArgumentException("Parameter endpointType is required and cannot be null.");
+ }
+ if (endpointName == null) {
+ throw new IllegalArgumentException("Parameter endpointName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.get(resourceGroupName, profileName, endpointType, endpointName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return new AzureServiceResponseBuilder(this.client.mapperAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Create or update a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be created or updated.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be created or updated.
+ * @param endpointName The name of the Traffic Manager endpoint to be created or updated.
+ * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation.
+ * @return the EndpointInner object if successful.
+ */
+ public EndpointInner createOrUpdate(String resourceGroupName, String profileName, String endpointType, String endpointName, EndpointInner parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).toBlocking().single().getBody();
+ }
+
+ /**
+ * Create or update a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be created or updated.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be created or updated.
+ * @param endpointName The name of the Traffic Manager endpoint to be created or updated.
+ * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @return the {@link ServiceCall} object
+ */
+ public ServiceCall createOrUpdateAsync(String resourceGroupName, String profileName, String endpointType, String endpointName, EndpointInner parameters, final ServiceCallback serviceCallback) {
+ return ServiceCall.create(createOrUpdateWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters), serviceCallback);
+ }
+
+ /**
+ * Create or update a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be created or updated.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be created or updated.
+ * @param endpointName The name of the Traffic Manager endpoint to be created or updated.
+ * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation.
+ * @return the observable to the EndpointInner object
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String profileName, String endpointType, String endpointName, EndpointInner parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName, parameters).map(new Func1, EndpointInner>() {
+ @Override
+ public EndpointInner call(ServiceResponse response) {
+ return response.getBody();
+ }
+ });
+ }
+
+ /**
+ * Create or update a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be created or updated.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be created or updated.
+ * @param endpointName The name of the Traffic Manager endpoint to be created or updated.
+ * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation.
+ * @return the observable to the EndpointInner object
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointType, String endpointName, EndpointInner parameters) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (profileName == null) {
+ throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
+ }
+ if (endpointType == null) {
+ throw new IllegalArgumentException("Parameter endpointType is required and cannot be null.");
+ }
+ if (endpointName == null) {
+ throw new IllegalArgumentException("Parameter endpointName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(parameters);
+ return service.createOrUpdate(resourceGroupName, profileName, endpointType, endpointName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return new AzureServiceResponseBuilder(this.client.mapperAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be deleted.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be deleted.
+ * @param endpointName The name of the Traffic Manager endpoint to be deleted.
+ */
+ public void delete(String resourceGroupName, String profileName, String endpointType, String endpointName) {
+ deleteWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName).toBlocking().single().getBody();
+ }
+
+ /**
+ * Deletes a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be deleted.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be deleted.
+ * @param endpointName The name of the Traffic Manager endpoint to be deleted.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @return the {@link ServiceCall} object
+ */
+ public ServiceCall deleteAsync(String resourceGroupName, String profileName, String endpointType, String endpointName, final ServiceCallback serviceCallback) {
+ return ServiceCall.create(deleteWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName), serviceCallback);
+ }
+
+ /**
+ * Deletes a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be deleted.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be deleted.
+ * @param endpointName The name of the Traffic Manager endpoint to be deleted.
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable deleteAsync(String resourceGroupName, String profileName, String endpointType, String endpointName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, profileName, endpointType, endpointName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.getBody();
+ }
+ });
+ }
+
+ /**
+ * Deletes a Traffic Manager endpoint.
+ *
+ * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint to be deleted.
+ * @param profileName The name of the Traffic Manager profile.
+ * @param endpointType The type of the Traffic Manager endpoint to be deleted.
+ * @param endpointName The name of the Traffic Manager endpoint to be deleted.
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointType, String endpointName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (profileName == null) {
+ throw new IllegalArgumentException("Parameter profileName is required and cannot be null.");
+ }
+ if (endpointType == null) {
+ throw new IllegalArgumentException("Parameter endpointType is required and cannot be null.");
+ }
+ if (endpointName == null) {
+ throw new IllegalArgumentException("Parameter endpointName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.delete(resourceGroupName, profileName, endpointType, endpointName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = deleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return new AzureServiceResponseBuilder(this.client.mapperAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .build(response);
+ }
+
+}
diff --git a/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/PageImpl.java b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/PageImpl.java
new file mode 100644
index 0000000000000..a7b26586d8396
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/PageImpl.java
@@ -0,0 +1,75 @@
+/**
+ * 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.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.Page;
+import java.util.List;
+
+/**
+ * An instance of this class defines a page of Azure resources and a link to
+ * get the next page of resources, if any.
+ *
+ * @param type of Azure resource
+ */
+public class PageImpl implements Page {
+ /**
+ * The link to the next page.
+ */
+ @JsonProperty("")
+ private String nextPageLink;
+
+ /**
+ * The list of items.
+ */
+ @JsonProperty("value")
+ private List items;
+
+ /**
+ * Gets the link to the next page.
+ *
+ * @return the link to the next page.
+ */
+ @Override
+ public String getNextPageLink() {
+ return this.nextPageLink;
+ }
+
+ /**
+ * Gets the list of items.
+ *
+ * @return the list of items in {@link List}.
+ */
+ @Override
+ public List getItems() {
+ return items;
+ }
+
+ /**
+ * Sets the link to the next page.
+ *
+ * @param nextPageLink the link to the next page.
+ * @return this Page object itself.
+ */
+ public PageImpl setNextPageLink(String nextPageLink) {
+ this.nextPageLink = nextPageLink;
+ return this;
+ }
+
+ /**
+ * Sets the list of items.
+ *
+ * @param items the list of items in {@link List}.
+ * @return this Page object itself.
+ */
+ public PageImpl setItems(List items) {
+ this.items = items;
+ return this;
+ }
+}
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
new file mode 100644
index 0000000000000..1aa419ce77a1c
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProfileInner.java
@@ -0,0 +1,156 @@
+/**
+ * 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.implementation;
+
+import com.microsoft.azure.management.trafficmanager.DnsConfig;
+import com.microsoft.azure.management.trafficmanager.MonitorConfig;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.Resource;
+
+/**
+ * Class representing a Traffic Manager profile.
+ */
+@JsonFlatten
+public class ProfileInner extends Resource {
+ /**
+ * Gets or sets the status of the Traffic Manager profile. Possible
+ * values are 'Enabled' and 'Disabled'.
+ */
+ @JsonProperty(value = "properties.profileStatus")
+ private String profileStatus;
+
+ /**
+ * Gets or sets the traffic routing method of the Traffic Manager profile.
+ * Possible values are 'Performance', 'Weighted', or 'Priority'.
+ */
+ @JsonProperty(value = "properties.trafficRoutingMethod")
+ private String trafficRoutingMethod;
+
+ /**
+ * Gets or sets the DNS settings of the Traffic Manager profile.
+ */
+ @JsonProperty(value = "properties.dnsConfig")
+ private DnsConfig dnsConfig;
+
+ /**
+ * Gets or sets the endpoint monitoring settings of the Traffic Manager
+ * profile.
+ */
+ @JsonProperty(value = "properties.monitorConfig")
+ private MonitorConfig monitorConfig;
+
+ /**
+ * Gets or sets the list of endpoints in the Traffic Manager profile.
+ */
+ @JsonProperty(value = "properties.endpoints")
+ private List endpoints;
+
+ /**
+ * Get the profileStatus value.
+ *
+ * @return the profileStatus value
+ */
+ public String profileStatus() {
+ return this.profileStatus;
+ }
+
+ /**
+ * Set the profileStatus value.
+ *
+ * @param profileStatus the profileStatus value to set
+ * @return the ProfileInner object itself.
+ */
+ public ProfileInner withProfileStatus(String profileStatus) {
+ this.profileStatus = profileStatus;
+ return this;
+ }
+
+ /**
+ * Get the trafficRoutingMethod value.
+ *
+ * @return the trafficRoutingMethod value
+ */
+ public String trafficRoutingMethod() {
+ return this.trafficRoutingMethod;
+ }
+
+ /**
+ * Set the trafficRoutingMethod value.
+ *
+ * @param trafficRoutingMethod the trafficRoutingMethod value to set
+ * @return the ProfileInner object itself.
+ */
+ public ProfileInner withTrafficRoutingMethod(String trafficRoutingMethod) {
+ this.trafficRoutingMethod = trafficRoutingMethod;
+ return this;
+ }
+
+ /**
+ * Get the dnsConfig value.
+ *
+ * @return the dnsConfig value
+ */
+ public DnsConfig dnsConfig() {
+ return this.dnsConfig;
+ }
+
+ /**
+ * Set the dnsConfig value.
+ *
+ * @param dnsConfig the dnsConfig value to set
+ * @return the ProfileInner object itself.
+ */
+ public ProfileInner withDnsConfig(DnsConfig dnsConfig) {
+ this.dnsConfig = dnsConfig;
+ return this;
+ }
+
+ /**
+ * Get the monitorConfig value.
+ *
+ * @return the monitorConfig value
+ */
+ public MonitorConfig monitorConfig() {
+ return this.monitorConfig;
+ }
+
+ /**
+ * Set the monitorConfig value.
+ *
+ * @param monitorConfig the monitorConfig value to set
+ * @return the ProfileInner object itself.
+ */
+ public ProfileInner withMonitorConfig(MonitorConfig monitorConfig) {
+ this.monitorConfig = monitorConfig;
+ return this;
+ }
+
+ /**
+ * Get the endpoints value.
+ *
+ * @return the endpoints value
+ */
+ public List endpoints() {
+ return this.endpoints;
+ }
+
+ /**
+ * Set the endpoints value.
+ *
+ * @param endpoints the endpoints value to set
+ * @return the ProfileInner object itself.
+ */
+ public ProfileInner withEndpoints(List endpoints) {
+ this.endpoints = endpoints;
+ 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
new file mode 100644
index 0000000000000..65e89d8026acc
--- /dev/null
+++ b/azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProfilesInner.java
@@ -0,0 +1,643 @@
+/**
+ * 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.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceResponseBuilder;
+import com.microsoft.azure.CloudException;
+import com.microsoft.rest.ServiceCall;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.PATCH;
+import retrofit2.http.Path;
+import retrofit2.http.POST;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in Profiles.
+ */
+public final class ProfilesInner {
+ /** The Retrofit service to perform REST calls. */
+ private ProfilesService service;
+ /** The service client containing this operation class. */
+ private TrafficManagerManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ProfilesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ProfilesInner(Retrofit retrofit, TrafficManagerManagementClientImpl client) {
+ this.service = retrofit.create(ProfilesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Profiles to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ProfilesService {
+ @Headers("Content-Type: application/json; charset=utf-8")
+ @POST("providers/Microsoft.Network/checkTrafficManagerNameAvailability")
+ Observable> checkTrafficManagerRelativeDnsNameAvailability(@Path("subscriptionId") String subscriptionId, @Body CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers("Content-Type: application/json; charset=utf-8")
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles")
+ Observable> listAllInResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers("Content-Type: application/json; charset=utf-8")
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles")
+ Observable> listAll(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers("Content-Type: application/json; charset=utf-8")
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers("Content-Type: application/json; charset=utf-8")
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Body ProfileInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers("Content-Type: application/json; charset=utf-8")
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers("Content-Type: application/json; charset=utf-8")
+ @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}")
+ Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("profileName") String profileName, @Path("subscriptionId") String subscriptionId, @Body ProfileInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Checks the availability of a Traffic Manager Relative DNS name.
+ *
+ * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability operation.
+ * @return the TrafficManagerNameAvailabilityInner object if successful.
+ */
+ public TrafficManagerNameAvailabilityInner checkTrafficManagerRelativeDnsNameAvailability(CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters) {
+ return checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(parameters).toBlocking().single().getBody();
+ }
+
+ /**
+ * Checks the availability of a Traffic Manager Relative DNS name.
+ *
+ * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability operation.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @return the {@link ServiceCall} object
+ */
+ public ServiceCall checkTrafficManagerRelativeDnsNameAvailabilityAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters, final ServiceCallback serviceCallback) {
+ return ServiceCall.create(checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(parameters), serviceCallback);
+ }
+
+ /**
+ * Checks the availability of a Traffic Manager Relative DNS name.
+ *
+ * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability operation.
+ * @return the observable to the TrafficManagerNameAvailabilityInner object
+ */
+ public Observable checkTrafficManagerRelativeDnsNameAvailabilityAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters) {
+ return checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(parameters).map(new Func1, TrafficManagerNameAvailabilityInner>() {
+ @Override
+ public TrafficManagerNameAvailabilityInner call(ServiceResponse response) {
+ return response.getBody();
+ }
+ });
+ }
+
+ /**
+ * Checks the availability of a Traffic Manager Relative DNS name.
+ *
+ * @param parameters The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability operation.
+ * @return the observable to the TrafficManagerNameAvailabilityInner object
+ */
+ public Observable> checkTrafficManagerRelativeDnsNameAvailabilityWithServiceResponseAsync(CheckTrafficManagerRelativeDnsNameAvailabilityParametersInner parameters) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(parameters);
+ return service.checkTrafficManagerRelativeDnsNameAvailability(this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable