diff --git a/sdk/support/azure-resourcemanager-support/CHANGELOG.md b/sdk/support/azure-resourcemanager-support/CHANGELOG.md
index e7d423fef45d..61f6e22acfb7 100644
--- a/sdk/support/azure-resourcemanager-support/CHANGELOG.md
+++ b/sdk/support/azure-resourcemanager-support/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-06-09)
+- Azure Resource Manager support client library for Java. This package contains Microsoft Azure SDK for support Management SDK. Microsoft Azure Support Resource Provider. Package tag package-2020-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2021-04-19)
diff --git a/sdk/support/azure-resourcemanager-support/README.md b/sdk/support/azure-resourcemanager-support/README.md
index 38ac9977e2ba..a28a123f42cd 100644
--- a/sdk/support/azure-resourcemanager-support/README.md
+++ b/sdk/support/azure-resourcemanager-support/README.md
@@ -1,8 +1,8 @@
-# Azure Resource Manager Support client library for Java
+# Azure Resource Manager support client library for Java
-Azure Resource Manager Support client library for Java.
+Azure Resource Manager support client library for Java.
-This package contains Microsoft Azure SDK for Support Management SDK. Microsoft Azure Support Resource Provider. Package tag package-2020-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for support Management SDK. Microsoft Azure Support Resource Provider. Package tag package-2020-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-support
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/support/azure-resourcemanager-support/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/support/azure-resourcemanager-support/SAMPLE.md b/sdk/support/azure-resourcemanager-support/SAMPLE.md
new file mode 100644
index 000000000000..54c46a452225
--- /dev/null
+++ b/sdk/support/azure-resourcemanager-support/SAMPLE.md
@@ -0,0 +1,1134 @@
+# Code snippets and samples
+
+
+## Communications
+
+- [CheckNameAvailability](#communications_checknameavailability)
+- [Create](#communications_create)
+- [Get](#communications_get)
+- [List](#communications_list)
+
+## Operations
+
+- [List](#operations_list)
+
+## ProblemClassifications
+
+- [Get](#problemclassifications_get)
+- [List](#problemclassifications_list)
+
+## Services
+
+- [Get](#services_get)
+- [List](#services_list)
+
+## SupportTickets
+
+- [CheckNameAvailability](#supporttickets_checknameavailability)
+- [Create](#supporttickets_create)
+- [Get](#supporttickets_get)
+- [List](#supporttickets_list)
+- [Update](#supporttickets_update)
+### Communications_CheckNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.support.models.CheckNameAvailabilityInput;
+import com.azure.resourcemanager.support.models.Type;
+
+/** Samples for Communications CheckNameAvailability. */
+public final class CommunicationsCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CheckNameAvailabilityForSupportTicketCommunication.json
+ */
+ /**
+ * Sample code: Checks whether name is available for Communication resource.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void checksWhetherNameIsAvailableForCommunicationResource(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .communications()
+ .checkNameAvailabilityWithResponse(
+ "testticket",
+ new CheckNameAvailabilityInput().withName("sampleName").withType(Type.MICROSOFT_SUPPORT_COMMUNICATIONS),
+ Context.NONE);
+ }
+}
+```
+
+### Communications_Create
+
+```java
+/** Samples for Communications Create. */
+public final class CommunicationsCreateSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSupportTicketCommunication.json
+ */
+ /**
+ * Sample code: AddCommunicationToSubscriptionTicket.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void addCommunicationToSubscriptionTicket(com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .communications()
+ .define("testcommunication")
+ .withExistingSupportTicket("testticket")
+ .withSender("user@contoso.com")
+ .withSubject("This is a test message from a customer!")
+ .withBody("This is a test message from a customer!")
+ .create();
+ }
+}
+```
+
+### Communications_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Communications Get. */
+public final class CommunicationsGetSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json
+ */
+ /**
+ * Sample code: Get communication details for a subscription support ticket.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void getCommunicationDetailsForASubscriptionSupportTicket(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager.communications().getWithResponse("testticket", "testmessage", Context.NONE);
+ }
+}
+```
+
+### Communications_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Communications List. */
+public final class CommunicationsListSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/ListCommunicationsForSubscriptionSupportTicket.json
+ */
+ /**
+ * Sample code: List communications for a subscription support ticket.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void listCommunicationsForASubscriptionSupportTicket(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager.communications().list("testticket", null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/ListWebCommunicationsForSubscriptionSupportTicket.json
+ */
+ /**
+ * Sample code: List web communications for a subscription support ticket.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void listWebCommunicationsForASubscriptionSupportTicket(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager.communications().list("testticket", null, "communicationType eq 'web'", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/ListWebCommunicationsForSubscriptionSupportTicketCreatedOnOrAfter.json
+ */
+ /**
+ * Sample code: List web communication created on or after a specific date for a subscription support ticket.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void listWebCommunicationCreatedOnOrAfterASpecificDateForASubscriptionSupportTicket(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .communications()
+ .list(
+ "testticket", null, "communicationType eq 'web' and createdDate ge 2020-03-10T22:08:51Z", Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/ListOperations.json
+ */
+ /**
+ * Sample code: Get all operations.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void getAllOperations(com.azure.resourcemanager.support.SupportManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### ProblemClassifications_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProblemClassifications Get. */
+public final class ProblemClassificationsGetSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/GetProblemClassification.json
+ */
+ /**
+ * Sample code: Gets details of problemClassification for Azure service.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void getsDetailsOfProblemClassificationForAzureService(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager.problemClassifications().getWithResponse("service_guid", "problemClassification_guid", Context.NONE);
+ }
+}
+```
+
+### ProblemClassifications_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ProblemClassifications List. */
+public final class ProblemClassificationsListSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/ListProblemClassifications.json
+ */
+ /**
+ * Sample code: Gets list of problemClassifications for a service for which a support ticket can be created.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void getsListOfProblemClassificationsForAServiceForWhichASupportTicketCanBeCreated(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager.problemClassifications().list("service_guid", Context.NONE);
+ }
+}
+```
+
+### Services_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services Get. */
+public final class ServicesGetSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/GetService.json
+ */
+ /**
+ * Sample code: Gets details of the Azure service.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void getsDetailsOfTheAzureService(com.azure.resourcemanager.support.SupportManager manager) {
+ manager.services().getWithResponse("service_guid", Context.NONE);
+ }
+}
+```
+
+### Services_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services List. */
+public final class ServicesListSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/ListServices.json
+ */
+ /**
+ * Sample code: Gets list of services for which a support ticket can be created.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void getsListOfServicesForWhichASupportTicketCanBeCreated(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager.services().list(Context.NONE);
+ }
+}
+```
+
+### SupportTickets_CheckNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.support.models.CheckNameAvailabilityInput;
+import com.azure.resourcemanager.support.models.Type;
+
+/** Samples for SupportTickets CheckNameAvailability. */
+public final class SupportTicketsCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CheckNameAvailabilityWithSubscription.json
+ */
+ /**
+ * Sample code: Checks whether name is available for SupportTicket resource.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void checksWhetherNameIsAvailableForSupportTicketResource(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .checkNameAvailabilityWithResponse(
+ new CheckNameAvailabilityInput()
+ .withName("sampleName")
+ .withType(Type.MICROSOFT_SUPPORT_SUPPORT_TICKETS),
+ Context.NONE);
+ }
+}
+```
+
+### SupportTickets_Create
+
+```java
+import com.azure.resourcemanager.support.models.ContactProfile;
+import com.azure.resourcemanager.support.models.PreferredContactMethod;
+import com.azure.resourcemanager.support.models.QuotaChangeRequest;
+import com.azure.resourcemanager.support.models.QuotaTicketDetails;
+import com.azure.resourcemanager.support.models.SeverityLevel;
+import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
+import java.util.Arrays;
+
+/** Samples for SupportTickets Create. */
+public final class SupportTicketsCreateSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForDTUs.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for DTUs for Azure Synapse Analytics.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForDTUsForAzureSynapseAnalytics(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("DTUs")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays
+ .asList(
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload("{\"ServerName\":\"testserver\",\"NewLimit\":54000}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForActiveJobs.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for Active Jobs and Job Schedules for a Batch account.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForActiveJobsAndJobSchedulesForABatchAccount(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("Account")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays
+ .asList(
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Jobs\"}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForLowPriorityCores.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for Low-priority cores for Machine Learning service.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForLowPriorityCoresForMachineLearningService(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("BatchAml")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays
+ .asList(
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload("{\"NewLimit\":200,\"Type\":\"LowPriority\"}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSubscription.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for Batch accounts for a subscription.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForBatchAccountsForASubscription(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("Subscription")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays
+ .asList(
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload("{\"NewLimit\":200,\"Type\":\"Account\"}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForDTUs.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for DTUs for SQL Database.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForDTUsForSQLDatabase(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("DTUs")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays
+ .asList(
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload("{\"ServerName\":\"testserver\",\"NewLimit\":54000}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateGenericQuotaTicket.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for services that do not require additional details in the
+ * quotaTicketDetails object.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void
+ createATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("Increase the maximum throughput per container limit to 10000 for account foo bar")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for Low-priority cores for a Batch account.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("Account")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays
+ .asList(
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload(
+ "{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"LowPriority\"}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlManagedInstanceQuotaTicket.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for Azure SQL managed instance.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForAzureSQLManagedInstance(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("SQLMI")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays
+ .asList(
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"vCore\"}"),
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload("{\"NewLimit\":200, \"Metadata\":null, \"Type\":\"Subnet\"}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for Pools for a Batch account.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForPoolsForABatchAccount(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("Account")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays
+ .asList(
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload("{\"AccountName\":\"test\",\"NewLimit\":200,\"Type\":\"Pools\"}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for specific VM family cores for a Batch account.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForABatchAccount(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("Account")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays
+ .asList(
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload(
+ "{\"AccountName\":\"test\",\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for Servers for SQL Database.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForServersForSQLDatabase(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("Servers")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateBillingSupportTicketForSubscription.json
+ */
+ /**
+ * Sample code: Create a ticket for Billing related issues.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketForBillingRelatedIssues(com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/billing_service_guid")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json
+ */
+ /**
+ * Sample code: Create a ticket for Subscription Management related issues.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketForSubscriptionManagementRelatedIssues(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/subscription_management_service_guid")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateTechnicalSupportTicketForSubscription.json
+ */
+ /**
+ * Sample code: Create a ticket for Technical issue related to a specific resource.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketForTechnicalIssueRelatedToASpecificResource(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc")
+ .withTechnicalTicketDetails(
+ new TechnicalTicketDetails()
+ .withResourceId(
+ "/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for specific VM family cores for Machine Learning service.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForMachineLearningService(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("BatchAml")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays
+ .asList(
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload(
+ "{\"VMFamily\":\"standardA0_A7Family\",\"NewLimit\":200,\"Type\":\"Dedicated\"}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for Servers for Azure Synapse Analytics.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestSubType("Servers")
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays.asList(new QuotaChangeRequest().withRegion("EastUS").withPayload("{\"NewLimit\":200}"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/CreateCoresQuotaTicketForSubscription.json
+ */
+ /**
+ * Sample code: Create a ticket to request Quota increase for Compute VM Cores.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void createATicketToRequestQuotaIncreaseForComputeVMCores(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .define("testticket")
+ .withDescription("my description")
+ .withProblemClassificationId(
+ "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid")
+ .withSeverity(SeverityLevel.MODERATE)
+ .withContactDetails(
+ new ContactProfile()
+ .withFirstName("abc")
+ .withLastName("xyz")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("abc@contoso.com")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("usa")
+ .withPreferredSupportLanguage("en-US"))
+ .withTitle("my title")
+ .withServiceId("/providers/Microsoft.Support/services/quota_service_guid")
+ .withQuotaTicketDetails(
+ new QuotaTicketDetails()
+ .withQuotaChangeRequestVersion("1.0")
+ .withQuotaChangeRequests(
+ Arrays
+ .asList(
+ new QuotaChangeRequest()
+ .withRegion("EastUS")
+ .withPayload("{\"SKU\":\"DSv3 Series\",\"NewLimit\":104}"))))
+ .create();
+ }
+}
+```
+
+### SupportTickets_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SupportTickets Get. */
+public final class SupportTicketsGetSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/GetSubscriptionSupportTicketDetails.json
+ */
+ /**
+ * Sample code: Get details of a subscription ticket.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void getDetailsOfASubscriptionTicket(com.azure.resourcemanager.support.SupportManager manager) {
+ manager.supportTickets().getWithResponse("testticket", Context.NONE);
+ }
+}
+```
+
+### SupportTickets_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SupportTickets List. */
+public final class SupportTicketsListSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/ListSupportTicketsServiceIdEqualsForSubscription.json
+ */
+ /**
+ * Sample code: List support tickets with a certain service id for a subscription.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void listSupportTicketsWithACertainServiceIdForASubscription(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager.supportTickets().list(null, "ServiceId eq 'vm_windows_service_guid'", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInOpenStateBySubscription.json
+ */
+ /**
+ * Sample code: List support tickets created on or after a certain date and in open state for a subscription.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void listSupportTicketsCreatedOnOrAfterACertainDateAndInOpenStateForASubscription(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager.supportTickets().list(null, "createdDate ge 2020-03-10T22:08:51Z and status eq 'Open'", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/ListSupportTicketsProblemClassificationIdEqualsForSubscription.json
+ */
+ /**
+ * Sample code: List support tickets with a certain problem classification id for a subscription.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void listSupportTicketsWithACertainProblemClassificationIdForASubscription(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager
+ .supportTickets()
+ .list(null, "ProblemClassificationId eq 'compute_vm_problemClassification_guid'", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/ListSupportTicketsBySubscription.json
+ */
+ /**
+ * Sample code: List support tickets for a subscription.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void listSupportTicketsForASubscription(com.azure.resourcemanager.support.SupportManager manager) {
+ manager.supportTickets().list(null, null, Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/ListSupportTicketsInOpenStateBySubscription.json
+ */
+ /**
+ * Sample code: List support tickets in open state for a subscription.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void listSupportTicketsInOpenStateForASubscription(
+ com.azure.resourcemanager.support.SupportManager manager) {
+ manager.supportTickets().list(null, "status eq 'Open'", Context.NONE);
+ }
+}
+```
+
+### SupportTickets_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.support.models.PreferredContactMethod;
+import com.azure.resourcemanager.support.models.SeverityLevel;
+import com.azure.resourcemanager.support.models.Status;
+import com.azure.resourcemanager.support.models.SupportTicketDetails;
+import com.azure.resourcemanager.support.models.UpdateContactProfile;
+import java.util.Arrays;
+
+/** Samples for SupportTickets Update. */
+public final class SupportTicketsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/UpdateSeverityOfSupportTicketForSubscription.json
+ */
+ /**
+ * Sample code: Update severity of a support ticket.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void updateSeverityOfASupportTicket(com.azure.resourcemanager.support.SupportManager manager) {
+ SupportTicketDetails resource = manager.supportTickets().getWithResponse("testticket", Context.NONE).getValue();
+ resource.update().withSeverity(SeverityLevel.CRITICAL).apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/UpdateStatusOfSupportTicketForSubscription.json
+ */
+ /**
+ * Sample code: Update status of a support ticket.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void updateStatusOfASupportTicket(com.azure.resourcemanager.support.SupportManager manager) {
+ SupportTicketDetails resource = manager.supportTickets().getWithResponse("testticket", Context.NONE).getValue();
+ resource.update().withStatus(Status.CLOSED).apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/support/resource-manager/Microsoft.Support/stable/2020-04-01/examples/UpdateContactDetailsOfSupportTicketForSubscription.json
+ */
+ /**
+ * Sample code: Update contact details of a support ticket.
+ *
+ * @param manager Entry point to SupportManager.
+ */
+ public static void updateContactDetailsOfASupportTicket(com.azure.resourcemanager.support.SupportManager manager) {
+ SupportTicketDetails resource = manager.supportTickets().getWithResponse("testticket", Context.NONE).getValue();
+ resource
+ .update()
+ .withContactDetails(
+ new UpdateContactProfile()
+ .withFirstName("first name")
+ .withLastName("last name")
+ .withPreferredContactMethod(PreferredContactMethod.EMAIL)
+ .withPrimaryEmailAddress("test.name@contoso.com")
+ .withAdditionalEmailAddresses(Arrays.asList("tname@contoso.com", "teamtest@contoso.com"))
+ .withPhoneNumber("123-456-7890")
+ .withPreferredTimeZone("Pacific Standard Time")
+ .withCountry("USA")
+ .withPreferredSupportLanguage("en-US"))
+ .apply();
+ }
+}
+```
+
diff --git a/sdk/support/azure-resourcemanager-support/pom.xml b/sdk/support/azure-resourcemanager-support/pom.xml
index 51ae280a0bd0..cbf87afdcd1e 100644
--- a/sdk/support/azure-resourcemanager-support/pom.xml
+++ b/sdk/support/azure-resourcemanager-support/pom.xml
@@ -1,55 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-support
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-support
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for Support Management
- This package contains Microsoft Azure SDK for Support Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Azure Support Resource Provider. Package tag package-2020-04.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for support Management
+ This package contains Microsoft Azure SDK for support Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Azure Support Resource Provider. Package tag package-2020-04.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core
- 1.29.1
-
-
- com.azure
- azure-core-management
- 1.6.2
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.29.1
+
+
+ com.azure
+ azure-core-management
+ 1.6.2
+
+
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/SupportManager.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/SupportManager.java
index 740d2efe9f0f..4ddbdc05ba5d 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/SupportManager.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/SupportManager.java
@@ -8,15 +8,18 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -37,6 +40,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to SupportManager. Microsoft Azure Support Resource Provider. */
public final class SupportManager {
@@ -65,11 +69,11 @@ private SupportManager(HttpPipeline httpPipeline, AzureProfile profile, Duration
}
/**
- * Creates an instance of Support service API entry point.
+ * Creates an instance of support service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
- * @return the Support service API instance.
+ * @return the support service API instance.
*/
public static SupportManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
@@ -77,6 +81,19 @@ public static SupportManager authenticate(TokenCredential credential, AzureProfi
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of support service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the support service API instance.
+ */
+ public static SupportManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new SupportManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create SupportManager with optional configuration.
*
@@ -88,12 +105,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -132,6 +151,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -143,6 +173,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -150,19 +193,21 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
/**
- * Creates an instance of Support service API entry point.
+ * Creates an instance of support service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
- * @return the Support service API instance.
+ * @return the support service API instance.
*/
public SupportManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
@@ -188,20 +233,38 @@ public SupportManager authenticate(TokenCredential credential, AzureProfile prof
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -213,7 +276,11 @@ public SupportManager authenticate(TokenCredential credential, AzureProfile prof
}
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -221,7 +288,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of Services. */
+ /**
+ * Gets the resource collection API of Services.
+ *
+ * @return Resource collection API of Services.
+ */
public Services services() {
if (this.services == null) {
this.services = new ServicesImpl(clientObject.getServices(), this);
@@ -229,7 +300,11 @@ public Services services() {
return services;
}
- /** @return Resource collection API of ProblemClassifications. */
+ /**
+ * Gets the resource collection API of ProblemClassifications.
+ *
+ * @return Resource collection API of ProblemClassifications.
+ */
public ProblemClassifications problemClassifications() {
if (this.problemClassifications == null) {
this.problemClassifications =
@@ -238,7 +313,11 @@ public ProblemClassifications problemClassifications() {
return problemClassifications;
}
- /** @return Resource collection API of SupportTickets. */
+ /**
+ * Gets the resource collection API of SupportTickets. It manages SupportTicketDetails.
+ *
+ * @return Resource collection API of SupportTickets.
+ */
public SupportTickets supportTickets() {
if (this.supportTickets == null) {
this.supportTickets = new SupportTicketsImpl(clientObject.getSupportTickets(), this);
@@ -246,7 +325,11 @@ public SupportTickets supportTickets() {
return supportTickets;
}
- /** @return Resource collection API of Communications. */
+ /**
+ * Gets the resource collection API of Communications. It manages CommunicationDetails.
+ *
+ * @return Resource collection API of Communications.
+ */
public Communications communications() {
if (this.communications == null) {
this.communications = new CommunicationsImpl(clientObject.getCommunications(), this);
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/CommunicationsClient.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/CommunicationsClient.java
index 2a9fb2ab6b44..68c175cee777 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/CommunicationsClient.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/CommunicationsClient.java
@@ -42,7 +42,7 @@ CheckNameAvailabilityOutputInner checkNameAvailability(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return output of check name availability API.
+ * @return output of check name availability API along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response checkNameAvailabilityWithResponse(
@@ -60,7 +60,7 @@ Response checkNameAvailabilityWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Communication resources.
+ * @return collection of Communication resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String supportTicketName);
@@ -83,7 +83,7 @@ Response checkNameAvailabilityWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Communication resources.
+ * @return collection of Communication resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
@@ -111,7 +111,7 @@ PagedIterable list(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return object that represents a Communication resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -126,9 +126,9 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return the {@link SyncPoller} for polling of object that represents a Communication resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CommunicationDetailsInner> beginCreate(
String supportTicketName, String communicationName, CommunicationDetailsInner createCommunicationParameters);
@@ -142,9 +142,9 @@ SyncPoller, CommunicationDetailsInner> beg
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return the {@link SyncPoller} for polling of object that represents a Communication resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CommunicationDetailsInner> beginCreate(
String supportTicketName,
String communicationName,
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/OperationsClient.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/OperationsClient.java
index 7dd1b2036500..7295a892d43a 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/OperationsClient.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/OperationsClient.java
@@ -17,7 +17,8 @@ public interface OperationsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of operations supported by Microsoft Support resource provider.
+ * @return the list of operations supported by Microsoft Support resource provider as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +30,8 @@ public interface OperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of operations supported by Microsoft Support resource provider.
+ * @return the list of operations supported by Microsoft Support resource provider as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/ProblemClassificationsClient.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/ProblemClassificationsClient.java
index 5dbfeddbff52..a3c2b59d2a9d 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/ProblemClassificationsClient.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/ProblemClassificationsClient.java
@@ -22,7 +22,7 @@ public interface ProblemClassificationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of ProblemClassification resources.
+ * @return collection of ProblemClassification resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String serviceName);
@@ -37,7 +37,7 @@ public interface ProblemClassificationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of ProblemClassification resources.
+ * @return collection of ProblemClassification resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String serviceName, Context context);
@@ -64,7 +64,7 @@ public interface ProblemClassificationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return problem classification details for a specific Azure service.
+ * @return problem classification details for a specific Azure service along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/ServicesClient.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/ServicesClient.java
index 0aa7a64863d9..877542b8341a 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/ServicesClient.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/ServicesClient.java
@@ -23,7 +23,7 @@ public interface ServicesClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Service resources.
+ * @return collection of Service resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -40,7 +40,7 @@ public interface ServicesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Service resources.
+ * @return collection of Service resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -65,7 +65,7 @@ public interface ServicesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a specific Azure service for support ticket creation.
+ * @return a specific Azure service for support ticket creation along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String serviceName, Context context);
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/SupportTicketsClient.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/SupportTicketsClient.java
index b20dbf1e716e..b77706ae7b7a 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/SupportTicketsClient.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/SupportTicketsClient.java
@@ -40,41 +40,46 @@ public interface SupportTicketsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return output of check name availability API.
+ * @return output of check name availability API along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response checkNameAvailabilityWithResponse(
CheckNameAvailabilityInput checkNameAvailabilityInput, Context context);
/**
- * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by _Status_ or
- * _CreatedDate_ using the $filter parameter. Output will be a paged result with _nextLink_, using which you can
- * retrieve the next set of support tickets. <br/><br/>Support ticket data is available for 18 months
- * after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error.
+ * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by _Status_,
+ * _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter. Output will be a paged
+ * result with _nextLink_, using which you can retrieve the next set of support tickets.
+ * <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket was
+ * created more than 18 months ago, a request for data might cause an error.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a collection of SupportTicket resources.
+ * @return object that represents a collection of SupportTicket resources as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
- * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by _Status_ or
- * _CreatedDate_ using the $filter parameter. Output will be a paged result with _nextLink_, using which you can
- * retrieve the next set of support tickets. <br/><br/>Support ticket data is available for 18 months
- * after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error.
+ * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by _Status_,
+ * _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter. Output will be a paged
+ * result with _nextLink_, using which you can retrieve the next set of support tickets.
+ * <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket was
+ * created more than 18 months ago, a request for data might cause an error.
*
* @param top The number of values to return in the collection. Default is 25 and max is 100.
* @param filter The filter to apply on the operation. We support 'odata v4.0' filter semantics. [Learn
- * more](https://docs.microsoft.com/odata/concepts/queryoptions-overview). _Status_ filter can only be used with
- * Equals ('eq') operator. For _CreatedDate_ filter, the supported operators are Greater Than ('gt') and Greater
- * Than or Equals ('ge'). When using both filters, combine them using the logical 'AND'.
+ * more](https://docs.microsoft.com/odata/concepts/queryoptions-overview). _Status_, _ServiceId_, and
+ * _ProblemClassificationId_ filters can only be used with Equals ('eq') operator. For _CreatedDate_ filter, the
+ * supported operators are Greater Than ('gt') and Greater Than or Equals ('ge'). When using both filters,
+ * combine them using the logical 'AND'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a collection of SupportTicket resources.
+ * @return object that represents a collection of SupportTicket resources as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Integer top, String filter, Context context);
@@ -101,7 +106,7 @@ Response checkNameAvailabilityWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return ticket details for an Azure subscription.
+ * @return ticket details for an Azure subscription along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String supportTicketName, Context context);
@@ -138,7 +143,7 @@ Response checkNameAvailabilityWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents SupportTicketDetails resource.
+ * @return object that represents SupportTicketDetails resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
@@ -168,9 +173,9 @@ Response updateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents SupportTicketDetails resource.
+ * @return the {@link SyncPoller} for polling of object that represents SupportTicketDetails resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SupportTicketDetailsInner> beginCreate(
String supportTicketName, SupportTicketDetailsInner createSupportTicketParameters);
@@ -199,9 +204,9 @@ SyncPoller, SupportTicketDetailsInner> beg
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents SupportTicketDetails resource.
+ * @return the {@link SyncPoller} for polling of object that represents SupportTicketDetails resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SupportTicketDetailsInner> beginCreate(
String supportTicketName, SupportTicketDetailsInner createSupportTicketParameters, Context context);
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/CheckNameAvailabilityOutputInner.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/CheckNameAvailabilityOutputInner.java
index b67f0d0065c6..9e278a1bf5f5 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/CheckNameAvailabilityOutputInner.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/CheckNameAvailabilityOutputInner.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.support.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Output of check name availability API. */
@Immutable
public final class CheckNameAvailabilityOutputInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityOutputInner.class);
-
/*
* Indicates whether the name is available.
*/
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/CommunicationDetailsInner.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/CommunicationDetailsInner.java
index f6d00fae517b..94ddd6ef303c 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/CommunicationDetailsInner.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/CommunicationDetailsInner.java
@@ -5,57 +5,29 @@
package com.azure.resourcemanager.support.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.support.models.CommunicationDirection;
import com.azure.resourcemanager.support.models.CommunicationType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** Object that represents a Communication resource. */
-@JsonFlatten
@Fluent
-public class CommunicationDetailsInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CommunicationDetailsInner.class);
-
+public final class CommunicationDetailsInner extends ProxyResource {
/*
- * Communication type.
+ * Properties of the resource.
*/
- @JsonProperty(value = "properties.communicationType", access = JsonProperty.Access.WRITE_ONLY)
- private CommunicationType communicationType;
+ @JsonProperty(value = "properties")
+ private CommunicationDetailsProperties innerProperties;
- /*
- * Direction of communication.
- */
- @JsonProperty(value = "properties.communicationDirection", access = JsonProperty.Access.WRITE_ONLY)
- private CommunicationDirection communicationDirection;
-
- /*
- * Email address of the sender. This property is required if called by a
- * service principal.
- */
- @JsonProperty(value = "properties.sender")
- private String sender;
-
- /*
- * Subject of the communication.
- */
- @JsonProperty(value = "properties.subject")
- private String subject;
-
- /*
- * Body of the communication.
- */
- @JsonProperty(value = "properties.body")
- private String body;
-
- /*
- * Time in UTC (ISO 8601 format) when the communication was created.
+ /**
+ * Get the innerProperties property: Properties of the resource.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime createdDate;
+ private CommunicationDetailsProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the communicationType property: Communication type.
@@ -63,7 +35,7 @@ public class CommunicationDetailsInner extends ProxyResource {
* @return the communicationType value.
*/
public CommunicationType communicationType() {
- return this.communicationType;
+ return this.innerProperties() == null ? null : this.innerProperties().communicationType();
}
/**
@@ -72,7 +44,7 @@ public CommunicationType communicationType() {
* @return the communicationDirection value.
*/
public CommunicationDirection communicationDirection() {
- return this.communicationDirection;
+ return this.innerProperties() == null ? null : this.innerProperties().communicationDirection();
}
/**
@@ -81,7 +53,7 @@ public CommunicationDirection communicationDirection() {
* @return the sender value.
*/
public String sender() {
- return this.sender;
+ return this.innerProperties() == null ? null : this.innerProperties().sender();
}
/**
@@ -91,7 +63,10 @@ public String sender() {
* @return the CommunicationDetailsInner object itself.
*/
public CommunicationDetailsInner withSender(String sender) {
- this.sender = sender;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CommunicationDetailsProperties();
+ }
+ this.innerProperties().withSender(sender);
return this;
}
@@ -101,7 +76,7 @@ public CommunicationDetailsInner withSender(String sender) {
* @return the subject value.
*/
public String subject() {
- return this.subject;
+ return this.innerProperties() == null ? null : this.innerProperties().subject();
}
/**
@@ -111,7 +86,10 @@ public String subject() {
* @return the CommunicationDetailsInner object itself.
*/
public CommunicationDetailsInner withSubject(String subject) {
- this.subject = subject;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CommunicationDetailsProperties();
+ }
+ this.innerProperties().withSubject(subject);
return this;
}
@@ -121,7 +99,7 @@ public CommunicationDetailsInner withSubject(String subject) {
* @return the body value.
*/
public String body() {
- return this.body;
+ return this.innerProperties() == null ? null : this.innerProperties().body();
}
/**
@@ -131,7 +109,10 @@ public String body() {
* @return the CommunicationDetailsInner object itself.
*/
public CommunicationDetailsInner withBody(String body) {
- this.body = body;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CommunicationDetailsProperties();
+ }
+ this.innerProperties().withBody(body);
return this;
}
@@ -141,7 +122,7 @@ public CommunicationDetailsInner withBody(String body) {
* @return the createdDate value.
*/
public OffsetDateTime createdDate() {
- return this.createdDate;
+ return this.innerProperties() == null ? null : this.innerProperties().createdDate();
}
/**
@@ -150,5 +131,8 @@ public OffsetDateTime createdDate() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/CommunicationDetailsProperties.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/CommunicationDetailsProperties.java
new file mode 100644
index 000000000000..8264644a1e3e
--- /dev/null
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/CommunicationDetailsProperties.java
@@ -0,0 +1,162 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.support.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.support.models.CommunicationDirection;
+import com.azure.resourcemanager.support.models.CommunicationType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Describes the properties of a communication resource. */
+@Fluent
+public final class CommunicationDetailsProperties {
+ /*
+ * Communication type.
+ */
+ @JsonProperty(value = "communicationType", access = JsonProperty.Access.WRITE_ONLY)
+ private CommunicationType communicationType;
+
+ /*
+ * Direction of communication.
+ */
+ @JsonProperty(value = "communicationDirection", access = JsonProperty.Access.WRITE_ONLY)
+ private CommunicationDirection communicationDirection;
+
+ /*
+ * Email address of the sender. This property is required if called by a
+ * service principal.
+ */
+ @JsonProperty(value = "sender")
+ private String sender;
+
+ /*
+ * Subject of the communication.
+ */
+ @JsonProperty(value = "subject", required = true)
+ private String subject;
+
+ /*
+ * Body of the communication.
+ */
+ @JsonProperty(value = "body", required = true)
+ private String body;
+
+ /*
+ * Time in UTC (ISO 8601 format) when the communication was created.
+ */
+ @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdDate;
+
+ /**
+ * Get the communicationType property: Communication type.
+ *
+ * @return the communicationType value.
+ */
+ public CommunicationType communicationType() {
+ return this.communicationType;
+ }
+
+ /**
+ * Get the communicationDirection property: Direction of communication.
+ *
+ * @return the communicationDirection value.
+ */
+ public CommunicationDirection communicationDirection() {
+ return this.communicationDirection;
+ }
+
+ /**
+ * Get the sender property: Email address of the sender. This property is required if called by a service principal.
+ *
+ * @return the sender value.
+ */
+ public String sender() {
+ return this.sender;
+ }
+
+ /**
+ * Set the sender property: Email address of the sender. This property is required if called by a service principal.
+ *
+ * @param sender the sender value to set.
+ * @return the CommunicationDetailsProperties object itself.
+ */
+ public CommunicationDetailsProperties withSender(String sender) {
+ this.sender = sender;
+ return this;
+ }
+
+ /**
+ * Get the subject property: Subject of the communication.
+ *
+ * @return the subject value.
+ */
+ public String subject() {
+ return this.subject;
+ }
+
+ /**
+ * Set the subject property: Subject of the communication.
+ *
+ * @param subject the subject value to set.
+ * @return the CommunicationDetailsProperties object itself.
+ */
+ public CommunicationDetailsProperties withSubject(String subject) {
+ this.subject = subject;
+ return this;
+ }
+
+ /**
+ * Get the body property: Body of the communication.
+ *
+ * @return the body value.
+ */
+ public String body() {
+ return this.body;
+ }
+
+ /**
+ * Set the body property: Body of the communication.
+ *
+ * @param body the body value to set.
+ * @return the CommunicationDetailsProperties object itself.
+ */
+ public CommunicationDetailsProperties withBody(String body) {
+ this.body = body;
+ return this;
+ }
+
+ /**
+ * Get the createdDate property: Time in UTC (ISO 8601 format) when the communication was created.
+ *
+ * @return the createdDate value.
+ */
+ public OffsetDateTime createdDate() {
+ return this.createdDate;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (subject() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property subject in model CommunicationDetailsProperties"));
+ }
+ if (body() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property body in model CommunicationDetailsProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(CommunicationDetailsProperties.class);
+}
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/OperationInner.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/OperationInner.java
index 3528d17b955a..3ab6153648f3 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/OperationInner.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/OperationInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.support.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.support.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The operation supported by Microsoft Support resource provider. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* Operation name: {provider}/{resource}/{operation}.
*/
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ProblemClassificationInner.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ProblemClassificationInner.java
index f1fb36bff133..4eafe1b2ca3a 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ProblemClassificationInner.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ProblemClassificationInner.java
@@ -5,17 +5,11 @@
package com.azure.resourcemanager.support.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** ProblemClassification resource object. */
-@JsonFlatten
@Fluent
-public class ProblemClassificationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ProblemClassificationInner.class);
-
+public final class ProblemClassificationInner {
/*
* Id of the resource.
*/
@@ -35,10 +29,10 @@ public class ProblemClassificationInner {
private String type;
/*
- * Localized name of problem classification.
+ * Properties of the resource.
*/
- @JsonProperty(value = "properties.displayName")
- private String displayName;
+ @JsonProperty(value = "properties")
+ private ProblemClassificationProperties innerProperties;
/**
* Get the id property: Id of the resource.
@@ -67,13 +61,22 @@ public String type() {
return this.type;
}
+ /**
+ * Get the innerProperties property: Properties of the resource.
+ *
+ * @return the innerProperties value.
+ */
+ private ProblemClassificationProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the displayName property: Localized name of problem classification.
*
* @return the displayName value.
*/
public String displayName() {
- return this.displayName;
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
}
/**
@@ -83,7 +86,10 @@ public String displayName() {
* @return the ProblemClassificationInner object itself.
*/
public ProblemClassificationInner withDisplayName(String displayName) {
- this.displayName = displayName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProblemClassificationProperties();
+ }
+ this.innerProperties().withDisplayName(displayName);
return this;
}
@@ -93,5 +99,8 @@ public ProblemClassificationInner withDisplayName(String displayName) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ProblemClassificationProperties.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ProblemClassificationProperties.java
new file mode 100644
index 000000000000..67272994e2cf
--- /dev/null
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ProblemClassificationProperties.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.support.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Details about a problem classification available for an Azure service. */
+@Fluent
+public final class ProblemClassificationProperties {
+ /*
+ * Localized name of problem classification.
+ */
+ @JsonProperty(value = "displayName")
+ private String displayName;
+
+ /**
+ * Get the displayName property: Localized name of problem classification.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: Localized name of problem classification.
+ *
+ * @param displayName the displayName value to set.
+ * @return the ProblemClassificationProperties object itself.
+ */
+ public ProblemClassificationProperties withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ServiceInner.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ServiceInner.java
index eef990a4edc8..f89efa8c3ff2 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ServiceInner.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ServiceInner.java
@@ -5,18 +5,12 @@
package com.azure.resourcemanager.support.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Object that represents a Service resource. */
-@JsonFlatten
@Fluent
-public class ServiceInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceInner.class);
-
+public final class ServiceInner {
/*
* Id of the resource.
*/
@@ -36,16 +30,10 @@ public class ServiceInner {
private String type;
/*
- * Localized name of the Azure service.
+ * Properties of the resource.
*/
- @JsonProperty(value = "properties.displayName")
- private String displayName;
-
- /*
- * ARM Resource types.
- */
- @JsonProperty(value = "properties.resourceTypes")
- private List resourceTypes;
+ @JsonProperty(value = "properties")
+ private ServiceProperties innerProperties;
/**
* Get the id property: Id of the resource.
@@ -74,13 +62,22 @@ public String type() {
return this.type;
}
+ /**
+ * Get the innerProperties property: Properties of the resource.
+ *
+ * @return the innerProperties value.
+ */
+ private ServiceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the displayName property: Localized name of the Azure service.
*
* @return the displayName value.
*/
public String displayName() {
- return this.displayName;
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
}
/**
@@ -90,7 +87,10 @@ public String displayName() {
* @return the ServiceInner object itself.
*/
public ServiceInner withDisplayName(String displayName) {
- this.displayName = displayName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServiceProperties();
+ }
+ this.innerProperties().withDisplayName(displayName);
return this;
}
@@ -100,7 +100,7 @@ public ServiceInner withDisplayName(String displayName) {
* @return the resourceTypes value.
*/
public List resourceTypes() {
- return this.resourceTypes;
+ return this.innerProperties() == null ? null : this.innerProperties().resourceTypes();
}
/**
@@ -110,7 +110,10 @@ public List resourceTypes() {
* @return the ServiceInner object itself.
*/
public ServiceInner withResourceTypes(List resourceTypes) {
- this.resourceTypes = resourceTypes;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServiceProperties();
+ }
+ this.innerProperties().withResourceTypes(resourceTypes);
return this;
}
@@ -120,5 +123,8 @@ public ServiceInner withResourceTypes(List resourceTypes) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ServiceProperties.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ServiceProperties.java
new file mode 100644
index 000000000000..a743216fb57f
--- /dev/null
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/ServiceProperties.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.support.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Details about an Azure service available for support ticket creation. */
+@Fluent
+public final class ServiceProperties {
+ /*
+ * Localized name of the Azure service.
+ */
+ @JsonProperty(value = "displayName")
+ private String displayName;
+
+ /*
+ * ARM Resource types.
+ */
+ @JsonProperty(value = "resourceTypes")
+ private List resourceTypes;
+
+ /**
+ * Get the displayName property: Localized name of the Azure service.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: Localized name of the Azure service.
+ *
+ * @param displayName the displayName value to set.
+ * @return the ServiceProperties object itself.
+ */
+ public ServiceProperties withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the resourceTypes property: ARM Resource types.
+ *
+ * @return the resourceTypes value.
+ */
+ public List resourceTypes() {
+ return this.resourceTypes;
+ }
+
+ /**
+ * Set the resourceTypes property: ARM Resource types.
+ *
+ * @param resourceTypes the resourceTypes value to set.
+ * @return the ServiceProperties object itself.
+ */
+ public ServiceProperties withResourceTypes(List resourceTypes) {
+ this.resourceTypes = resourceTypes;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/SupportTicketDetailsInner.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/SupportTicketDetailsInner.java
index 177b396f1146..2d4a8289297a 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/SupportTicketDetailsInner.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/SupportTicketDetailsInner.java
@@ -5,153 +5,33 @@
package com.azure.resourcemanager.support.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.support.models.ContactProfile;
import com.azure.resourcemanager.support.models.QuotaTicketDetails;
import com.azure.resourcemanager.support.models.ServiceLevelAgreement;
import com.azure.resourcemanager.support.models.SeverityLevel;
import com.azure.resourcemanager.support.models.SupportEngineer;
import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** Object that represents SupportTicketDetails resource. */
-@JsonFlatten
@Fluent
-public class SupportTicketDetailsInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SupportTicketDetailsInner.class);
-
- /*
- * System generated support ticket Id that is unique.
- */
- @JsonProperty(value = "properties.supportTicketId")
- private String supportTicketId;
-
- /*
- * Detailed description of the question or issue.
- */
- @JsonProperty(value = "properties.description")
- private String description;
-
- /*
- * Each Azure service has its own set of issue categories, also known as
- * problem classification. This parameter is the unique Id for the type of
- * problem you are experiencing.
- */
- @JsonProperty(value = "properties.problemClassificationId")
- private String problemClassificationId;
-
- /*
- * Localized name of problem classification.
- */
- @JsonProperty(value = "properties.problemClassificationDisplayName", access = JsonProperty.Access.WRITE_ONLY)
- private String problemClassificationDisplayName;
-
- /*
- * A value that indicates the urgency of the case, which in turn determines
- * the response time according to the service level agreement of the
- * technical support plan you have with Azure. Note: 'Highest critical
- * impact', also known as the 'Emergency - Severe impact' level in the
- * Azure portal is reserved only for our Premium customers.
- */
- @JsonProperty(value = "properties.severity")
- private SeverityLevel severity;
-
- /*
- * Enrollment Id associated with the support ticket.
- */
- @JsonProperty(value = "properties.enrollmentId", access = JsonProperty.Access.WRITE_ONLY)
- private String enrollmentId;
-
- /*
- * Indicates if this requires a 24x7 response from Azure.
- */
- @JsonProperty(value = "properties.require24X7Response")
- private Boolean require24X7Response;
-
- /*
- * Contact information of the user requesting to create a support ticket.
- */
- @JsonProperty(value = "properties.contactDetails")
- private ContactProfile contactDetails;
-
- /*
- * Service Level Agreement information for this support ticket.
- */
- @JsonProperty(value = "properties.serviceLevelAgreement")
- private ServiceLevelAgreement serviceLevelAgreement;
-
- /*
- * Information about the support engineer working on this support ticket.
- */
- @JsonProperty(value = "properties.supportEngineer")
- private SupportEngineer supportEngineer;
-
- /*
- * Support plan type associated with the support ticket.
- */
- @JsonProperty(value = "properties.supportPlanType", access = JsonProperty.Access.WRITE_ONLY)
- private String supportPlanType;
-
- /*
- * Title of the support ticket.
- */
- @JsonProperty(value = "properties.title")
- private String title;
-
- /*
- * Time in UTC (ISO 8601 format) when the problem started.
- */
- @JsonProperty(value = "properties.problemStartTime")
- private OffsetDateTime problemStartTime;
-
- /*
- * This is the resource Id of the Azure service resource associated with
- * the support ticket.
- */
- @JsonProperty(value = "properties.serviceId")
- private String serviceId;
-
- /*
- * Localized name of the Azure service.
- */
- @JsonProperty(value = "properties.serviceDisplayName", access = JsonProperty.Access.WRITE_ONLY)
- private String serviceDisplayName;
-
- /*
- * Status of the support ticket.
- */
- @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
- private String status;
-
+public final class SupportTicketDetailsInner extends ProxyResource {
/*
- * Time in UTC (ISO 8601 format) when the support ticket was created.
+ * Properties of the resource.
*/
- @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime createdDate;
+ @JsonProperty(value = "properties")
+ private SupportTicketDetailsProperties innerProperties;
- /*
- * Time in UTC (ISO 8601 format) when the support ticket was last modified.
- */
- @JsonProperty(value = "properties.modifiedDate", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime modifiedDate;
-
- /*
- * Additional ticket details associated with a technical support ticket
- * request.
- */
- @JsonProperty(value = "properties.technicalTicketDetails")
- private TechnicalTicketDetails technicalTicketDetails;
-
- /*
- * Additional ticket details associated with a quota support ticket
- * request.
+ /**
+ * Get the innerProperties property: Properties of the resource.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.quotaTicketDetails")
- private QuotaTicketDetails quotaTicketDetails;
+ private SupportTicketDetailsProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the supportTicketId property: System generated support ticket Id that is unique.
@@ -159,7 +39,7 @@ public class SupportTicketDetailsInner extends ProxyResource {
* @return the supportTicketId value.
*/
public String supportTicketId() {
- return this.supportTicketId;
+ return this.innerProperties() == null ? null : this.innerProperties().supportTicketId();
}
/**
@@ -169,7 +49,10 @@ public String supportTicketId() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withSupportTicketId(String supportTicketId) {
- this.supportTicketId = supportTicketId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withSupportTicketId(supportTicketId);
return this;
}
@@ -179,7 +62,7 @@ public SupportTicketDetailsInner withSupportTicketId(String supportTicketId) {
* @return the description value.
*/
public String description() {
- return this.description;
+ return this.innerProperties() == null ? null : this.innerProperties().description();
}
/**
@@ -189,7 +72,10 @@ public String description() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withDescription(String description) {
- this.description = description;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withDescription(description);
return this;
}
@@ -200,7 +86,7 @@ public SupportTicketDetailsInner withDescription(String description) {
* @return the problemClassificationId value.
*/
public String problemClassificationId() {
- return this.problemClassificationId;
+ return this.innerProperties() == null ? null : this.innerProperties().problemClassificationId();
}
/**
@@ -211,7 +97,10 @@ public String problemClassificationId() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withProblemClassificationId(String problemClassificationId) {
- this.problemClassificationId = problemClassificationId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withProblemClassificationId(problemClassificationId);
return this;
}
@@ -221,7 +110,7 @@ public SupportTicketDetailsInner withProblemClassificationId(String problemClass
* @return the problemClassificationDisplayName value.
*/
public String problemClassificationDisplayName() {
- return this.problemClassificationDisplayName;
+ return this.innerProperties() == null ? null : this.innerProperties().problemClassificationDisplayName();
}
/**
@@ -233,7 +122,7 @@ public String problemClassificationDisplayName() {
* @return the severity value.
*/
public SeverityLevel severity() {
- return this.severity;
+ return this.innerProperties() == null ? null : this.innerProperties().severity();
}
/**
@@ -246,7 +135,10 @@ public SeverityLevel severity() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withSeverity(SeverityLevel severity) {
- this.severity = severity;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withSeverity(severity);
return this;
}
@@ -256,7 +148,7 @@ public SupportTicketDetailsInner withSeverity(SeverityLevel severity) {
* @return the enrollmentId value.
*/
public String enrollmentId() {
- return this.enrollmentId;
+ return this.innerProperties() == null ? null : this.innerProperties().enrollmentId();
}
/**
@@ -265,7 +157,7 @@ public String enrollmentId() {
* @return the require24X7Response value.
*/
public Boolean require24X7Response() {
- return this.require24X7Response;
+ return this.innerProperties() == null ? null : this.innerProperties().require24X7Response();
}
/**
@@ -275,7 +167,10 @@ public Boolean require24X7Response() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withRequire24X7Response(Boolean require24X7Response) {
- this.require24X7Response = require24X7Response;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withRequire24X7Response(require24X7Response);
return this;
}
@@ -285,7 +180,7 @@ public SupportTicketDetailsInner withRequire24X7Response(Boolean require24X7Resp
* @return the contactDetails value.
*/
public ContactProfile contactDetails() {
- return this.contactDetails;
+ return this.innerProperties() == null ? null : this.innerProperties().contactDetails();
}
/**
@@ -295,7 +190,10 @@ public ContactProfile contactDetails() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withContactDetails(ContactProfile contactDetails) {
- this.contactDetails = contactDetails;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withContactDetails(contactDetails);
return this;
}
@@ -305,7 +203,7 @@ public SupportTicketDetailsInner withContactDetails(ContactProfile contactDetail
* @return the serviceLevelAgreement value.
*/
public ServiceLevelAgreement serviceLevelAgreement() {
- return this.serviceLevelAgreement;
+ return this.innerProperties() == null ? null : this.innerProperties().serviceLevelAgreement();
}
/**
@@ -315,7 +213,10 @@ public ServiceLevelAgreement serviceLevelAgreement() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withServiceLevelAgreement(ServiceLevelAgreement serviceLevelAgreement) {
- this.serviceLevelAgreement = serviceLevelAgreement;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withServiceLevelAgreement(serviceLevelAgreement);
return this;
}
@@ -325,7 +226,7 @@ public SupportTicketDetailsInner withServiceLevelAgreement(ServiceLevelAgreement
* @return the supportEngineer value.
*/
public SupportEngineer supportEngineer() {
- return this.supportEngineer;
+ return this.innerProperties() == null ? null : this.innerProperties().supportEngineer();
}
/**
@@ -335,7 +236,10 @@ public SupportEngineer supportEngineer() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withSupportEngineer(SupportEngineer supportEngineer) {
- this.supportEngineer = supportEngineer;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withSupportEngineer(supportEngineer);
return this;
}
@@ -345,7 +249,7 @@ public SupportTicketDetailsInner withSupportEngineer(SupportEngineer supportEngi
* @return the supportPlanType value.
*/
public String supportPlanType() {
- return this.supportPlanType;
+ return this.innerProperties() == null ? null : this.innerProperties().supportPlanType();
}
/**
@@ -354,7 +258,7 @@ public String supportPlanType() {
* @return the title value.
*/
public String title() {
- return this.title;
+ return this.innerProperties() == null ? null : this.innerProperties().title();
}
/**
@@ -364,7 +268,10 @@ public String title() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withTitle(String title) {
- this.title = title;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withTitle(title);
return this;
}
@@ -374,7 +281,7 @@ public SupportTicketDetailsInner withTitle(String title) {
* @return the problemStartTime value.
*/
public OffsetDateTime problemStartTime() {
- return this.problemStartTime;
+ return this.innerProperties() == null ? null : this.innerProperties().problemStartTime();
}
/**
@@ -384,7 +291,10 @@ public OffsetDateTime problemStartTime() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withProblemStartTime(OffsetDateTime problemStartTime) {
- this.problemStartTime = problemStartTime;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withProblemStartTime(problemStartTime);
return this;
}
@@ -395,7 +305,7 @@ public SupportTicketDetailsInner withProblemStartTime(OffsetDateTime problemStar
* @return the serviceId value.
*/
public String serviceId() {
- return this.serviceId;
+ return this.innerProperties() == null ? null : this.innerProperties().serviceId();
}
/**
@@ -406,7 +316,10 @@ public String serviceId() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withServiceId(String serviceId) {
- this.serviceId = serviceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withServiceId(serviceId);
return this;
}
@@ -416,7 +329,7 @@ public SupportTicketDetailsInner withServiceId(String serviceId) {
* @return the serviceDisplayName value.
*/
public String serviceDisplayName() {
- return this.serviceDisplayName;
+ return this.innerProperties() == null ? null : this.innerProperties().serviceDisplayName();
}
/**
@@ -425,7 +338,7 @@ public String serviceDisplayName() {
* @return the status value.
*/
public String status() {
- return this.status;
+ return this.innerProperties() == null ? null : this.innerProperties().status();
}
/**
@@ -434,7 +347,7 @@ public String status() {
* @return the createdDate value.
*/
public OffsetDateTime createdDate() {
- return this.createdDate;
+ return this.innerProperties() == null ? null : this.innerProperties().createdDate();
}
/**
@@ -443,7 +356,7 @@ public OffsetDateTime createdDate() {
* @return the modifiedDate value.
*/
public OffsetDateTime modifiedDate() {
- return this.modifiedDate;
+ return this.innerProperties() == null ? null : this.innerProperties().modifiedDate();
}
/**
@@ -453,7 +366,7 @@ public OffsetDateTime modifiedDate() {
* @return the technicalTicketDetails value.
*/
public TechnicalTicketDetails technicalTicketDetails() {
- return this.technicalTicketDetails;
+ return this.innerProperties() == null ? null : this.innerProperties().technicalTicketDetails();
}
/**
@@ -464,7 +377,10 @@ public TechnicalTicketDetails technicalTicketDetails() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withTechnicalTicketDetails(TechnicalTicketDetails technicalTicketDetails) {
- this.technicalTicketDetails = technicalTicketDetails;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withTechnicalTicketDetails(technicalTicketDetails);
return this;
}
@@ -474,7 +390,7 @@ public SupportTicketDetailsInner withTechnicalTicketDetails(TechnicalTicketDetai
* @return the quotaTicketDetails value.
*/
public QuotaTicketDetails quotaTicketDetails() {
- return this.quotaTicketDetails;
+ return this.innerProperties() == null ? null : this.innerProperties().quotaTicketDetails();
}
/**
@@ -484,7 +400,10 @@ public QuotaTicketDetails quotaTicketDetails() {
* @return the SupportTicketDetailsInner object itself.
*/
public SupportTicketDetailsInner withQuotaTicketDetails(QuotaTicketDetails quotaTicketDetails) {
- this.quotaTicketDetails = quotaTicketDetails;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SupportTicketDetailsProperties();
+ }
+ this.innerProperties().withQuotaTicketDetails(quotaTicketDetails);
return this;
}
@@ -494,20 +413,8 @@ public SupportTicketDetailsInner withQuotaTicketDetails(QuotaTicketDetails quota
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (contactDetails() != null) {
- contactDetails().validate();
- }
- if (serviceLevelAgreement() != null) {
- serviceLevelAgreement().validate();
- }
- if (supportEngineer() != null) {
- supportEngineer().validate();
- }
- if (technicalTicketDetails() != null) {
- technicalTicketDetails().validate();
- }
- if (quotaTicketDetails() != null) {
- quotaTicketDetails().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/SupportTicketDetailsProperties.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/SupportTicketDetailsProperties.java
new file mode 100644
index 000000000000..a8dacf3a7363
--- /dev/null
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/fluent/models/SupportTicketDetailsProperties.java
@@ -0,0 +1,544 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.support.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.support.models.ContactProfile;
+import com.azure.resourcemanager.support.models.QuotaTicketDetails;
+import com.azure.resourcemanager.support.models.ServiceLevelAgreement;
+import com.azure.resourcemanager.support.models.SeverityLevel;
+import com.azure.resourcemanager.support.models.SupportEngineer;
+import com.azure.resourcemanager.support.models.TechnicalTicketDetails;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Describes the properties of a support ticket. */
+@Fluent
+public final class SupportTicketDetailsProperties {
+ /*
+ * System generated support ticket Id that is unique.
+ */
+ @JsonProperty(value = "supportTicketId")
+ private String supportTicketId;
+
+ /*
+ * Detailed description of the question or issue.
+ */
+ @JsonProperty(value = "description", required = true)
+ private String description;
+
+ /*
+ * Each Azure service has its own set of issue categories, also known as
+ * problem classification. This parameter is the unique Id for the type of
+ * problem you are experiencing.
+ */
+ @JsonProperty(value = "problemClassificationId", required = true)
+ private String problemClassificationId;
+
+ /*
+ * Localized name of problem classification.
+ */
+ @JsonProperty(value = "problemClassificationDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String problemClassificationDisplayName;
+
+ /*
+ * A value that indicates the urgency of the case, which in turn determines
+ * the response time according to the service level agreement of the
+ * technical support plan you have with Azure. Note: 'Highest critical
+ * impact', also known as the 'Emergency - Severe impact' level in the
+ * Azure portal is reserved only for our Premium customers.
+ */
+ @JsonProperty(value = "severity", required = true)
+ private SeverityLevel severity;
+
+ /*
+ * Enrollment Id associated with the support ticket.
+ */
+ @JsonProperty(value = "enrollmentId", access = JsonProperty.Access.WRITE_ONLY)
+ private String enrollmentId;
+
+ /*
+ * Indicates if this requires a 24x7 response from Azure.
+ */
+ @JsonProperty(value = "require24X7Response")
+ private Boolean require24X7Response;
+
+ /*
+ * Contact information of the user requesting to create a support ticket.
+ */
+ @JsonProperty(value = "contactDetails", required = true)
+ private ContactProfile contactDetails;
+
+ /*
+ * Service Level Agreement information for this support ticket.
+ */
+ @JsonProperty(value = "serviceLevelAgreement")
+ private ServiceLevelAgreement serviceLevelAgreement;
+
+ /*
+ * Information about the support engineer working on this support ticket.
+ */
+ @JsonProperty(value = "supportEngineer")
+ private SupportEngineer supportEngineer;
+
+ /*
+ * Support plan type associated with the support ticket.
+ */
+ @JsonProperty(value = "supportPlanType", access = JsonProperty.Access.WRITE_ONLY)
+ private String supportPlanType;
+
+ /*
+ * Title of the support ticket.
+ */
+ @JsonProperty(value = "title", required = true)
+ private String title;
+
+ /*
+ * Time in UTC (ISO 8601 format) when the problem started.
+ */
+ @JsonProperty(value = "problemStartTime")
+ private OffsetDateTime problemStartTime;
+
+ /*
+ * This is the resource Id of the Azure service resource associated with
+ * the support ticket.
+ */
+ @JsonProperty(value = "serviceId", required = true)
+ private String serviceId;
+
+ /*
+ * Localized name of the Azure service.
+ */
+ @JsonProperty(value = "serviceDisplayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String serviceDisplayName;
+
+ /*
+ * Status of the support ticket.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private String status;
+
+ /*
+ * Time in UTC (ISO 8601 format) when the support ticket was created.
+ */
+ @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdDate;
+
+ /*
+ * Time in UTC (ISO 8601 format) when the support ticket was last modified.
+ */
+ @JsonProperty(value = "modifiedDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime modifiedDate;
+
+ /*
+ * Additional ticket details associated with a technical support ticket
+ * request.
+ */
+ @JsonProperty(value = "technicalTicketDetails")
+ private TechnicalTicketDetails technicalTicketDetails;
+
+ /*
+ * Additional ticket details associated with a quota support ticket
+ * request.
+ */
+ @JsonProperty(value = "quotaTicketDetails")
+ private QuotaTicketDetails quotaTicketDetails;
+
+ /**
+ * Get the supportTicketId property: System generated support ticket Id that is unique.
+ *
+ * @return the supportTicketId value.
+ */
+ public String supportTicketId() {
+ return this.supportTicketId;
+ }
+
+ /**
+ * Set the supportTicketId property: System generated support ticket Id that is unique.
+ *
+ * @param supportTicketId the supportTicketId value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withSupportTicketId(String supportTicketId) {
+ this.supportTicketId = supportTicketId;
+ return this;
+ }
+
+ /**
+ * Get the description property: Detailed description of the question or issue.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Detailed description of the question or issue.
+ *
+ * @param description the description value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the problemClassificationId property: Each Azure service has its own set of issue categories, also known as
+ * problem classification. This parameter is the unique Id for the type of problem you are experiencing.
+ *
+ * @return the problemClassificationId value.
+ */
+ public String problemClassificationId() {
+ return this.problemClassificationId;
+ }
+
+ /**
+ * Set the problemClassificationId property: Each Azure service has its own set of issue categories, also known as
+ * problem classification. This parameter is the unique Id for the type of problem you are experiencing.
+ *
+ * @param problemClassificationId the problemClassificationId value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withProblemClassificationId(String problemClassificationId) {
+ this.problemClassificationId = problemClassificationId;
+ return this;
+ }
+
+ /**
+ * Get the problemClassificationDisplayName property: Localized name of problem classification.
+ *
+ * @return the problemClassificationDisplayName value.
+ */
+ public String problemClassificationDisplayName() {
+ return this.problemClassificationDisplayName;
+ }
+
+ /**
+ * Get the severity property: A value that indicates the urgency of the case, which in turn determines the response
+ * time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest
+ * critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for
+ * our Premium customers.
+ *
+ * @return the severity value.
+ */
+ public SeverityLevel severity() {
+ return this.severity;
+ }
+
+ /**
+ * Set the severity property: A value that indicates the urgency of the case, which in turn determines the response
+ * time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest
+ * critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for
+ * our Premium customers.
+ *
+ * @param severity the severity value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withSeverity(SeverityLevel severity) {
+ this.severity = severity;
+ return this;
+ }
+
+ /**
+ * Get the enrollmentId property: Enrollment Id associated with the support ticket.
+ *
+ * @return the enrollmentId value.
+ */
+ public String enrollmentId() {
+ return this.enrollmentId;
+ }
+
+ /**
+ * Get the require24X7Response property: Indicates if this requires a 24x7 response from Azure.
+ *
+ * @return the require24X7Response value.
+ */
+ public Boolean require24X7Response() {
+ return this.require24X7Response;
+ }
+
+ /**
+ * Set the require24X7Response property: Indicates if this requires a 24x7 response from Azure.
+ *
+ * @param require24X7Response the require24X7Response value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withRequire24X7Response(Boolean require24X7Response) {
+ this.require24X7Response = require24X7Response;
+ return this;
+ }
+
+ /**
+ * Get the contactDetails property: Contact information of the user requesting to create a support ticket.
+ *
+ * @return the contactDetails value.
+ */
+ public ContactProfile contactDetails() {
+ return this.contactDetails;
+ }
+
+ /**
+ * Set the contactDetails property: Contact information of the user requesting to create a support ticket.
+ *
+ * @param contactDetails the contactDetails value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withContactDetails(ContactProfile contactDetails) {
+ this.contactDetails = contactDetails;
+ return this;
+ }
+
+ /**
+ * Get the serviceLevelAgreement property: Service Level Agreement information for this support ticket.
+ *
+ * @return the serviceLevelAgreement value.
+ */
+ public ServiceLevelAgreement serviceLevelAgreement() {
+ return this.serviceLevelAgreement;
+ }
+
+ /**
+ * Set the serviceLevelAgreement property: Service Level Agreement information for this support ticket.
+ *
+ * @param serviceLevelAgreement the serviceLevelAgreement value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withServiceLevelAgreement(ServiceLevelAgreement serviceLevelAgreement) {
+ this.serviceLevelAgreement = serviceLevelAgreement;
+ return this;
+ }
+
+ /**
+ * Get the supportEngineer property: Information about the support engineer working on this support ticket.
+ *
+ * @return the supportEngineer value.
+ */
+ public SupportEngineer supportEngineer() {
+ return this.supportEngineer;
+ }
+
+ /**
+ * Set the supportEngineer property: Information about the support engineer working on this support ticket.
+ *
+ * @param supportEngineer the supportEngineer value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withSupportEngineer(SupportEngineer supportEngineer) {
+ this.supportEngineer = supportEngineer;
+ return this;
+ }
+
+ /**
+ * Get the supportPlanType property: Support plan type associated with the support ticket.
+ *
+ * @return the supportPlanType value.
+ */
+ public String supportPlanType() {
+ return this.supportPlanType;
+ }
+
+ /**
+ * Get the title property: Title of the support ticket.
+ *
+ * @return the title value.
+ */
+ public String title() {
+ return this.title;
+ }
+
+ /**
+ * Set the title property: Title of the support ticket.
+ *
+ * @param title the title value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withTitle(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Get the problemStartTime property: Time in UTC (ISO 8601 format) when the problem started.
+ *
+ * @return the problemStartTime value.
+ */
+ public OffsetDateTime problemStartTime() {
+ return this.problemStartTime;
+ }
+
+ /**
+ * Set the problemStartTime property: Time in UTC (ISO 8601 format) when the problem started.
+ *
+ * @param problemStartTime the problemStartTime value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withProblemStartTime(OffsetDateTime problemStartTime) {
+ this.problemStartTime = problemStartTime;
+ return this;
+ }
+
+ /**
+ * Get the serviceId property: This is the resource Id of the Azure service resource associated with the support
+ * ticket.
+ *
+ * @return the serviceId value.
+ */
+ public String serviceId() {
+ return this.serviceId;
+ }
+
+ /**
+ * Set the serviceId property: This is the resource Id of the Azure service resource associated with the support
+ * ticket.
+ *
+ * @param serviceId the serviceId value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withServiceId(String serviceId) {
+ this.serviceId = serviceId;
+ return this;
+ }
+
+ /**
+ * Get the serviceDisplayName property: Localized name of the Azure service.
+ *
+ * @return the serviceDisplayName value.
+ */
+ public String serviceDisplayName() {
+ return this.serviceDisplayName;
+ }
+
+ /**
+ * Get the status property: Status of the support ticket.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Get the createdDate property: Time in UTC (ISO 8601 format) when the support ticket was created.
+ *
+ * @return the createdDate value.
+ */
+ public OffsetDateTime createdDate() {
+ return this.createdDate;
+ }
+
+ /**
+ * Get the modifiedDate property: Time in UTC (ISO 8601 format) when the support ticket was last modified.
+ *
+ * @return the modifiedDate value.
+ */
+ public OffsetDateTime modifiedDate() {
+ return this.modifiedDate;
+ }
+
+ /**
+ * Get the technicalTicketDetails property: Additional ticket details associated with a technical support ticket
+ * request.
+ *
+ * @return the technicalTicketDetails value.
+ */
+ public TechnicalTicketDetails technicalTicketDetails() {
+ return this.technicalTicketDetails;
+ }
+
+ /**
+ * Set the technicalTicketDetails property: Additional ticket details associated with a technical support ticket
+ * request.
+ *
+ * @param technicalTicketDetails the technicalTicketDetails value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withTechnicalTicketDetails(TechnicalTicketDetails technicalTicketDetails) {
+ this.technicalTicketDetails = technicalTicketDetails;
+ return this;
+ }
+
+ /**
+ * Get the quotaTicketDetails property: Additional ticket details associated with a quota support ticket request.
+ *
+ * @return the quotaTicketDetails value.
+ */
+ public QuotaTicketDetails quotaTicketDetails() {
+ return this.quotaTicketDetails;
+ }
+
+ /**
+ * Set the quotaTicketDetails property: Additional ticket details associated with a quota support ticket request.
+ *
+ * @param quotaTicketDetails the quotaTicketDetails value to set.
+ * @return the SupportTicketDetailsProperties object itself.
+ */
+ public SupportTicketDetailsProperties withQuotaTicketDetails(QuotaTicketDetails quotaTicketDetails) {
+ this.quotaTicketDetails = quotaTicketDetails;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (description() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property description in model SupportTicketDetailsProperties"));
+ }
+ if (problemClassificationId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property problemClassificationId in model SupportTicketDetailsProperties"));
+ }
+ if (severity() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property severity in model SupportTicketDetailsProperties"));
+ }
+ if (contactDetails() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property contactDetails in model SupportTicketDetailsProperties"));
+ } else {
+ contactDetails().validate();
+ }
+ if (serviceLevelAgreement() != null) {
+ serviceLevelAgreement().validate();
+ }
+ if (supportEngineer() != null) {
+ supportEngineer().validate();
+ }
+ if (title() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property title in model SupportTicketDetailsProperties"));
+ }
+ if (serviceId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property serviceId in model SupportTicketDetailsProperties"));
+ }
+ if (technicalTicketDetails() != null) {
+ technicalTicketDetails().validate();
+ }
+ if (quotaTicketDetails() != null) {
+ quotaTicketDetails().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(SupportTicketDetailsProperties.class);
+}
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/CommunicationsClientImpl.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/CommunicationsClientImpl.java
index 103694f16187..2cb06205cf27 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/CommunicationsClientImpl.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/CommunicationsClientImpl.java
@@ -29,7 +29,6 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.support.fluent.CommunicationsClient;
@@ -43,8 +42,6 @@
/** An instance of this class provides access to all the operations defined in CommunicationsClient. */
public final class CommunicationsClientImpl implements CommunicationsClient {
- private final ClientLogger logger = new ClientLogger(CommunicationsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final CommunicationsService service;
@@ -151,7 +148,8 @@ Mono> listNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return output of check name availability API.
+ * @return output of check name availability API along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> checkNameAvailabilityWithResponseAsync(
@@ -206,7 +204,8 @@ private Mono> checkNameAvailabilityWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return output of check name availability API.
+ * @return output of check name availability API along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> checkNameAvailabilityWithResponseAsync(
@@ -257,20 +256,13 @@ private Mono> checkNameAvailabilityWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return output of check name availability API.
+ * @return output of check name availability API on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono checkNameAvailabilityAsync(
String supportTicketName, CheckNameAvailabilityInput checkNameAvailabilityInput) {
return checkNameAvailabilityWithResponseAsync(supportTicketName, checkNameAvailabilityInput)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -300,7 +292,7 @@ public CheckNameAvailabilityOutputInner checkNameAvailability(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return output of check name availability API.
+ * @return output of check name availability API along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response checkNameAvailabilityWithResponse(
@@ -325,7 +317,8 @@ public Response checkNameAvailabilityWithRespo
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Communication resources.
+ * @return collection of Communication resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(
@@ -390,7 +383,8 @@ private Mono> listSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Communication resources.
+ * @return collection of Communication resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(
@@ -451,7 +445,7 @@ private Mono> listSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Communication resources.
+ * @return collection of Communication resources as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String supportTicketName, Integer top, String filter) {
@@ -471,7 +465,7 @@ private PagedFlux listAsync(String supportTicketName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Communication resources.
+ * @return collection of Communication resources as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String supportTicketName) {
@@ -499,7 +493,7 @@ private PagedFlux listAsync(String supportTicketName)
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Communication resources.
+ * @return collection of Communication resources as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(
@@ -521,7 +515,7 @@ private PagedFlux listAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Communication resources.
+ * @return collection of Communication resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String supportTicketName) {
@@ -548,7 +542,7 @@ public PagedIterable list(String supportTicketName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Communication resources.
+ * @return collection of Communication resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(
@@ -564,7 +558,8 @@ public PagedIterable list(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return object that represents a Communication resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -614,7 +609,8 @@ private Mono> getWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return object that represents a Communication resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -660,19 +656,12 @@ private Mono> getWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return object that represents a Communication resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String supportTicketName, String communicationName) {
return getWithResponseAsync(supportTicketName, communicationName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -699,7 +688,7 @@ public CommunicationDetailsInner get(String supportTicketName, String communicat
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return object that represents a Communication resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(
@@ -716,7 +705,8 @@ public Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return object that represents a Communication resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -776,7 +766,8 @@ private Mono>> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return object that represents a Communication resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -835,9 +826,9 @@ private Mono>> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return the {@link PollerFlux} for polling of object that represents a Communication resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, CommunicationDetailsInner> beginCreateAsync(
String supportTicketName, String communicationName, CommunicationDetailsInner createCommunicationParameters) {
Mono>> mono =
@@ -849,7 +840,7 @@ private PollerFlux, CommunicationDetailsIn
this.client.getHttpPipeline(),
CommunicationDetailsInner.class,
CommunicationDetailsInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -862,9 +853,9 @@ private PollerFlux, CommunicationDetailsIn
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return the {@link PollerFlux} for polling of object that represents a Communication resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, CommunicationDetailsInner> beginCreateAsync(
String supportTicketName,
String communicationName,
@@ -892,9 +883,9 @@ private PollerFlux, CommunicationDetailsIn
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return the {@link SyncPoller} for polling of object that represents a Communication resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, CommunicationDetailsInner> beginCreate(
String supportTicketName, String communicationName, CommunicationDetailsInner createCommunicationParameters) {
return beginCreateAsync(supportTicketName, communicationName, createCommunicationParameters).getSyncPoller();
@@ -910,9 +901,9 @@ public SyncPoller, CommunicationDetailsInn
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return the {@link SyncPoller} for polling of object that represents a Communication resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, CommunicationDetailsInner> beginCreate(
String supportTicketName,
String communicationName,
@@ -931,7 +922,7 @@ public SyncPoller, CommunicationDetailsInn
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return object that represents a Communication resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -951,7 +942,7 @@ private Mono createAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return object that represents a Communication resource.
+ * @return object that represents a Communication resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -1009,7 +1000,8 @@ public CommunicationDetailsInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Communication resources.
+ * @return collection of Communication resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -1045,7 +1037,8 @@ private Mono> listNextSinglePageAsync(S
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of Communication resources.
+ * @return collection of Communication resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/CommunicationsImpl.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/CommunicationsImpl.java
index e7b1d33b8472..0eaa1f28abb2 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/CommunicationsImpl.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/CommunicationsImpl.java
@@ -16,10 +16,9 @@
import com.azure.resourcemanager.support.models.CheckNameAvailabilityOutput;
import com.azure.resourcemanager.support.models.CommunicationDetails;
import com.azure.resourcemanager.support.models.Communications;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class CommunicationsImpl implements Communications {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CommunicationsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(CommunicationsImpl.class);
private final CommunicationsClient innerClient;
@@ -98,7 +97,7 @@ public Response getWithResponse(
public CommunicationDetails getById(String id) {
String supportTicketName = Utils.getValueFromIdByName(id, "supportTickets");
if (supportTicketName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -106,7 +105,7 @@ public CommunicationDetails getById(String id) {
}
String communicationName = Utils.getValueFromIdByName(id, "communications");
if (communicationName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -118,7 +117,7 @@ public CommunicationDetails getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String supportTicketName = Utils.getValueFromIdByName(id, "supportTickets");
if (supportTicketName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -126,7 +125,7 @@ public Response getByIdWithResponse(String id, Context con
}
String communicationName = Utils.getValueFromIdByName(id, "communications");
if (communicationName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/MicrosoftSupportBuilder.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/MicrosoftSupportBuilder.java
index a50bce75e809..cca5cef6e286 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/MicrosoftSupportBuilder.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/MicrosoftSupportBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public MicrosoftSupportBuilder environment(AzureEnvironment environment) {
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the MicrosoftSupportBuilder.
*/
- public MicrosoftSupportBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public MicrosoftSupportBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the MicrosoftSupportBuilder.
*/
- public MicrosoftSupportBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public MicrosoftSupportBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -126,15 +125,12 @@ public MicrosoftSupportImpl buildClient() {
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
diff --git a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/MicrosoftSupportImpl.java b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/MicrosoftSupportImpl.java
index 30d9e141c573..8bd50053528f 100644
--- a/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/MicrosoftSupportImpl.java
+++ b/sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/MicrosoftSupportImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -33,15 +34,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the MicrosoftSupportImpl type. */
@ServiceClient(builder = MicrosoftSupportBuilder.class)
public final class MicrosoftSupportImpl implements MicrosoftSupport {
- private final ClientLogger logger = new ClientLogger(MicrosoftSupportImpl.class);
-
/** Azure subscription Id. */
private final String subscriptionId;
@@ -220,10 +218,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry