diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md index b565bd3ee5b5..a395158211b4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.2.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2023-05-15) + +- Azure Resource Manager EventGrid client library for Java. This package contains Microsoft Azure SDK for EventGrid Management SDK. Azure EventGrid Management Client. Package tag package-2023-06-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md index 9063c102f831..b345c48bbe89 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/README.md @@ -2,7 +2,7 @@ Azure Resource Manager EventGrid client library for Java. -This package contains Microsoft Azure SDK for EventGrid Management SDK. Azure EventGrid Management Client. Package tag package-2022-06. 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 EventGrid Management SDK. Azure EventGrid Management Client. Package tag package-2023-06-preview. 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.resourcemanager azure-resourcemanager-eventgrid - 1.2.0-beta.3 + 1.2.0-beta.4 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md b/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md index 3e39d874a16f..af99860b6e81 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/SAMPLE.md @@ -1,6 +1,13 @@ # Code snippets and samples +## CaCertificates + +- [CreateOrUpdate](#cacertificates_createorupdate) +- [Delete](#cacertificates_delete) +- [Get](#cacertificates_get) +- [ListByNamespace](#cacertificates_listbynamespace) + ## Channels - [CreateOrUpdate](#channels_createorupdate) @@ -10,6 +17,20 @@ - [ListByPartnerNamespace](#channels_listbypartnernamespace) - [Update](#channels_update) +## ClientGroups + +- [CreateOrUpdate](#clientgroups_createorupdate) +- [Delete](#clientgroups_delete) +- [Get](#clientgroups_get) +- [ListByNamespace](#clientgroups_listbynamespace) + +## Clients + +- [CreateOrUpdate](#clients_createorupdate) +- [Delete](#clients_delete) +- [Get](#clients_get) +- [ListByNamespace](#clients_listbynamespace) + ## DomainEventSubscriptions - [CreateOrUpdate](#domaineventsubscriptions_createorupdate) @@ -71,6 +92,35 @@ - [Get](#extensiontopics_get) +## NamespaceTopicEventSubscriptions + +- [CreateOrUpdate](#namespacetopiceventsubscriptions_createorupdate) +- [Delete](#namespacetopiceventsubscriptions_delete) +- [Get](#namespacetopiceventsubscriptions_get) +- [ListByNamespaceTopic](#namespacetopiceventsubscriptions_listbynamespacetopic) +- [Update](#namespacetopiceventsubscriptions_update) + +## NamespaceTopics + +- [CreateOrUpdate](#namespacetopics_createorupdate) +- [Delete](#namespacetopics_delete) +- [Get](#namespacetopics_get) +- [ListByNamespace](#namespacetopics_listbynamespace) +- [ListSharedAccessKeys](#namespacetopics_listsharedaccesskeys) +- [RegenerateKey](#namespacetopics_regeneratekey) +- [Update](#namespacetopics_update) + +## Namespaces + +- [CreateOrUpdate](#namespaces_createorupdate) +- [Delete](#namespaces_delete) +- [GetByResourceGroup](#namespaces_getbyresourcegroup) +- [List](#namespaces_list) +- [ListByResourceGroup](#namespaces_listbyresourcegroup) +- [ListSharedAccessKeys](#namespaces_listsharedaccesskeys) +- [RegenerateKey](#namespaces_regeneratekey) +- [Update](#namespaces_update) + ## Operations - [List](#operations_list) @@ -86,6 +136,16 @@ - [UnauthorizePartner](#partnerconfigurations_unauthorizepartner) - [Update](#partnerconfigurations_update) +## PartnerDestinations + +- [Activate](#partnerdestinations_activate) +- [CreateOrUpdate](#partnerdestinations_createorupdate) +- [Delete](#partnerdestinations_delete) +- [GetByResourceGroup](#partnerdestinations_getbyresourcegroup) +- [List](#partnerdestinations_list) +- [ListByResourceGroup](#partnerdestinations_listbyresourcegroup) +- [Update](#partnerdestinations_update) + ## PartnerNamespaces - [CreateOrUpdate](#partnernamespaces_createorupdate) @@ -127,6 +187,13 @@ - [ListByResourceGroup](#partnertopics_listbyresourcegroup) - [Update](#partnertopics_update) +## PermissionBindings + +- [CreateOrUpdate](#permissionbindings_createorupdate) +- [Delete](#permissionbindings_delete) +- [Get](#permissionbindings_get) +- [ListByNamespace](#permissionbindings_listbynamespace) + ## PrivateEndpointConnections - [Delete](#privateendpointconnections_delete) @@ -168,6 +235,13 @@ - [List](#topiceventsubscriptions_list) - [Update](#topiceventsubscriptions_update) +## TopicSpaces + +- [CreateOrUpdate](#topicspaces_createorupdate) +- [Delete](#topicspaces_delete) +- [Get](#topicspaces_get) +- [ListByNamespace](#topicspaces_listbynamespace) + ## TopicTypes - [Get](#topictypes_get) @@ -190,6 +264,96 @@ - [Get](#verifiedpartners_get) - [List](#verifiedpartners_list) +### CaCertificates_CreateOrUpdate + +```java +/** Samples for CaCertificates CreateOrUpdate. */ +public final class CaCertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/CaCertificates_CreateOrUpdate.json + */ + /** + * Sample code: CaCertificates_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void caCertificatesCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .caCertificates() + .define("exampleCACertificateName1") + .withExistingNamespace("examplerg", "exampleNamespaceName1") + .withDescription("This is a test certificate") + .withEncodedCertificate("base64EncodePemFormattedCertificateString") + .create(); + } +} +``` + +### CaCertificates_Delete + +```java +/** Samples for CaCertificates Delete. */ +public final class CaCertificatesDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/CaCertificates_Delete.json + */ + /** + * Sample code: CaCertificates_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void caCertificatesDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .caCertificates() + .delete( + "examplerg", "exampleNamespaceName1", "exampleCACertificateName1", com.azure.core.util.Context.NONE); + } +} +``` + +### CaCertificates_Get + +```java +/** Samples for CaCertificates Get. */ +public final class CaCertificatesGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/CaCertificates_Get.json + */ + /** + * Sample code: CaCertificates_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void caCertificatesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .caCertificates() + .getWithResponse( + "examplerg", "exampleNamespaceName1", "exampleCACertificateName1", com.azure.core.util.Context.NONE); + } +} +``` + +### CaCertificates_ListByNamespace + +```java +/** Samples for CaCertificates ListByNamespace. */ +public final class CaCertificatesListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/CaCertificates_ListByNamespace.json + */ + /** + * Sample code: CaCertificates_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void caCertificatesListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .caCertificates() + .listByNamespace("examplerg", "namespace123", null, null, com.azure.core.util.Context.NONE); + } +} +``` + ### Channels_CreateOrUpdate ```java @@ -200,7 +364,7 @@ import java.time.OffsetDateTime; /** Samples for Channels CreateOrUpdate. */ public final class ChannelsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_CreateOrUpdate.json */ /** * Sample code: Channels_CreateOrUpdate. @@ -215,7 +379,7 @@ public final class ChannelsCreateOrUpdateSamples { .withChannelType(ChannelType.PARTNER_TOPIC) .withPartnerTopicInfo( new PartnerTopicInfo() - .withAzureSubscriptionId("5b4b650e-28b9-4790-b3ab-ddbd88d727c4") + .withAzureSubscriptionId("8f6b6269-84f2-4d09-9e31-1127efcd1e40") .withResourceGroupName("examplerg2") .withName("examplePartnerTopic1") .withSource("ContosoCorp.Accounts.User1")) @@ -229,12 +393,10 @@ public final class ChannelsCreateOrUpdateSamples { ### Channels_Delete ```java -import com.azure.core.util.Context; - /** Samples for Channels Delete. */ public final class ChannelsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_Delete.json */ /** * Sample code: Channels_Delete. @@ -244,7 +406,11 @@ public final class ChannelsDeleteSamples { public static void channelsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .channels() - .delete("examplerg", "examplePartnerNamespaceName1", "exampleEventChannelName1", Context.NONE); + .delete( + "examplerg", + "examplePartnerNamespaceName1", + "exampleEventChannelName1", + com.azure.core.util.Context.NONE); } } ``` @@ -252,12 +418,10 @@ public final class ChannelsDeleteSamples { ### Channels_Get ```java -import com.azure.core.util.Context; - /** Samples for Channels Get. */ public final class ChannelsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_Get.json */ /** * Sample code: Channels_Get. @@ -267,7 +431,8 @@ public final class ChannelsGetSamples { public static void channelsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .channels() - .getWithResponse("examplerg", "examplePartnerNamespaceName1", "exampleChannelName1", Context.NONE); + .getWithResponse( + "examplerg", "examplePartnerNamespaceName1", "exampleChannelName1", com.azure.core.util.Context.NONE); } } ``` @@ -275,12 +440,10 @@ public final class ChannelsGetSamples { ### Channels_GetFullUrl ```java -import com.azure.core.util.Context; - /** Samples for Channels GetFullUrl. */ public final class ChannelsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_GetFullUrl.json */ /** * Sample code: Channels_GetFullUrl. @@ -288,7 +451,10 @@ public final class ChannelsGetFullUrlSamples { * @param manager Entry point to EventGridManager. */ public static void channelsGetFullUrl(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.channels().getFullUrlWithResponse("examplerg", "examplenamespace", "examplechannel", Context.NONE); + manager + .channels() + .getFullUrlWithResponse( + "examplerg", "examplenamespace", "examplechannel", com.azure.core.util.Context.NONE); } } ``` @@ -296,12 +462,10 @@ public final class ChannelsGetFullUrlSamples { ### Channels_ListByPartnerNamespace ```java -import com.azure.core.util.Context; - /** Samples for Channels ListByPartnerNamespace. */ public final class ChannelsListByPartnerNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_ListByPartnerNamespace.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_ListByPartnerNamespace.json */ /** * Sample code: Channels_ListByPartnerNamespace. @@ -311,7 +475,8 @@ public final class ChannelsListByPartnerNamespaceSamples { public static void channelsListByPartnerNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .channels() - .listByPartnerNamespace("examplerg", "examplePartnerNamespaceName1", null, null, Context.NONE); + .listByPartnerNamespace( + "examplerg", "examplePartnerNamespaceName1", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -319,14 +484,13 @@ public final class ChannelsListByPartnerNamespaceSamples { ### Channels_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.ChannelUpdateParameters; import java.time.OffsetDateTime; /** Samples for Channels Update. */ public final class ChannelsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_Update.json */ /** * Sample code: Channels_Update. @@ -342,7 +506,222 @@ public final class ChannelsUpdateSamples { "exampleChannelName1", new ChannelUpdateParameters() .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2022-03-23T23:06:11.785Z")), - Context.NONE); + com.azure.core.util.Context.NONE); + } +} +``` + +### ClientGroups_CreateOrUpdate + +```java +/** Samples for ClientGroups CreateOrUpdate. */ +public final class ClientGroupsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/ClientGroups_CreateOrUpdate.json + */ + /** + * Sample code: ClientGroups_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientGroupsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clientGroups() + .define("exampleClientGroupName1") + .withExistingNamespace("examplerg", "exampleNamespaceName1") + .withDescription("This is a test client group") + .withQuery("attributes.b IN ['a', 'b', 'c']") + .create(); + } +} +``` + +### ClientGroups_Delete + +```java +/** Samples for ClientGroups Delete. */ +public final class ClientGroupsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/ClientGroups_Delete.json + */ + /** + * Sample code: ClientGroups_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientGroupsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clientGroups() + .delete("examplerg", "exampleNamespaceName1", "exampleClientGroupName1", com.azure.core.util.Context.NONE); + } +} +``` + +### ClientGroups_Get + +```java +/** Samples for ClientGroups Get. */ +public final class ClientGroupsGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/ClientGroups_Get.json + */ + /** + * Sample code: ClientGroups_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientGroupsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clientGroups() + .getWithResponse( + "examplerg", "exampleNamespaceName1", "exampleClientGroupName1", com.azure.core.util.Context.NONE); + } +} +``` + +### ClientGroups_ListByNamespace + +```java +/** Samples for ClientGroups ListByNamespace. */ +public final class ClientGroupsListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/ClientGroups_ListByNamespace.json + */ + /** + * Sample code: ClientGroups_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientGroupsListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clientGroups() + .listByNamespace("examplerg", "namespace123", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### Clients_CreateOrUpdate + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.eventgrid.models.ClientAuthentication; +import com.azure.resourcemanager.eventgrid.models.ClientCertificateSubjectDistinguishedName; +import com.azure.resourcemanager.eventgrid.models.ClientState; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Clients CreateOrUpdate. */ +public final class ClientsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Clients_CreateOrUpdate.json + */ + /** + * Sample code: Clients_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) + throws IOException { + manager + .clients() + .define("exampleClientName1") + .withExistingNamespace("examplerg", "exampleNamespaceName1") + .withDescription("This is a test client") + .withAuthentication( + new ClientAuthentication() + .withCertificateSubject( + new ClientCertificateSubjectDistinguishedName() + .withCommonName("CertificateCommonName") + .withOrganization("Microsoft") + .withOrganizationUnit("Azure") + .withCountryCode("fakeTokenPlaceholder"))) + .withState(ClientState.ENABLED) + .withAttributes( + mapOf( + "deviceTypes", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("[\"Fan\",\"Light\",\"AC\"]", Object.class, SerializerEncoding.JSON), + "floor", + 3, + "room", + "345")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Clients_Delete + +```java +/** Samples for Clients Delete. */ +public final class ClientsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Clients_Delete.json + */ + /** + * Sample code: Clients_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clients() + .delete("examplerg", "exampleNamespaceName1", "exampleClientName1", com.azure.core.util.Context.NONE); + } +} +``` + +### Clients_Get + +```java +/** Samples for Clients Get. */ +public final class ClientsGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Clients_Get.json + */ + /** + * Sample code: Clients_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clients() + .getWithResponse( + "examplerg", "exampleNamespaceName1", "exampleClientName1", com.azure.core.util.Context.NONE); + } +} +``` + +### Clients_ListByNamespace + +```java +/** Samples for Clients ListByNamespace. */ +public final class ClientsListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Clients_ListByNamespace.json + */ + /** + * Sample code: Clients_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientsListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.clients().listByNamespace("examplerg", "namespace123", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -350,7 +729,6 @@ public final class ChannelsUpdateSamples { ### DomainEventSubscriptions_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -358,7 +736,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin /** Samples for DomainEventSubscriptions CreateOrUpdate. */ public final class DomainEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: DomainEventSubscriptions_CreateOrUpdate. @@ -381,7 +759,7 @@ public final class DomainEventSubscriptionsCreateOrUpdateSamples { .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -389,12 +767,10 @@ public final class DomainEventSubscriptionsCreateOrUpdateSamples { ### DomainEventSubscriptions_Delete ```java -import com.azure.core.util.Context; - /** Samples for DomainEventSubscriptions Delete. */ public final class DomainEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_Delete.json */ /** * Sample code: DomainEventSubscriptions_Delete. @@ -402,7 +778,9 @@ public final class DomainEventSubscriptionsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void domainEventSubscriptionsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainEventSubscriptions().delete("examplerg", "exampleDomain1", "examplesubscription1", Context.NONE); + manager + .domainEventSubscriptions() + .delete("examplerg", "exampleDomain1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -410,12 +788,10 @@ public final class DomainEventSubscriptionsDeleteSamples { ### DomainEventSubscriptions_Get ```java -import com.azure.core.util.Context; - /** Samples for DomainEventSubscriptions Get. */ public final class DomainEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_Get.json */ /** * Sample code: DomainEventSubscriptions_Get. @@ -425,7 +801,7 @@ public final class DomainEventSubscriptionsGetSamples { public static void domainEventSubscriptionsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainEventSubscriptions() - .getWithResponse("examplerg", "exampleDomain1", "examplesubscription1", Context.NONE); + .getWithResponse("examplerg", "exampleDomain1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -433,12 +809,10 @@ public final class DomainEventSubscriptionsGetSamples { ### DomainEventSubscriptions_GetDeliveryAttributes ```java -import com.azure.core.util.Context; - /** Samples for DomainEventSubscriptions GetDeliveryAttributes. */ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: DomainEventSubscriptions_GetDeliveryAttributes. @@ -449,7 +823,8 @@ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainEventSubscriptions() - .getDeliveryAttributesWithResponse("examplerg", "exampleDomain1", "examplesubscription1", Context.NONE); + .getDeliveryAttributesWithResponse( + "examplerg", "exampleDomain1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -457,12 +832,10 @@ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { ### DomainEventSubscriptions_GetFullUrl ```java -import com.azure.core.util.Context; - /** Samples for DomainEventSubscriptions GetFullUrl. */ public final class DomainEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_GetFullUrl.json */ /** * Sample code: DomainEventSubscriptions_GetFullUrl. @@ -473,7 +846,8 @@ public final class DomainEventSubscriptionsGetFullUrlSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainEventSubscriptions() - .getFullUrlWithResponse("examplerg", "exampleDomain1", "examplesubscription1", Context.NONE); + .getFullUrlWithResponse( + "examplerg", "exampleDomain1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -481,12 +855,10 @@ public final class DomainEventSubscriptionsGetFullUrlSamples { ### DomainEventSubscriptions_List ```java -import com.azure.core.util.Context; - /** Samples for DomainEventSubscriptions List. */ public final class DomainEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_List.json */ /** * Sample code: DomainEventSubscriptions_List. @@ -494,7 +866,9 @@ public final class DomainEventSubscriptionsListSamples { * @param manager Entry point to EventGridManager. */ public static void domainEventSubscriptionsList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainEventSubscriptions().list("examplerg", "exampleDomain1", null, null, Context.NONE); + manager + .domainEventSubscriptions() + .list("examplerg", "exampleDomain1", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -502,7 +876,6 @@ public final class DomainEventSubscriptionsListSamples { ### DomainEventSubscriptions_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -511,7 +884,7 @@ import java.util.Arrays; /** Samples for DomainEventSubscriptions Update. */ public final class DomainEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_Update.json */ /** * Sample code: DomainEventSubscriptions_Update. @@ -534,7 +907,7 @@ public final class DomainEventSubscriptionsUpdateSamples { .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -542,15 +915,13 @@ public final class DomainEventSubscriptionsUpdateSamples { ### DomainTopicEventSubscriptions_CreateOrUpdate ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; /** Samples for DomainTopicEventSubscriptions CreateOrUpdate. */ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: DomainTopicEventSubscriptions_CreateOrUpdate. @@ -561,20 +932,15 @@ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainTopicEventSubscriptions() - .createOrUpdate( - "examplerg", - "exampleDomain1", - "exampleDomainTopic1", - "exampleEventSubscriptionName1", - new EventSubscriptionInner() - .withDestination( - new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) - .withFilter( - new EventSubscriptionFilter() - .withSubjectBeginsWith("ExamplePrefix") - .withSubjectEndsWith("ExampleSuffix") - .withIsSubjectCaseSensitive(false)), - Context.NONE); + .define("exampleEventSubscriptionName1") + .withExistingTopic("examplerg", "exampleDomain1", "exampleDomainTopic1") + .withDestination(new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) + .withFilter( + new EventSubscriptionFilter() + .withSubjectBeginsWith("ExamplePrefix") + .withSubjectEndsWith("ExampleSuffix") + .withIsSubjectCaseSensitive(false)) + .create(); } } ``` @@ -582,12 +948,10 @@ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { ### DomainTopicEventSubscriptions_Delete ```java -import com.azure.core.util.Context; - /** Samples for DomainTopicEventSubscriptions Delete. */ public final class DomainTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_Delete.json */ /** * Sample code: DomainTopicEventSubscriptions_Delete. @@ -598,7 +962,12 @@ public final class DomainTopicEventSubscriptionsDeleteSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainTopicEventSubscriptions() - .delete("examplerg", "exampleDomain1", "exampleDomainTopic1", "examplesubscription1", Context.NONE); + .delete( + "examplerg", + "exampleDomain1", + "exampleDomainTopic1", + "examplesubscription1", + com.azure.core.util.Context.NONE); } } ``` @@ -606,12 +975,10 @@ public final class DomainTopicEventSubscriptionsDeleteSamples { ### DomainTopicEventSubscriptions_Get ```java -import com.azure.core.util.Context; - /** Samples for DomainTopicEventSubscriptions Get. */ public final class DomainTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_Get.json */ /** * Sample code: DomainTopicEventSubscriptions_Get. @@ -622,7 +989,11 @@ public final class DomainTopicEventSubscriptionsGetSamples { manager .domainTopicEventSubscriptions() .getWithResponse( - "examplerg", "exampleDomain1", "exampleDomainTopic1", "examplesubscription1", Context.NONE); + "examplerg", + "exampleDomain1", + "exampleDomainTopic1", + "examplesubscription1", + com.azure.core.util.Context.NONE); } } ``` @@ -630,12 +1001,10 @@ public final class DomainTopicEventSubscriptionsGetSamples { ### DomainTopicEventSubscriptions_GetDeliveryAttributes ```java -import com.azure.core.util.Context; - /** Samples for DomainTopicEventSubscriptions GetDeliveryAttributes. */ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: DomainTopicEventSubscriptions_GetDeliveryAttributes. @@ -647,7 +1016,11 @@ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { manager .domainTopicEventSubscriptions() .getDeliveryAttributesWithResponse( - "examplerg", "exampleDomain1", "exampleDomainTopic1", "examplesubscription1", Context.NONE); + "examplerg", + "exampleDomain1", + "exampleDomainTopic1", + "examplesubscription1", + com.azure.core.util.Context.NONE); } } ``` @@ -655,12 +1028,10 @@ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { ### DomainTopicEventSubscriptions_GetFullUrl ```java -import com.azure.core.util.Context; - /** Samples for DomainTopicEventSubscriptions GetFullUrl. */ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: DomainTopicEventSubscriptions_GetFullUrl. @@ -672,20 +1043,22 @@ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { manager .domainTopicEventSubscriptions() .getFullUrlWithResponse( - "examplerg", "exampleDomain1", "exampleDomainTopic1", "examplesubscription1", Context.NONE); - } + "examplerg", + "exampleDomain1", + "exampleDomainTopic1", + "examplesubscription1", + com.azure.core.util.Context.NONE); + } } ``` ### DomainTopicEventSubscriptions_List ```java -import com.azure.core.util.Context; - /** Samples for DomainTopicEventSubscriptions List. */ public final class DomainTopicEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_List.json */ /** * Sample code: DomainTopicEventSubscriptions_List. @@ -695,7 +1068,7 @@ public final class DomainTopicEventSubscriptionsListSamples { public static void domainTopicEventSubscriptionsList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainTopicEventSubscriptions() - .list("examplerg", "exampleDomain1", "exampleDomainTopic1", null, null, Context.NONE); + .list("examplerg", "exampleDomain1", "exampleDomainTopic1", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -703,16 +1076,15 @@ public final class DomainTopicEventSubscriptionsListSamples { ### DomainTopicEventSubscriptions_Update ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.models.EventSubscription; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; import java.util.Arrays; /** Samples for DomainTopicEventSubscriptions Update. */ public final class DomainTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_Update.json */ /** * Sample code: DomainTopicEventSubscriptions_Update. @@ -721,23 +1093,26 @@ public final class DomainTopicEventSubscriptionsUpdateSamples { */ public static void domainTopicEventSubscriptionsUpdate( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager - .domainTopicEventSubscriptions() - .update( - "examplerg", - "exampleDomain1", - "exampleDomainTopic1", - "exampleEventSubscriptionName1", - new EventSubscriptionUpdateParameters() - .withDestination( - new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) - .withFilter( - new EventSubscriptionFilter() - .withSubjectBeginsWith("existingPrefix") - .withSubjectEndsWith("newSuffix") - .withIsSubjectCaseSensitive(true)) - .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + EventSubscription resource = + manager + .domainTopicEventSubscriptions() + .getWithResponse( + "examplerg", + "exampleDomain1", + "exampleDomainTopic1", + "exampleEventSubscriptionName1", + com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withDestination(new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) + .withFilter( + new EventSubscriptionFilter() + .withSubjectBeginsWith("existingPrefix") + .withSubjectEndsWith("newSuffix") + .withIsSubjectCaseSensitive(true)) + .withLabels(Arrays.asList("label1", "label2")) + .apply(); } } ``` @@ -745,12 +1120,10 @@ public final class DomainTopicEventSubscriptionsUpdateSamples { ### DomainTopics_CreateOrUpdate ```java -import com.azure.core.util.Context; - /** Samples for DomainTopics CreateOrUpdate. */ public final class DomainTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopics_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopics_CreateOrUpdate.json */ /** * Sample code: DomainTopics_CreateOrUpdate. @@ -758,7 +1131,9 @@ public final class DomainTopicsCreateOrUpdateSamples { * @param manager Entry point to EventGridManager. */ public static void domainTopicsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainTopics().createOrUpdate("examplerg", "exampledomain1", "exampledomaintopic1", Context.NONE); + manager + .domainTopics() + .createOrUpdate("examplerg", "exampledomain1", "exampledomaintopic1", com.azure.core.util.Context.NONE); } } ``` @@ -766,12 +1141,10 @@ public final class DomainTopicsCreateOrUpdateSamples { ### DomainTopics_Delete ```java -import com.azure.core.util.Context; - /** Samples for DomainTopics Delete. */ public final class DomainTopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopics_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopics_Delete.json */ /** * Sample code: DomainTopics_Delete. @@ -779,7 +1152,9 @@ public final class DomainTopicsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void domainTopicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainTopics().delete("examplerg", "exampledomain1", "exampledomaintopic1", Context.NONE); + manager + .domainTopics() + .delete("examplerg", "exampledomain1", "exampledomaintopic1", com.azure.core.util.Context.NONE); } } ``` @@ -787,12 +1162,10 @@ public final class DomainTopicsDeleteSamples { ### DomainTopics_Get ```java -import com.azure.core.util.Context; - /** Samples for DomainTopics Get. */ public final class DomainTopicsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopics_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopics_Get.json */ /** * Sample code: DomainTopics_Get. @@ -800,7 +1173,9 @@ public final class DomainTopicsGetSamples { * @param manager Entry point to EventGridManager. */ public static void domainTopicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainTopics().getWithResponse("examplerg", "exampledomain2", "topic1", Context.NONE); + manager + .domainTopics() + .getWithResponse("examplerg", "exampledomain2", "topic1", com.azure.core.util.Context.NONE); } } ``` @@ -808,12 +1183,10 @@ public final class DomainTopicsGetSamples { ### DomainTopics_ListByDomain ```java -import com.azure.core.util.Context; - /** Samples for DomainTopics ListByDomain. */ public final class DomainTopicsListByDomainSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopics_ListByDomain.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopics_ListByDomain.json */ /** * Sample code: DomainTopics_ListByDomain. @@ -821,7 +1194,9 @@ public final class DomainTopicsListByDomainSamples { * @param manager Entry point to EventGridManager. */ public static void domainTopicsListByDomain(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainTopics().listByDomain("examplerg", "exampledomain2", null, null, Context.NONE); + manager + .domainTopics() + .listByDomain("examplerg", "exampledomain2", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -839,7 +1214,7 @@ import java.util.Map; /** Samples for Domains CreateOrUpdate. */ public final class DomainsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_CreateOrUpdate.json */ /** * Sample code: Domains_CreateOrUpdate. @@ -878,12 +1253,10 @@ public final class DomainsCreateOrUpdateSamples { ### Domains_Delete ```java -import com.azure.core.util.Context; - /** Samples for Domains Delete. */ public final class DomainsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_Delete.json */ /** * Sample code: Domains_Delete. @@ -891,7 +1264,7 @@ public final class DomainsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void domainsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domains().delete("examplerg", "exampledomain1", Context.NONE); + manager.domains().delete("examplerg", "exampledomain1", com.azure.core.util.Context.NONE); } } ``` @@ -899,12 +1272,10 @@ public final class DomainsDeleteSamples { ### Domains_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Domains GetByResourceGroup. */ public final class DomainsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_Get.json */ /** * Sample code: Domains_Get. @@ -912,7 +1283,9 @@ public final class DomainsGetByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void domainsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domains().getByResourceGroupWithResponse("examplerg", "exampledomain2", Context.NONE); + manager + .domains() + .getByResourceGroupWithResponse("examplerg", "exampledomain2", com.azure.core.util.Context.NONE); } } ``` @@ -920,12 +1293,10 @@ public final class DomainsGetByResourceGroupSamples { ### Domains_List ```java -import com.azure.core.util.Context; - /** Samples for Domains List. */ public final class DomainsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_ListBySubscription.json */ /** * Sample code: Domains_ListBySubscription. @@ -933,7 +1304,7 @@ public final class DomainsListSamples { * @param manager Entry point to EventGridManager. */ public static void domainsListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domains().list(null, null, Context.NONE); + manager.domains().list(null, null, com.azure.core.util.Context.NONE); } } ``` @@ -941,12 +1312,10 @@ public final class DomainsListSamples { ### Domains_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Domains ListByResourceGroup. */ public final class DomainsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_ListByResourceGroup.json */ /** * Sample code: Domains_ListByResourceGroup. @@ -954,7 +1323,7 @@ public final class DomainsListByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void domainsListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domains().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.domains().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -962,12 +1331,10 @@ public final class DomainsListByResourceGroupSamples { ### Domains_ListSharedAccessKeys ```java -import com.azure.core.util.Context; - /** Samples for Domains ListSharedAccessKeys. */ public final class DomainsListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_ListSharedAccessKeys.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_ListSharedAccessKeys.json */ /** * Sample code: Domains_ListSharedAccessKeys. @@ -975,7 +1342,9 @@ public final class DomainsListSharedAccessKeysSamples { * @param manager Entry point to EventGridManager. */ public static void domainsListSharedAccessKeys(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domains().listSharedAccessKeysWithResponse("examplerg", "exampledomain2", Context.NONE); + manager + .domains() + .listSharedAccessKeysWithResponse("examplerg", "exampledomain2", com.azure.core.util.Context.NONE); } } ``` @@ -983,13 +1352,12 @@ public final class DomainsListSharedAccessKeysSamples { ### Domains_RegenerateKey ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.DomainRegenerateKeyRequest; /** Samples for Domains RegenerateKey. */ public final class DomainsRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_RegenerateKey.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_RegenerateKey.json */ /** * Sample code: Domains_RegenerateKey. @@ -1000,7 +1368,10 @@ public final class DomainsRegenerateKeySamples { manager .domains() .regenerateKeyWithResponse( - "examplerg", "exampledomain2", new DomainRegenerateKeyRequest().withKeyName("key1"), Context.NONE); + "examplerg", + "exampledomain2", + new DomainRegenerateKeyRequest().withKeyName("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); } } ``` @@ -1008,7 +1379,6 @@ public final class DomainsRegenerateKeySamples { ### Domains_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.Domain; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.IpActionType; @@ -1020,7 +1390,7 @@ import java.util.Map; /** Samples for Domains Update. */ public final class DomainsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_Update.json */ /** * Sample code: Domains_Update. @@ -1029,7 +1399,10 @@ public final class DomainsUpdateSamples { */ public static void domainsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { Domain resource = - manager.domains().getByResourceGroupWithResponse("examplerg", "exampledomain1", Context.NONE).getValue(); + manager + .domains() + .getByResourceGroupWithResponse("examplerg", "exampledomain1", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) @@ -1058,7 +1431,6 @@ public final class DomainsUpdateSamples { ### EventSubscriptions_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.AzureFunctionEventSubscriptionDestination; import com.azure.resourcemanager.eventgrid.models.EventHubEventSubscriptionDestination; @@ -1073,7 +1445,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin /** Samples for EventSubscriptions CreateOrUpdate. */ public final class EventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination. @@ -1085,23 +1457,23 @@ public final class EventSubscriptionsCreateOrUpdateSamples { manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( - new WebhookEventSubscriptionDestination() - .withEndpointUrl( - "https://azurefunctionexample.azurewebsites.net/runtime/webhooks/EventGrid?functionName=EventGridTrigger1&code=PASSWORDCODE")) + new EventHubEventSubscriptionDestination() + .withResourceId( + "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1")) .withFilter( new EventSubscriptionFilter() .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForSubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForSubscription.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForSubscription. @@ -1113,17 +1485,17 @@ public final class EventSubscriptionsCreateOrUpdateSamples { manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", new EventSubscriptionInner() .withDestination( new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) .withFilter(new EventSubscriptionFilter().withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination. @@ -1135,7 +1507,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -1152,11 +1524,11 @@ public final class EventSubscriptionsCreateOrUpdateSamples { .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResource.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResource. @@ -1168,7 +1540,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription10", new EventSubscriptionInner() .withDestination( @@ -1178,11 +1550,11 @@ public final class EventSubscriptionsCreateOrUpdateSamples { .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic. @@ -1194,7 +1566,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -1206,11 +1578,11 @@ public final class EventSubscriptionsCreateOrUpdateSamples { .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResourceGroup. @@ -1222,7 +1594,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", "examplesubscription2", new EventSubscriptionInner() .withDestination( @@ -1232,11 +1604,11 @@ public final class EventSubscriptionsCreateOrUpdateSamples { .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination. @@ -1248,7 +1620,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -1265,11 +1637,11 @@ public final class EventSubscriptionsCreateOrUpdateSamples { .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination. @@ -1281,14 +1653,15 @@ public final class EventSubscriptionsCreateOrUpdateSamples { manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( new StorageQueueEventSubscriptionDestination() .withResourceId( "/subscriptions/d33c5f7a-02ea-40f4-bf52-07f17e84d6a8/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") - .withQueueName("queue1")) + .withQueueName("queue1") + .withQueueMessageTimeToLiveInSeconds(300L)) .withFilter( new EventSubscriptionFilter() .withSubjectBeginsWith("ExamplePrefix") @@ -1299,11 +1672,11 @@ public final class EventSubscriptionsCreateOrUpdateSamples { .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination. @@ -1315,7 +1688,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -1332,11 +1705,11 @@ public final class EventSubscriptionsCreateOrUpdateSamples { .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination. @@ -1348,7 +1721,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -1365,11 +1738,11 @@ public final class EventSubscriptionsCreateOrUpdateSamples { .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination. @@ -1381,7 +1754,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -1398,7 +1771,7 @@ public final class EventSubscriptionsCreateOrUpdateSamples { .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1406,12 +1779,10 @@ public final class EventSubscriptionsCreateOrUpdateSamples { ### EventSubscriptions_Delete ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions Delete. */ public final class EventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_DeleteForCustomTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_DeleteForCustomTopic.json */ /** * Sample code: EventSubscriptions_DeleteForCustomTopic. @@ -1423,13 +1794,13 @@ public final class EventSubscriptionsDeleteSamples { manager .eventSubscriptions() .delete( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_DeleteForResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_DeleteForResourceGroup.json */ /** * Sample code: EventSubscriptions_DeleteForResourceGroup. @@ -1441,13 +1812,13 @@ public final class EventSubscriptionsDeleteSamples { manager .eventSubscriptions() .delete( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", "examplesubscription2", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_DeleteForSubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_DeleteForSubscription.json */ /** * Sample code: EventSubscriptions_DeleteForSubscription. @@ -1458,11 +1829,14 @@ public final class EventSubscriptionsDeleteSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .eventSubscriptions() - .delete("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", Context.NONE); + .delete( + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", + "examplesubscription3", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_DeleteForResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_DeleteForResource.json */ /** * Sample code: EventSubscriptions_DeleteForResource. @@ -1474,9 +1848,9 @@ public final class EventSubscriptionsDeleteSamples { manager .eventSubscriptions() .delete( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription10", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1484,12 +1858,10 @@ public final class EventSubscriptionsDeleteSamples { ### EventSubscriptions_Get ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions Get. */ public final class EventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_HybridConnectionDestination. @@ -1501,13 +1873,13 @@ public final class EventSubscriptionsGetSamples { manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination. @@ -1519,13 +1891,13 @@ public final class EventSubscriptionsGetSamples { manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetForResourceGroup. @@ -1537,13 +1909,13 @@ public final class EventSubscriptionsGetSamples { manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", "examplesubscription2", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_EventHubDestination. @@ -1555,13 +1927,13 @@ public final class EventSubscriptionsGetSamples { manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForSubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForSubscription.json */ /** * Sample code: EventSubscriptions_GetForSubscription. @@ -1573,11 +1945,13 @@ public final class EventSubscriptionsGetSamples { manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", Context.NONE); + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", + "examplesubscription3", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_WebhookDestination. @@ -1589,13 +1963,13 @@ public final class EventSubscriptionsGetSamples { manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_AzureFunctionDestination. @@ -1607,13 +1981,13 @@ public final class EventSubscriptionsGetSamples { manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic. @@ -1625,13 +1999,13 @@ public final class EventSubscriptionsGetSamples { manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_StorageQueueDestination. @@ -1643,13 +2017,13 @@ public final class EventSubscriptionsGetSamples { manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForResource.json */ /** * Sample code: EventSubscriptions_GetForResource. @@ -1660,13 +2034,13 @@ public final class EventSubscriptionsGetSamples { manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination. @@ -1678,9 +2052,9 @@ public final class EventSubscriptionsGetSamples { manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1688,12 +2062,10 @@ public final class EventSubscriptionsGetSamples { ### EventSubscriptions_GetDeliveryAttributes ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions GetDeliveryAttributes. */ public final class EventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: EventSubscriptions_GetDeliveryAttributes. @@ -1704,7 +2076,10 @@ public final class EventSubscriptionsGetDeliveryAttributesSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .eventSubscriptions() - .getDeliveryAttributesWithResponse("aaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaa", Context.NONE); + .getDeliveryAttributesWithResponse( + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "examplesubscription1", + com.azure.core.util.Context.NONE); } } ``` @@ -1712,12 +2087,10 @@ public final class EventSubscriptionsGetDeliveryAttributesSamples { ### EventSubscriptions_GetFullUrl ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions GetFullUrl. */ public final class EventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetFullUrlForResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetFullUrlForResource.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResource. @@ -1729,13 +2102,13 @@ public final class EventSubscriptionsGetFullUrlSamples { manager .eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetFullUrlForResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetFullUrlForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResourceGroup. @@ -1747,13 +2120,13 @@ public final class EventSubscriptionsGetFullUrlSamples { manager .eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", "examplesubscription2", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetFullUrlForSubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetFullUrlForSubscription.json */ /** * Sample code: EventSubscriptions_GetFullUrlForSubscription. @@ -1765,11 +2138,13 @@ public final class EventSubscriptionsGetFullUrlSamples { manager .eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", Context.NONE); + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", + "examplesubscription3", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetFullUrlForCustomTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetFullUrlForCustomTopic.json */ /** * Sample code: EventSubscriptions_GetFullUrlForCustomTopic. @@ -1781,9 +2156,9 @@ public final class EventSubscriptionsGetFullUrlSamples { manager .eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1791,12 +2166,10 @@ public final class EventSubscriptionsGetFullUrlSamples { ### EventSubscriptions_List ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions List. */ public final class EventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListGlobalBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscription.json */ /** * Sample code: EventSubscriptions_ListGlobalBySubscription. @@ -1805,7 +2178,7 @@ public final class EventSubscriptionsListSamples { */ public static void eventSubscriptionsListGlobalBySubscription( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.eventSubscriptions().list(null, null, Context.NONE); + manager.eventSubscriptions().list(null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1813,12 +2186,10 @@ public final class EventSubscriptionsListSamples { ### EventSubscriptions_ListByDomainTopic ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListByDomainTopic. */ public final class EventSubscriptionsListByDomainTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListByDomainTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListByDomainTopic.json */ /** * Sample code: EventSubscriptions_ListByDomainTopic. @@ -1827,7 +2198,9 @@ public final class EventSubscriptionsListByDomainTopicSamples { */ public static void eventSubscriptionsListByDomainTopic( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.eventSubscriptions().listByDomainTopic("examplerg", "domain1", "topic1", null, null, Context.NONE); + manager + .eventSubscriptions() + .listByDomainTopic("examplerg", "domain1", "topic1", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1835,12 +2208,10 @@ public final class EventSubscriptionsListByDomainTopicSamples { ### EventSubscriptions_ListByResource ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListByResource. */ public final class EventSubscriptionsListByResourceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListByResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListByResource.json */ /** * Sample code: EventSubscriptions_ListByResource. @@ -1850,7 +2221,14 @@ public final class EventSubscriptionsListByResourceSamples { public static void eventSubscriptionsListByResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .eventSubscriptions() - .listByResource("examplerg", "Microsoft.EventGrid", "topics", "exampletopic2", null, null, Context.NONE); + .listByResource( + "examplerg", + "Microsoft.EventGrid", + "topics", + "exampletopic2", + null, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -1858,12 +2236,10 @@ public final class EventSubscriptionsListByResourceSamples { ### EventSubscriptions_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListByResourceGroup. */ public final class EventSubscriptionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListGlobalByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroup.json */ /** * Sample code: EventSubscriptions_ListGlobalByResourceGroup. @@ -1872,7 +2248,7 @@ public final class EventSubscriptionsListByResourceGroupSamples { */ public static void eventSubscriptionsListGlobalByResourceGroup( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.eventSubscriptions().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.eventSubscriptions().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1880,12 +2256,10 @@ public final class EventSubscriptionsListByResourceGroupSamples { ### EventSubscriptions_ListGlobalByResourceGroupForTopicType ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListGlobalByResourceGroupForTopicType. */ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListGlobalByResourceGroupForTopicType.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroupForTopicType.json */ /** * Sample code: EventSubscriptions_ListGlobalByResourceGroupForTopicType. @@ -1897,7 +2271,7 @@ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSample manager .eventSubscriptions() .listGlobalByResourceGroupForTopicType( - "examplerg", "Microsoft.Resources.ResourceGroups", null, null, Context.NONE); + "examplerg", "Microsoft.Resources.ResourceGroups", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1905,12 +2279,10 @@ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSample ### EventSubscriptions_ListGlobalBySubscriptionForTopicType ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListGlobalBySubscriptionForTopicType. */ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListGlobalBySubscriptionForTopicType.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscriptionForTopicType.json */ /** * Sample code: EventSubscriptions_ListGlobalBySubscriptionForTopicType. @@ -1921,7 +2293,8 @@ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .eventSubscriptions() - .listGlobalBySubscriptionForTopicType("Microsoft.Resources.Subscriptions", null, null, Context.NONE); + .listGlobalBySubscriptionForTopicType( + "Microsoft.Resources.Subscriptions", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1929,12 +2302,10 @@ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples ### EventSubscriptions_ListRegionalByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListRegionalByResourceGroup. */ public final class EventSubscriptionsListRegionalByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListRegionalByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroup.json */ /** * Sample code: EventSubscriptions_ListRegionalByResourceGroup. @@ -1943,7 +2314,9 @@ public final class EventSubscriptionsListRegionalByResourceGroupSamples { */ public static void eventSubscriptionsListRegionalByResourceGroup( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.eventSubscriptions().listRegionalByResourceGroup("examplerg", "westus2", null, null, Context.NONE); + manager + .eventSubscriptions() + .listRegionalByResourceGroup("examplerg", "westus2", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1951,12 +2324,10 @@ public final class EventSubscriptionsListRegionalByResourceGroupSamples { ### EventSubscriptions_ListRegionalByResourceGroupForTopicType ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListRegionalByResourceGroupForTopicType. */ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListRegionalByResourceGroupForTopicType.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroupForTopicType.json */ /** * Sample code: EventSubscriptions_ListRegionalByResourceGroupForTopicType. @@ -1968,7 +2339,7 @@ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamp manager .eventSubscriptions() .listRegionalByResourceGroupForTopicType( - "examplerg", "westus2", "Microsoft.EventHub.namespaces", null, null, Context.NONE); + "examplerg", "westus2", "Microsoft.EventHub.namespaces", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1976,12 +2347,10 @@ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamp ### EventSubscriptions_ListRegionalBySubscription ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListRegionalBySubscription. */ public final class EventSubscriptionsListRegionalBySubscriptionSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListRegionalBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscription.json */ /** * Sample code: EventSubscriptions_ListRegionalBySubscription. @@ -1990,7 +2359,9 @@ public final class EventSubscriptionsListRegionalBySubscriptionSamples { */ public static void eventSubscriptionsListRegionalBySubscription( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.eventSubscriptions().listRegionalBySubscription("westus2", null, null, Context.NONE); + manager + .eventSubscriptions() + .listRegionalBySubscription("westus2", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1998,12 +2369,10 @@ public final class EventSubscriptionsListRegionalBySubscriptionSamples { ### EventSubscriptions_ListRegionalBySubscriptionForTopicType ```java -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListRegionalBySubscriptionForTopicType. */ public final class EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListRegionalBySubscriptionForTopicType.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscriptionForTopicType.json */ /** * Sample code: EventSubscriptions_ListRegionalBySubscriptionForTopicType. @@ -2015,7 +2384,7 @@ public final class EventSubscriptionsListRegionalBySubscriptionForTopicTypeSampl manager .eventSubscriptions() .listRegionalBySubscriptionForTopicType( - "westus2", "Microsoft.EventHub.namespaces", null, null, Context.NONE); + "westus2", "Microsoft.EventHub.namespaces", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -2023,7 +2392,6 @@ public final class EventSubscriptionsListRegionalBySubscriptionForTopicTypeSampl ### EventSubscriptions_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.AzureFunctionEventSubscriptionDestination; import com.azure.resourcemanager.eventgrid.models.EventHubEventSubscriptionDestination; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; @@ -2039,7 +2407,7 @@ import java.util.Arrays; /** Samples for EventSubscriptions Update. */ public final class EventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_EventHubDestination. @@ -2051,7 +2419,7 @@ public final class EventSubscriptionsUpdateSamples { manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2064,11 +2432,11 @@ public final class EventSubscriptionsUpdateSamples { .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination. @@ -2080,7 +2448,7 @@ public final class EventSubscriptionsUpdateSamples { manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2097,11 +2465,11 @@ public final class EventSubscriptionsUpdateSamples { .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_WebhookDestination. @@ -2113,7 +2481,7 @@ public final class EventSubscriptionsUpdateSamples { manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2124,11 +2492,11 @@ public final class EventSubscriptionsUpdateSamples { .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination. @@ -2140,7 +2508,7 @@ public final class EventSubscriptionsUpdateSamples { manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2159,11 +2527,11 @@ public final class EventSubscriptionsUpdateSamples { .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination. @@ -2175,7 +2543,7 @@ public final class EventSubscriptionsUpdateSamples { manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2188,11 +2556,11 @@ public final class EventSubscriptionsUpdateSamples { .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination. @@ -2204,7 +2572,7 @@ public final class EventSubscriptionsUpdateSamples { manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2217,11 +2585,11 @@ public final class EventSubscriptionsUpdateSamples { .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination. @@ -2233,7 +2601,7 @@ public final class EventSubscriptionsUpdateSamples { manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2250,11 +2618,11 @@ public final class EventSubscriptionsUpdateSamples { .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic. @@ -2266,7 +2634,7 @@ public final class EventSubscriptionsUpdateSamples { manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2277,11 +2645,11 @@ public final class EventSubscriptionsUpdateSamples { .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForResource.json */ /** * Sample code: EventSubscriptions_UpdateForResource. @@ -2293,7 +2661,7 @@ public final class EventSubscriptionsUpdateSamples { manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -2304,11 +2672,11 @@ public final class EventSubscriptionsUpdateSamples { .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_UpdateForResourceGroup. @@ -2320,7 +2688,7 @@ public final class EventSubscriptionsUpdateSamples { manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", "examplesubscription2", new EventSubscriptionUpdateParameters() .withDestination( @@ -2333,11 +2701,11 @@ public final class EventSubscriptionsUpdateSamples { .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForSubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForSubscription.json */ /** * Sample code: EventSubscriptions_UpdateForSubscription. @@ -2349,7 +2717,7 @@ public final class EventSubscriptionsUpdateSamples { manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", new EventSubscriptionUpdateParameters() .withDestination( @@ -2360,7 +2728,7 @@ public final class EventSubscriptionsUpdateSamples { .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -2368,12 +2736,10 @@ public final class EventSubscriptionsUpdateSamples { ### ExtensionTopics_Get ```java -import com.azure.core.util.Context; - /** Samples for ExtensionTopics Get. */ public final class ExtensionTopicsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/ExtensionTopics_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/ExtensionTopics_Get.json */ /** * Sample code: ExtensionTopics_Get. @@ -2384,291 +2750,1007 @@ public final class ExtensionTopicsGetSamples { manager .extensionTopics() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default", - Context.NONE); + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default", + com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### NamespaceTopicEventSubscriptions_CreateOrUpdate ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration; +import com.azure.resourcemanager.eventgrid.models.DeliveryMode; +import com.azure.resourcemanager.eventgrid.models.DeliverySchema; +import com.azure.resourcemanager.eventgrid.models.QueueInfo; +import java.time.Duration; -/** Samples for Operations List. */ -public final class OperationsListSamples { +/** Samples for NamespaceTopicEventSubscriptions CreateOrUpdate. */ +public final class NamespaceTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Operations_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopicEventSubscriptions_CreateOrUpdate.json */ /** - * Sample code: Operations_List. + * Sample code: NamespaceTopicEventSubscriptions_CreateOrUpdate. * * @param manager Entry point to EventGridManager. */ - public static void operationsList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.operations().list(Context.NONE); + public static void namespaceTopicEventSubscriptionsCreateOrUpdate( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopicEventSubscriptions() + .define("examplenamespacetopicEventSub2") + .withExistingTopic("examplerg", "examplenamespace2", "examplenamespacetopic2") + .withDeliveryConfiguration( + new DeliveryConfiguration() + .withDeliveryMode(DeliveryMode.QUEUE) + .withQueue( + new QueueInfo() + .withReceiveLockDurationInSeconds(60) + .withMaxDeliveryCount(4) + .withEventTimeToLive(Duration.parse("P1D")))) + .withEventDeliverySchema(DeliverySchema.CLOUD_EVENT_SCHEMA_V1_0) + .create(); } } ``` -### PartnerConfigurations_AuthorizePartner +### NamespaceTopicEventSubscriptions_Delete ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.eventgrid.models.Partner; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** Samples for PartnerConfigurations AuthorizePartner. */ -public final class PartnerConfigurationsAuthorizePartnerSamples { +/** Samples for NamespaceTopicEventSubscriptions Delete. */ +public final class NamespaceTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_AuthorizePartner.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopicEventSubscriptions_Delete.json */ /** - * Sample code: PartnerConfigurations_AuthorizePartner. + * Sample code: NamespaceTopicEventSubscriptions_Delete. * * @param manager Entry point to EventGridManager. */ - public static void partnerConfigurationsAuthorizePartner( + public static void namespaceTopicEventSubscriptionsDelete( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager - .partnerConfigurations() - .authorizePartnerWithResponse( + .namespaceTopicEventSubscriptions() + .delete( "examplerg", - new Partner() - .withPartnerRegistrationImmutableId(UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) - .withPartnerName("Contoso.Finance") - .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), - Context.NONE); + "examplenamespace2", + "examplenamespacetopic2", + "examplenamespacetopicEventSub2", + com.azure.core.util.Context.NONE); } } ``` -### PartnerConfigurations_CreateOrUpdate +### NamespaceTopicEventSubscriptions_Get ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationInner; -import com.azure.resourcemanager.eventgrid.models.Partner; -import com.azure.resourcemanager.eventgrid.models.PartnerAuthorization; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for PartnerConfigurations CreateOrUpdate. */ -public final class PartnerConfigurationsCreateOrUpdateSamples { +/** Samples for NamespaceTopicEventSubscriptions Get. */ +public final class NamespaceTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopicEventSubscriptions_Get.json */ /** - * Sample code: PartnerConfigurations_CreateOrUpdate. + * Sample code: NamespaceTopicEventSubscriptions_Get. * * @param manager Entry point to EventGridManager. */ - public static void partnerConfigurationsCreateOrUpdate( + public static void namespaceTopicEventSubscriptionsGet( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager - .partnerConfigurations() - .createOrUpdate( + .namespaceTopicEventSubscriptions() + .getWithResponse( "examplerg", - new PartnerConfigurationInner() - .withPartnerAuthorization( - new PartnerAuthorization() - .withDefaultMaximumExpirationTimeInDays(10) - .withAuthorizedPartnersList( - Arrays - .asList( - new Partner() - .withPartnerRegistrationImmutableId( - UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) - .withPartnerName("Contoso.Finance") - .withAuthorizationExpirationTimeInUtc( - OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), - new Partner() - .withPartnerRegistrationImmutableId( - UUID.fromString("5362bdb6-ce3e-4d0d-9a5b-3eb92c8aab38")) - .withPartnerName("fabrikam.HR") - .withAuthorizationExpirationTimeInUtc( - OffsetDateTime.parse("2022-02-20T01:00:00.142Z"))))), - Context.NONE); + "examplenamespace2", + "examplenamespacetopic2", + "examplenamespacetopicEventSub1", + com.azure.core.util.Context.NONE); } } ``` -### PartnerConfigurations_Delete +### NamespaceTopicEventSubscriptions_ListByNamespaceTopic ```java -import com.azure.core.util.Context; - -/** Samples for PartnerConfigurations Delete. */ -public final class PartnerConfigurationsDeleteSamples { +/** Samples for NamespaceTopicEventSubscriptions ListByNamespaceTopic. */ +public final class NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json */ /** - * Sample code: PartnerConfigurations_Delete. + * Sample code: NamespaceTopicEventSubscriptions_ListByNamespaceTopic. * * @param manager Entry point to EventGridManager. */ - public static void partnerConfigurationsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerConfigurations().delete("examplerg", Context.NONE); + public static void namespaceTopicEventSubscriptionsListByNamespaceTopic( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopicEventSubscriptions() + .listByNamespaceTopic( + "examplerg", + "examplenamespace2", + "examplenamespacetopic2", + null, + null, + com.azure.core.util.Context.NONE); } } ``` -### PartnerConfigurations_GetByResourceGroup +### NamespaceTopicEventSubscriptions_Update ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration; +import com.azure.resourcemanager.eventgrid.models.DeliveryMode; +import com.azure.resourcemanager.eventgrid.models.DeliverySchema; +import com.azure.resourcemanager.eventgrid.models.QueueInfo; +import com.azure.resourcemanager.eventgrid.models.Subscription; +import java.time.Duration; -/** Samples for PartnerConfigurations GetByResourceGroup. */ -public final class PartnerConfigurationsGetByResourceGroupSamples { +/** Samples for NamespaceTopicEventSubscriptions Update. */ +public final class NamespaceTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopicEventSubscriptions_Update.json */ /** - * Sample code: PartnerConfigurations_Get. + * Sample code: NamespaceTopicEventSubscriptions_Update. * * @param manager Entry point to EventGridManager. */ - public static void partnerConfigurationsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerConfigurations().getByResourceGroupWithResponse("examplerg", Context.NONE); + public static void namespaceTopicEventSubscriptionsUpdate( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + Subscription resource = + manager + .namespaceTopicEventSubscriptions() + .getWithResponse( + "examplerg", + "exampleNamespaceName1", + "exampleNamespaceTopicName1", + "exampleNamespaceTopicEventSubscriptionName1", + com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withDeliveryConfiguration( + new DeliveryConfiguration() + .withDeliveryMode(DeliveryMode.QUEUE) + .withQueue( + new QueueInfo() + .withReceiveLockDurationInSeconds(60) + .withMaxDeliveryCount(3) + .withEventTimeToLive(Duration.parse("P1D")))) + .withEventDeliverySchema(DeliverySchema.CLOUD_EVENT_SCHEMA_V1_0) + .apply(); } } ``` -### PartnerConfigurations_List +### NamespaceTopics_CreateOrUpdate ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.models.EventInputSchema; +import com.azure.resourcemanager.eventgrid.models.PublisherType; -/** Samples for PartnerConfigurations List. */ -public final class PartnerConfigurationsListSamples { +/** Samples for NamespaceTopics CreateOrUpdate. */ +public final class NamespaceTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_CreateOrUpdate.json */ /** - * Sample code: PartnerConfigurations_ListBySubscription. + * Sample code: NamespaceTopics_CreateOrUpdate. * * @param manager Entry point to EventGridManager. */ - public static void partnerConfigurationsListBySubscription( - com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerConfigurations().list(null, null, Context.NONE); + public static void namespaceTopicsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopics() + .define("examplenamespacetopic2") + .withExistingNamespace("examplerg", "examplenamespace2") + .withPublisherType(PublisherType.CUSTOM) + .withInputSchema(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0) + .withEventRetentionInDays(1) + .create(); } } ``` -### PartnerConfigurations_ListByResourceGroup +### NamespaceTopics_Delete ```java -import com.azure.core.util.Context; +/** Samples for NamespaceTopics Delete. */ +public final class NamespaceTopicsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_Delete.json + */ + /** + * Sample code: NamespaceTopics_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopics() + .delete("examplerg", "examplenamespace2", "examplenamespacetopic2", com.azure.core.util.Context.NONE); + } +} +``` -/** Samples for PartnerConfigurations ListByResourceGroup. */ -public final class PartnerConfigurationsListByResourceGroupSamples { +### NamespaceTopics_Get + +```java +/** Samples for NamespaceTopics Get. */ +public final class NamespaceTopicsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_Get.json */ /** - * Sample code: PartnerConfigurations_ListByResourceGroup. + * Sample code: NamespaceTopics_Get. * * @param manager Entry point to EventGridManager. */ - public static void partnerConfigurationsListByResourceGroup( - com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerConfigurations().listByResourceGroup("examplerg", Context.NONE); + public static void namespaceTopicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopics() + .getWithResponse( + "examplerg", "examplenamespace2", "examplenamespacetopic2", com.azure.core.util.Context.NONE); } } ``` -### PartnerConfigurations_UnauthorizePartner +### NamespaceTopics_ListByNamespace ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.eventgrid.models.Partner; -import java.time.OffsetDateTime; -import java.util.UUID; +/** Samples for NamespaceTopics ListByNamespace. */ +public final class NamespaceTopicsListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_ListByNamespace.json + */ + /** + * Sample code: NamespaceTopics_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicsListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopics() + .listByNamespace("examplerg", "examplenamespace2", null, null, com.azure.core.util.Context.NONE); + } +} +``` -/** Samples for PartnerConfigurations UnauthorizePartner. */ -public final class PartnerConfigurationsUnauthorizePartnerSamples { +### NamespaceTopics_ListSharedAccessKeys + +```java +/** Samples for NamespaceTopics ListSharedAccessKeys. */ +public final class NamespaceTopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_UnauthorizePartner.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_ListSharedAccessKeys.json */ /** - * Sample code: PartnerConfigurations_UnauthorizePartner. + * Sample code: NamespaceTopics_ListSharedAccessKeys. * * @param manager Entry point to EventGridManager. */ - public static void partnerConfigurationsUnauthorizePartner( + public static void namespaceTopicsListSharedAccessKeys( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager - .partnerConfigurations() - .unauthorizePartnerWithResponse( - "examplerg", - new Partner() - .withPartnerRegistrationImmutableId(UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) - .withPartnerName("Contoso.Finance") - .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), - Context.NONE); + .namespaceTopics() + .listSharedAccessKeysWithResponse( + "examplerg", "examplenamespace2", "examplenamespacetopic2", com.azure.core.util.Context.NONE); } } ``` -### PartnerConfigurations_Update +### NamespaceTopics_RegenerateKey ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.eventgrid.models.PartnerConfigurationUpdateParameters; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; -/** Samples for PartnerConfigurations Update. */ -public final class PartnerConfigurationsUpdateSamples { +/** Samples for NamespaceTopics RegenerateKey. */ +public final class NamespaceTopicsRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_RegenerateKey.json */ /** - * Sample code: PartnerConfigurations_Update. + * Sample code: NamespaceTopics_RegenerateKey. * * @param manager Entry point to EventGridManager. */ - public static void partnerConfigurationsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + public static void namespaceTopicsRegenerateKey(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager - .partnerConfigurations() - .update( + .namespaceTopics() + .regenerateKey( "examplerg", - new PartnerConfigurationUpdateParameters() - .withTags(mapOf("tag1", "value11", "tag2", "value22")) - .withDefaultMaximumExpirationTimeInDays(100), - Context.NONE); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + "examplenamespace2", + "examplenamespacetopic2", + new TopicRegenerateKeyRequest().withKeyName("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); } } ``` -### PartnerNamespaces_CreateOrUpdate +### NamespaceTopics_Update ```java -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopic; -/** Samples for PartnerNamespaces CreateOrUpdate. */ -public final class PartnerNamespacesCreateOrUpdateSamples { +/** Samples for NamespaceTopics Update. */ +public final class NamespaceTopicsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_Update.json */ /** - * Sample code: PartnerNamespaces_CreateOrUpdate. + * Sample code: NamespaceTopics_Update. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + NamespaceTopic resource = + manager + .namespaceTopics() + .getWithResponse( + "examplerg", + "exampleNamespaceName1", + "exampleNamespaceTopicName1", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withEventRetentionInDays(1).apply(); + } +} +``` + +### Namespaces_CreateOrUpdate + +```java +import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; +import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfigurationState; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Namespaces CreateOrUpdate. */ +public final class NamespacesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_CreateOrUpdate.json + */ + /** + * Sample code: Namespaces_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaces() + .define("exampleNamespaceName1") + .withRegion("westus") + .withExistingResourceGroup("examplerg") + .withTags(mapOf("tag1", "value11", "tag2", "value22")) + .withTopicSpacesConfiguration( + new TopicSpacesConfiguration() + .withState(TopicSpacesConfigurationState.ENABLED) + .withRouteTopicResourceId( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampleTopic1")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Namespaces_Delete + +```java +/** Samples for Namespaces Delete. */ +public final class NamespacesDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_Delete.json + */ + /** + * Sample code: Namespaces_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.namespaces().delete("examplerg", "exampleNamespaceName1", com.azure.core.util.Context.NONE); + } +} +``` + +### Namespaces_GetByResourceGroup + +```java +/** Samples for Namespaces GetByResourceGroup. */ +public final class NamespacesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_Get.json + */ + /** + * Sample code: Namespaces_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaces() + .getByResourceGroupWithResponse("examplerg", "exampleNamespaceName1", com.azure.core.util.Context.NONE); + } +} +``` + +### Namespaces_List + +```java +/** Samples for Namespaces List. */ +public final class NamespacesListSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_ListBySubscription.json + */ + /** + * Sample code: Namespaces_ListBySubscription. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.namespaces().list(null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### Namespaces_ListByResourceGroup + +```java +/** Samples for Namespaces ListByResourceGroup. */ +public final class NamespacesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_ListByResourceGroup.json + */ + /** + * Sample code: Namespaces_ListByResourceGroup. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.namespaces().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### Namespaces_ListSharedAccessKeys + +```java +/** Samples for Namespaces ListSharedAccessKeys. */ +public final class NamespacesListSharedAccessKeysSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_ListSharedAccessKeys.json + */ + /** + * Sample code: Namespaces_ListSharedAccessKeys. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesListSharedAccessKeys(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaces() + .listSharedAccessKeysWithResponse("examplerg", "exampleNamespaceName1", com.azure.core.util.Context.NONE); + } +} +``` + +### Namespaces_RegenerateKey + +```java +import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; + +/** Samples for Namespaces RegenerateKey. */ +public final class NamespacesRegenerateKeySamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_RegenerateKey.json + */ + /** + * Sample code: Namespaces_RegenerateKey. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesRegenerateKey(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaces() + .regenerateKey( + "examplerg", + "exampleNamespaceName1", + new NamespaceRegenerateKeyRequest().withKeyName("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Namespaces_Update + +```java +import com.azure.resourcemanager.eventgrid.models.Namespace; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Namespaces Update. */ +public final class NamespacesUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_Update.json + */ + /** + * Sample code: Namespaces_Update. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + Namespace resource = + manager + .namespaces() + .getByResourceGroupWithResponse("examplerg", "exampleNamespaceName1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1Updated")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Operations_List + +```java +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Operations_List.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to EventGridManager. + */ + public static void operationsList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerConfigurations_AuthorizePartner + +```java +import com.azure.resourcemanager.eventgrid.models.Partner; +import java.time.OffsetDateTime; +import java.util.UUID; + +/** Samples for PartnerConfigurations AuthorizePartner. */ +public final class PartnerConfigurationsAuthorizePartnerSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_AuthorizePartner.json + */ + /** + * Sample code: PartnerConfigurations_AuthorizePartner. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerConfigurationsAuthorizePartner( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerConfigurations() + .authorizePartnerWithResponse( + "examplerg", + new Partner() + .withPartnerRegistrationImmutableId(UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) + .withPartnerName("Contoso.Finance") + .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), + com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerConfigurations_CreateOrUpdate + +```java +import com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationInner; +import com.azure.resourcemanager.eventgrid.models.Partner; +import com.azure.resourcemanager.eventgrid.models.PartnerAuthorization; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.UUID; + +/** Samples for PartnerConfigurations CreateOrUpdate. */ +public final class PartnerConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: PartnerConfigurations_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerConfigurationsCreateOrUpdate( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerConfigurations() + .createOrUpdate( + "examplerg", + new PartnerConfigurationInner() + .withPartnerAuthorization( + new PartnerAuthorization() + .withDefaultMaximumExpirationTimeInDays(10) + .withAuthorizedPartnersList( + Arrays + .asList( + new Partner() + .withPartnerRegistrationImmutableId( + UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) + .withPartnerName("Contoso.Finance") + .withAuthorizationExpirationTimeInUtc( + OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), + new Partner() + .withPartnerRegistrationImmutableId( + UUID.fromString("5362bdb6-ce3e-4d0d-9a5b-3eb92c8aab38")) + .withPartnerName("fabrikam.HR") + .withAuthorizationExpirationTimeInUtc( + OffsetDateTime.parse("2022-02-20T01:00:00.142Z"))))), + com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerConfigurations_Delete + +```java +/** Samples for PartnerConfigurations Delete. */ +public final class PartnerConfigurationsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_Delete.json + */ + /** + * Sample code: PartnerConfigurations_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerConfigurationsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.partnerConfigurations().delete("examplerg", com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerConfigurations_GetByResourceGroup + +```java +/** Samples for PartnerConfigurations GetByResourceGroup. */ +public final class PartnerConfigurationsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_Get.json + */ + /** + * Sample code: PartnerConfigurations_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerConfigurationsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.partnerConfigurations().getByResourceGroupWithResponse("examplerg", com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerConfigurations_List + +```java +/** Samples for PartnerConfigurations List. */ +public final class PartnerConfigurationsListSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_ListBySubscription.json + */ + /** + * Sample code: PartnerConfigurations_ListBySubscription. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerConfigurationsListBySubscription( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.partnerConfigurations().list(null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerConfigurations_ListByResourceGroup + +```java +/** Samples for PartnerConfigurations ListByResourceGroup. */ +public final class PartnerConfigurationsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_ListByResourceGroup.json + */ + /** + * Sample code: PartnerConfigurations_ListByResourceGroup. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerConfigurationsListByResourceGroup( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.partnerConfigurations().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerConfigurations_UnauthorizePartner + +```java +import com.azure.resourcemanager.eventgrid.models.Partner; +import java.time.OffsetDateTime; +import java.util.UUID; + +/** Samples for PartnerConfigurations UnauthorizePartner. */ +public final class PartnerConfigurationsUnauthorizePartnerSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_UnauthorizePartner.json + */ + /** + * Sample code: PartnerConfigurations_UnauthorizePartner. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerConfigurationsUnauthorizePartner( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerConfigurations() + .unauthorizePartnerWithResponse( + "examplerg", + new Partner() + .withPartnerRegistrationImmutableId(UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) + .withPartnerName("Contoso.Finance") + .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), + com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerConfigurations_Update + +```java +import com.azure.resourcemanager.eventgrid.models.PartnerConfigurationUpdateParameters; +import java.util.HashMap; +import java.util.Map; + +/** Samples for PartnerConfigurations Update. */ +public final class PartnerConfigurationsUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_Update.json + */ + /** + * Sample code: PartnerConfigurations_Update. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerConfigurationsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerConfigurations() + .update( + "examplerg", + new PartnerConfigurationUpdateParameters() + .withTags(mapOf("tag1", "value11", "tag2", "value22")) + .withDefaultMaximumExpirationTimeInDays(100), + com.azure.core.util.Context.NONE); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### PartnerDestinations_Activate + +```java +/** Samples for PartnerDestinations Activate. */ +public final class PartnerDestinationsActivateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_Activate.json + */ + /** + * Sample code: PartnerDestinations_Activate. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsActivate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerDestinations() + .activateWithResponse("examplerg", "examplePartnerDestination1", com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerDestinations_CreateOrUpdate + +```java +import java.time.OffsetDateTime; +import java.util.UUID; + +/** Samples for PartnerDestinations CreateOrUpdate. */ +public final class PartnerDestinationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_CreateOrUpdate.json + */ + /** + * Sample code: PartnerDestinations_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerDestinations() + .define("examplePartnerDestinationName1") + .withRegion("westus2") + .withExistingResourceGroup("examplerg") + .withPartnerRegistrationImmutableId(UUID.fromString("0bd70ee2-7d95-447e-ab1f-c4f320019404")) + .withEndpointServiceContext("This is an example") + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2022-03-14T19:33:43.430Z")) + .withEndpointBaseUrl("https://www.example/endpoint") + .withMessageForActivation("Sample Activation message") + .create(); + } +} +``` + +### PartnerDestinations_Delete + +```java +/** Samples for PartnerDestinations Delete. */ +public final class PartnerDestinationsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_Delete.json + */ + /** + * Sample code: PartnerDestinations_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerDestinations() + .delete("examplerg", "examplePartnerDestinationName1", com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerDestinations_GetByResourceGroup + +```java +/** Samples for PartnerDestinations GetByResourceGroup. */ +public final class PartnerDestinationsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_Get.json + */ + /** + * Sample code: PartnerDestinations_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerDestinations() + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerDestinationName1", com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerDestinations_List + +```java +/** Samples for PartnerDestinations List. */ +public final class PartnerDestinationsListSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_ListBySubscription.json + */ + /** + * Sample code: PartnerDestinations_ListBySubscription. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsListBySubscription( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.partnerDestinations().list(null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerDestinations_ListByResourceGroup + +```java +/** Samples for PartnerDestinations ListByResourceGroup. */ +public final class PartnerDestinationsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_ListByResourceGroup.json + */ + /** + * Sample code: PartnerDestinations_ListByResourceGroup. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsListByResourceGroup( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.partnerDestinations().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### PartnerDestinations_Update + +```java +import com.azure.resourcemanager.eventgrid.models.PartnerDestination; +import java.util.HashMap; +import java.util.Map; + +/** Samples for PartnerDestinations Update. */ +public final class PartnerDestinationsUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_Update.json + */ + /** + * Sample code: PartnerDestinations_Update. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + PartnerDestination resource = + manager + .partnerDestinations() + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerDestinationName1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### PartnerNamespaces_CreateOrUpdate + +```java +import java.util.HashMap; +import java.util.Map; + +/** Samples for PartnerNamespaces CreateOrUpdate. */ +public final class PartnerNamespacesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_CreateOrUpdate.json + */ + /** + * Sample code: PartnerNamespaces_CreateOrUpdate. * * @param manager Entry point to EventGridManager. */ @@ -2680,7 +3762,7 @@ public final class PartnerNamespacesCreateOrUpdateSamples { .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withPartnerRegistrationFullyQualifiedId( - "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1") + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1") .create(); } @@ -2700,12 +3782,10 @@ public final class PartnerNamespacesCreateOrUpdateSamples { ### PartnerNamespaces_Delete ```java -import com.azure.core.util.Context; - /** Samples for PartnerNamespaces Delete. */ public final class PartnerNamespacesDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_Delete.json */ /** * Sample code: PartnerNamespaces_Delete. @@ -2713,7 +3793,9 @@ public final class PartnerNamespacesDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void partnerNamespacesDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerNamespaces().delete("examplerg", "examplePartnerNamespaceName1", Context.NONE); + manager + .partnerNamespaces() + .delete("examplerg", "examplePartnerNamespaceName1", com.azure.core.util.Context.NONE); } } ``` @@ -2721,12 +3803,10 @@ public final class PartnerNamespacesDeleteSamples { ### PartnerNamespaces_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for PartnerNamespaces GetByResourceGroup. */ public final class PartnerNamespacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_Get.json */ /** * Sample code: PartnerNamespaces_Get. @@ -2736,7 +3816,8 @@ public final class PartnerNamespacesGetByResourceGroupSamples { public static void partnerNamespacesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerNamespaces() - .getByResourceGroupWithResponse("examplerg", "examplePartnerNamespaceName1", Context.NONE); + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerNamespaceName1", com.azure.core.util.Context.NONE); } } ``` @@ -2744,12 +3825,10 @@ public final class PartnerNamespacesGetByResourceGroupSamples { ### PartnerNamespaces_List ```java -import com.azure.core.util.Context; - /** Samples for PartnerNamespaces List. */ public final class PartnerNamespacesListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_ListBySubscription.json */ /** * Sample code: PartnerNamespaces_ListBySubscription. @@ -2758,7 +3837,7 @@ public final class PartnerNamespacesListSamples { */ public static void partnerNamespacesListBySubscription( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerNamespaces().list(null, null, Context.NONE); + manager.partnerNamespaces().list(null, null, com.azure.core.util.Context.NONE); } } ``` @@ -2766,12 +3845,10 @@ public final class PartnerNamespacesListSamples { ### PartnerNamespaces_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for PartnerNamespaces ListByResourceGroup. */ public final class PartnerNamespacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_ListByResourceGroup.json */ /** * Sample code: PartnerNamespaces_ListByResourceGroup. @@ -2780,7 +3857,7 @@ public final class PartnerNamespacesListByResourceGroupSamples { */ public static void partnerNamespacesListByResourceGroup( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerNamespaces().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.partnerNamespaces().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -2788,12 +3865,10 @@ public final class PartnerNamespacesListByResourceGroupSamples { ### PartnerNamespaces_ListSharedAccessKeys ```java -import com.azure.core.util.Context; - /** Samples for PartnerNamespaces ListSharedAccessKeys. */ public final class PartnerNamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_ListSharedAccessKeys.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_ListSharedAccessKeys.json */ /** * Sample code: PartnerNamespaces_ListSharedAccessKeys. @@ -2804,7 +3879,8 @@ public final class PartnerNamespacesListSharedAccessKeysSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerNamespaces() - .listSharedAccessKeysWithResponse("examplerg", "examplePartnerNamespaceName1", Context.NONE); + .listSharedAccessKeysWithResponse( + "examplerg", "examplePartnerNamespaceName1", com.azure.core.util.Context.NONE); } } ``` @@ -2812,13 +3888,12 @@ public final class PartnerNamespacesListSharedAccessKeysSamples { ### PartnerNamespaces_RegenerateKey ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceRegenerateKeyRequest; /** Samples for PartnerNamespaces RegenerateKey. */ public final class PartnerNamespacesRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_RegenerateKey.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_RegenerateKey.json */ /** * Sample code: PartnerNamespaces_RegenerateKey. @@ -2831,8 +3906,8 @@ public final class PartnerNamespacesRegenerateKeySamples { .regenerateKeyWithResponse( "examplerg", "examplePartnerNamespaceName1", - new PartnerNamespaceRegenerateKeyRequest().withKeyName("key1"), - Context.NONE); + new PartnerNamespaceRegenerateKeyRequest().withKeyName("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); } } ``` @@ -2840,7 +3915,6 @@ public final class PartnerNamespacesRegenerateKeySamples { ### PartnerNamespaces_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PartnerNamespace; import java.util.HashMap; import java.util.Map; @@ -2848,7 +3922,7 @@ import java.util.Map; /** Samples for PartnerNamespaces Update. */ public final class PartnerNamespacesUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_Update.json */ /** * Sample code: PartnerNamespaces_Update. @@ -2859,7 +3933,8 @@ public final class PartnerNamespacesUpdateSamples { PartnerNamespace resource = manager .partnerNamespaces() - .getByResourceGroupWithResponse("examplerg", "examplePartnerNamespaceName1", Context.NONE) + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerNamespaceName1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1")).apply(); } @@ -2886,7 +3961,7 @@ import java.util.Map; /** Samples for PartnerRegistrations CreateOrUpdate. */ public final class PartnerRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_CreateOrUpdate.json */ /** * Sample code: PartnerRegistrations_CreateOrUpdate. @@ -2920,12 +3995,10 @@ public final class PartnerRegistrationsCreateOrUpdateSamples { ### PartnerRegistrations_Delete ```java -import com.azure.core.util.Context; - /** Samples for PartnerRegistrations Delete. */ public final class PartnerRegistrationsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_Delete.json */ /** * Sample code: PartnerRegistrations_Delete. @@ -2933,7 +4006,9 @@ public final class PartnerRegistrationsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void partnerRegistrationsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerRegistrations().delete("examplerg", "examplePartnerRegistrationName1", Context.NONE); + manager + .partnerRegistrations() + .delete("examplerg", "examplePartnerRegistrationName1", com.azure.core.util.Context.NONE); } } ``` @@ -2941,12 +4016,10 @@ public final class PartnerRegistrationsDeleteSamples { ### PartnerRegistrations_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for PartnerRegistrations GetByResourceGroup. */ public final class PartnerRegistrationsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_Get.json */ /** * Sample code: PartnerRegistrations_Get. @@ -2956,7 +4029,8 @@ public final class PartnerRegistrationsGetByResourceGroupSamples { public static void partnerRegistrationsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerRegistrations() - .getByResourceGroupWithResponse("examplerg", "examplePartnerRegistrationName1", Context.NONE); + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerRegistrationName1", com.azure.core.util.Context.NONE); } } ``` @@ -2964,12 +4038,10 @@ public final class PartnerRegistrationsGetByResourceGroupSamples { ### PartnerRegistrations_List ```java -import com.azure.core.util.Context; - /** Samples for PartnerRegistrations List. */ public final class PartnerRegistrationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_ListBySubscription.json */ /** * Sample code: PartnerRegistrations_ListBySubscription. @@ -2978,7 +4050,7 @@ public final class PartnerRegistrationsListSamples { */ public static void partnerRegistrationsListBySubscription( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerRegistrations().list(null, null, Context.NONE); + manager.partnerRegistrations().list(null, null, com.azure.core.util.Context.NONE); } } ``` @@ -2986,12 +4058,10 @@ public final class PartnerRegistrationsListSamples { ### PartnerRegistrations_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for PartnerRegistrations ListByResourceGroup. */ public final class PartnerRegistrationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_ListByResourceGroup.json */ /** * Sample code: PartnerRegistrations_ListByResourceGroup. @@ -3000,7 +4070,7 @@ public final class PartnerRegistrationsListByResourceGroupSamples { */ public static void partnerRegistrationsListByResourceGroup( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerRegistrations().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.partnerRegistrations().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -3008,7 +4078,6 @@ public final class PartnerRegistrationsListByResourceGroupSamples { ### PartnerRegistrations_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PartnerRegistration; import java.util.HashMap; import java.util.Map; @@ -3016,7 +4085,7 @@ import java.util.Map; /** Samples for PartnerRegistrations Update. */ public final class PartnerRegistrationsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_Update.json */ /** * Sample code: PartnerRegistrations_Update. @@ -3027,9 +4096,10 @@ public final class PartnerRegistrationsUpdateSamples { PartnerRegistration resource = manager .partnerRegistrations() - .getByResourceGroupWithResponse("examplerg", "examplePartnerRegistrationName1", Context.NONE) + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerRegistrationName1", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + resource.update().withTags(mapOf("NewKey", "NewValue")).apply(); } @SuppressWarnings("unchecked") @@ -3048,7 +4118,6 @@ public final class PartnerRegistrationsUpdateSamples { ### PartnerTopicEventSubscriptions_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -3056,7 +4125,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin /** Samples for PartnerTopicEventSubscriptions CreateOrUpdate. */ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: PartnerTopicEventSubscriptions_CreateOrUpdate. @@ -3079,7 +4148,7 @@ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3087,12 +4156,10 @@ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { ### PartnerTopicEventSubscriptions_Delete ```java -import com.azure.core.util.Context; - /** Samples for PartnerTopicEventSubscriptions Delete. */ public final class PartnerTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_Delete.json */ /** * Sample code: PartnerTopicEventSubscriptions_Delete. @@ -3103,7 +4170,7 @@ public final class PartnerTopicEventSubscriptionsDeleteSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerTopicEventSubscriptions() - .delete("examplerg", "examplePartnerTopic1", "examplesubscription1", Context.NONE); + .delete("examplerg", "examplePartnerTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -3111,12 +4178,10 @@ public final class PartnerTopicEventSubscriptionsDeleteSamples { ### PartnerTopicEventSubscriptions_Get ```java -import com.azure.core.util.Context; - /** Samples for PartnerTopicEventSubscriptions Get. */ public final class PartnerTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_Get.json */ /** * Sample code: PartnerTopicEventSubscriptions_Get. @@ -3126,7 +4191,8 @@ public final class PartnerTopicEventSubscriptionsGetSamples { public static void partnerTopicEventSubscriptionsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerTopicEventSubscriptions() - .getWithResponse("examplerg", "examplePartnerTopic1", "examplesubscription1", Context.NONE); + .getWithResponse( + "examplerg", "examplePartnerTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -3134,12 +4200,10 @@ public final class PartnerTopicEventSubscriptionsGetSamples { ### PartnerTopicEventSubscriptions_GetDeliveryAttributes ```java -import com.azure.core.util.Context; - /** Samples for PartnerTopicEventSubscriptions GetDeliveryAttributes. */ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: PartnerTopicEventSubscriptions_GetDeliveryAttributes. @@ -3151,7 +4215,7 @@ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { manager .partnerTopicEventSubscriptions() .getDeliveryAttributesWithResponse( - "examplerg", "examplePartnerTopic1", "examplesubscription1", Context.NONE); + "examplerg", "examplePartnerTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -3159,12 +4223,10 @@ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { ### PartnerTopicEventSubscriptions_GetFullUrl ```java -import com.azure.core.util.Context; - /** Samples for PartnerTopicEventSubscriptions GetFullUrl. */ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: PartnerTopicEventSubscriptions_GetFullUrl. @@ -3175,7 +4237,8 @@ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerTopicEventSubscriptions() - .getFullUrlWithResponse("examplerg", "examplePartnerTopic1", "examplesubscription1", Context.NONE); + .getFullUrlWithResponse( + "examplerg", "examplePartnerTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -3183,12 +4246,10 @@ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { ### PartnerTopicEventSubscriptions_ListByPartnerTopic ```java -import com.azure.core.util.Context; - /** Samples for PartnerTopicEventSubscriptions ListByPartnerTopic. */ public final class PartnerTopicEventSubscriptionsListByPartnerTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_ListByPartnerTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_ListByPartnerTopic.json */ /** * Sample code: PartnerTopicEventSubscriptions_ListByPartnerTopic. @@ -3199,7 +4260,7 @@ public final class PartnerTopicEventSubscriptionsListByPartnerTopicSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerTopicEventSubscriptions() - .listByPartnerTopic("examplerg", "examplePartnerTopic1", null, null, Context.NONE); + .listByPartnerTopic("examplerg", "examplePartnerTopic1", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -3207,7 +4268,6 @@ public final class PartnerTopicEventSubscriptionsListByPartnerTopicSamples { ### PartnerTopicEventSubscriptions_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -3216,7 +4276,7 @@ import java.util.Arrays; /** Samples for PartnerTopicEventSubscriptions Update. */ public final class PartnerTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_Update.json */ /** * Sample code: PartnerTopicEventSubscriptions_Update. @@ -3240,7 +4300,7 @@ public final class PartnerTopicEventSubscriptionsUpdateSamples { .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3248,12 +4308,10 @@ public final class PartnerTopicEventSubscriptionsUpdateSamples { ### PartnerTopics_Activate ```java -import com.azure.core.util.Context; - /** Samples for PartnerTopics Activate. */ public final class PartnerTopicsActivateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_Activate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_Activate.json */ /** * Sample code: PartnerTopics_Activate. @@ -3261,7 +4319,9 @@ public final class PartnerTopicsActivateSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsActivate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().activateWithResponse("examplerg", "examplePartnerTopic1", Context.NONE); + manager + .partnerTopics() + .activateWithResponse("examplerg", "examplePartnerTopic1", com.azure.core.util.Context.NONE); } } ``` @@ -3275,7 +4335,7 @@ import java.util.UUID; /** Samples for PartnerTopics CreateOrUpdate. */ public final class PartnerTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_CreateOrUpdate.json */ /** * Sample code: PartnerTopics_CreateOrUpdate. @@ -3301,12 +4361,10 @@ public final class PartnerTopicsCreateOrUpdateSamples { ### PartnerTopics_Deactivate ```java -import com.azure.core.util.Context; - /** Samples for PartnerTopics Deactivate. */ public final class PartnerTopicsDeactivateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_Deactivate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_Deactivate.json */ /** * Sample code: PartnerTopics_Deactivate. @@ -3314,7 +4372,9 @@ public final class PartnerTopicsDeactivateSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsDeactivate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().deactivateWithResponse("examplerg", "examplePartnerTopic1", Context.NONE); + manager + .partnerTopics() + .deactivateWithResponse("examplerg", "examplePartnerTopic1", com.azure.core.util.Context.NONE); } } ``` @@ -3322,12 +4382,10 @@ public final class PartnerTopicsDeactivateSamples { ### PartnerTopics_Delete ```java -import com.azure.core.util.Context; - /** Samples for PartnerTopics Delete. */ public final class PartnerTopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_Delete.json */ /** * Sample code: PartnerTopics_Delete. @@ -3335,7 +4393,7 @@ public final class PartnerTopicsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().delete("examplerg", "examplePartnerTopicName1", Context.NONE); + manager.partnerTopics().delete("examplerg", "examplePartnerTopicName1", com.azure.core.util.Context.NONE); } } ``` @@ -3343,12 +4401,10 @@ public final class PartnerTopicsDeleteSamples { ### PartnerTopics_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for PartnerTopics GetByResourceGroup. */ public final class PartnerTopicsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_Get.json */ /** * Sample code: PartnerTopics_Get. @@ -3356,7 +4412,9 @@ public final class PartnerTopicsGetByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().getByResourceGroupWithResponse("examplerg", "examplePartnerTopicName1", Context.NONE); + manager + .partnerTopics() + .getByResourceGroupWithResponse("examplerg", "examplePartnerTopicName1", com.azure.core.util.Context.NONE); } } ``` @@ -3364,12 +4422,10 @@ public final class PartnerTopicsGetByResourceGroupSamples { ### PartnerTopics_List ```java -import com.azure.core.util.Context; - /** Samples for PartnerTopics List. */ public final class PartnerTopicsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_ListBySubscription.json */ /** * Sample code: PartnerTopics_ListBySubscription. @@ -3377,7 +4433,7 @@ public final class PartnerTopicsListSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().list(null, null, Context.NONE); + manager.partnerTopics().list(null, null, com.azure.core.util.Context.NONE); } } ``` @@ -3385,12 +4441,10 @@ public final class PartnerTopicsListSamples { ### PartnerTopics_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for PartnerTopics ListByResourceGroup. */ public final class PartnerTopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_ListByResourceGroup.json */ /** * Sample code: PartnerTopics_ListByResourceGroup. @@ -3398,7 +4452,7 @@ public final class PartnerTopicsListByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.partnerTopics().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -3406,7 +4460,6 @@ public final class PartnerTopicsListByResourceGroupSamples { ### PartnerTopics_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PartnerTopic; import java.util.HashMap; import java.util.Map; @@ -3414,7 +4467,7 @@ import java.util.Map; /** Samples for PartnerTopics Update. */ public final class PartnerTopicsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_Update.json */ /** * Sample code: PartnerTopics_Update. @@ -3425,7 +4478,8 @@ public final class PartnerTopicsUpdateSamples { PartnerTopic resource = manager .partnerTopics() - .getByResourceGroupWithResponse("examplerg", "examplePartnerTopicName1", Context.NONE) + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerTopicName1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -3443,16 +4497,114 @@ public final class PartnerTopicsUpdateSamples { } ``` +### PermissionBindings_CreateOrUpdate + +```java +import com.azure.resourcemanager.eventgrid.models.PermissionType; + +/** Samples for PermissionBindings CreateOrUpdate. */ +public final class PermissionBindingsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PermissionBindings_CreateOrUpdate.json + */ + /** + * Sample code: PermissionBindings_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void permissionBindingsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .permissionBindings() + .define("examplePermissionBindingName1") + .withExistingNamespace("examplerg", "exampleNamespaceName1") + .withTopicSpaceName("exampleTopicSpaceName1") + .withPermission(PermissionType.PUBLISHER) + .withClientGroupName("exampleClientGroupName1") + .create(); + } +} +``` + +### PermissionBindings_Delete + +```java +/** Samples for PermissionBindings Delete. */ +public final class PermissionBindingsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PermissionBindings_Delete.json + */ + /** + * Sample code: PermissionBindings_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void permissionBindingsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .permissionBindings() + .delete( + "examplerg", + "exampleNamespaceName1", + "examplePermissionBindingName1", + com.azure.core.util.Context.NONE); + } +} +``` + +### PermissionBindings_Get + +```java +/** Samples for PermissionBindings Get. */ +public final class PermissionBindingsGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PermissionBindings_Get.json + */ + /** + * Sample code: PermissionBindings_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void permissionBindingsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .permissionBindings() + .getWithResponse( + "examplerg", + "exampleNamespaceName1", + "examplePermissionBindingName1", + com.azure.core.util.Context.NONE); + } +} +``` + +### PermissionBindings_ListByNamespace + +```java +/** Samples for PermissionBindings ListByNamespace. */ +public final class PermissionBindingsListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PermissionBindings_ListByNamespace.json + */ + /** + * Sample code: PermissionBindings_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void permissionBindingsListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .permissionBindings() + .listByNamespace("examplerg", "namespace123", null, null, com.azure.core.util.Context.NONE); + } +} +``` + ### PrivateEndpointConnections_Delete ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType; /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateEndpointConnections_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateEndpointConnections_Delete.json */ /** * Sample code: PrivateEndpointConnections_Delete. @@ -3467,7 +4619,7 @@ public final class PrivateEndpointConnectionsDeleteSamples { PrivateEndpointConnectionsParentType.TOPICS, "exampletopic1", "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3475,13 +4627,12 @@ public final class PrivateEndpointConnectionsDeleteSamples { ### PrivateEndpointConnections_Get ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType; /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateEndpointConnections_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateEndpointConnections_Get.json */ /** * Sample code: PrivateEndpointConnections_Get. @@ -3496,7 +4647,7 @@ public final class PrivateEndpointConnectionsGetSamples { PrivateEndpointConnectionsParentType.TOPICS, "exampletopic1", "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3504,13 +4655,12 @@ public final class PrivateEndpointConnectionsGetSamples { ### PrivateEndpointConnections_ListByResource ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType; /** Samples for PrivateEndpointConnections ListByResource. */ public final class PrivateEndpointConnectionsListByResourceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateEndpointConnections_ListByResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateEndpointConnections_ListByResource.json */ /** * Sample code: PrivateEndpointConnections_ListByResource. @@ -3522,7 +4672,12 @@ public final class PrivateEndpointConnectionsListByResourceSamples { manager .privateEndpointConnections() .listByResource( - "examplerg", PrivateEndpointConnectionsParentType.TOPICS, "exampletopic1", null, null, Context.NONE); + "examplerg", + PrivateEndpointConnectionsParentType.TOPICS, + "exampletopic1", + null, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -3530,7 +4685,6 @@ public final class PrivateEndpointConnectionsListByResourceSamples { ### PrivateEndpointConnections_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.eventgrid.models.ConnectionState; import com.azure.resourcemanager.eventgrid.models.PersistedConnectionStatus; @@ -3539,7 +4693,7 @@ import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsPare /** Samples for PrivateEndpointConnections Update. */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateEndpointConnections_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateEndpointConnections_Update.json */ /** * Sample code: PrivateEndpointConnections_Update. @@ -3560,7 +4714,7 @@ public final class PrivateEndpointConnectionsUpdateSamples { .withStatus(PersistedConnectionStatus.APPROVED) .withDescription("approving connection") .withActionsRequired("None")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3568,12 +4722,10 @@ public final class PrivateEndpointConnectionsUpdateSamples { ### PrivateLinkResources_Get ```java -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateLinkResources_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateLinkResources_Get.json */ /** * Sample code: PrivateLinkResources_Get. @@ -3581,7 +4733,9 @@ public final class PrivateLinkResourcesGetSamples { * @param manager Entry point to EventGridManager. */ public static void privateLinkResourcesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.privateLinkResources().getWithResponse("examplerg", "topics", "exampletopic1", "topic", Context.NONE); + manager + .privateLinkResources() + .getWithResponse("examplerg", "topics", "exampletopic1", "topic", com.azure.core.util.Context.NONE); } } ``` @@ -3589,12 +4743,10 @@ public final class PrivateLinkResourcesGetSamples { ### PrivateLinkResources_ListByResource ```java -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources ListByResource. */ public final class PrivateLinkResourcesListByResourceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateLinkResources_ListByResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateLinkResources_ListByResource.json */ /** * Sample code: PrivateLinkResources_ListByResource. @@ -3603,7 +4755,9 @@ public final class PrivateLinkResourcesListByResourceSamples { */ public static void privateLinkResourcesListByResource( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.privateLinkResources().listByResource("examplerg", "topics", "exampletopic1", null, null, Context.NONE); + manager + .privateLinkResources() + .listByResource("examplerg", "topics", "exampletopic1", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -3611,7 +4765,6 @@ public final class PrivateLinkResourcesListByResourceSamples { ### SystemTopicEventSubscriptions_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -3619,7 +4772,7 @@ import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestin /** Samples for SystemTopicEventSubscriptions CreateOrUpdate. */ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: SystemTopicEventSubscriptions_CreateOrUpdate. @@ -3642,7 +4795,7 @@ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3650,12 +4803,10 @@ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { ### SystemTopicEventSubscriptions_Delete ```java -import com.azure.core.util.Context; - /** Samples for SystemTopicEventSubscriptions Delete. */ public final class SystemTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_Delete.json */ /** * Sample code: SystemTopicEventSubscriptions_Delete. @@ -3666,7 +4817,7 @@ public final class SystemTopicEventSubscriptionsDeleteSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .systemTopicEventSubscriptions() - .delete("examplerg", "exampleSystemTopic1", "examplesubscription1", Context.NONE); + .delete("examplerg", "exampleSystemTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -3674,12 +4825,10 @@ public final class SystemTopicEventSubscriptionsDeleteSamples { ### SystemTopicEventSubscriptions_Get ```java -import com.azure.core.util.Context; - /** Samples for SystemTopicEventSubscriptions Get. */ public final class SystemTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_Get.json */ /** * Sample code: SystemTopicEventSubscriptions_Get. @@ -3689,7 +4838,8 @@ public final class SystemTopicEventSubscriptionsGetSamples { public static void systemTopicEventSubscriptionsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .systemTopicEventSubscriptions() - .getWithResponse("examplerg", "exampleSystemTopic1", "examplesubscription1", Context.NONE); + .getWithResponse( + "examplerg", "exampleSystemTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -3697,12 +4847,10 @@ public final class SystemTopicEventSubscriptionsGetSamples { ### SystemTopicEventSubscriptions_GetDeliveryAttributes ```java -import com.azure.core.util.Context; - /** Samples for SystemTopicEventSubscriptions GetDeliveryAttributes. */ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: SystemTopicEventSubscriptions_GetDeliveryAttributes. @@ -3714,7 +4862,7 @@ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { manager .systemTopicEventSubscriptions() .getDeliveryAttributesWithResponse( - "examplerg", "exampleSystemTopic1", "examplesubscription1", Context.NONE); + "examplerg", "exampleSystemTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -3722,12 +4870,10 @@ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { ### SystemTopicEventSubscriptions_GetFullUrl ```java -import com.azure.core.util.Context; - /** Samples for SystemTopicEventSubscriptions GetFullUrl. */ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: SystemTopicEventSubscriptions_GetFullUrl. @@ -3738,7 +4884,8 @@ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .systemTopicEventSubscriptions() - .getFullUrlWithResponse("examplerg", "exampleSystemTopic1", "examplesubscription1", Context.NONE); + .getFullUrlWithResponse( + "examplerg", "exampleSystemTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -3746,12 +4893,10 @@ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { ### SystemTopicEventSubscriptions_ListBySystemTopic ```java -import com.azure.core.util.Context; - /** Samples for SystemTopicEventSubscriptions ListBySystemTopic. */ public final class SystemTopicEventSubscriptionsListBySystemTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_ListBySystemTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_ListBySystemTopic.json */ /** * Sample code: SystemTopicEventSubscriptions_ListBySystemTopic. @@ -3762,7 +4907,7 @@ public final class SystemTopicEventSubscriptionsListBySystemTopicSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .systemTopicEventSubscriptions() - .listBySystemTopic("examplerg", "exampleSystemTopic1", null, null, Context.NONE); + .listBySystemTopic("examplerg", "exampleSystemTopic1", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -3770,7 +4915,6 @@ public final class SystemTopicEventSubscriptionsListBySystemTopicSamples { ### SystemTopicEventSubscriptions_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -3779,7 +4923,7 @@ import java.util.Arrays; /** Samples for SystemTopicEventSubscriptions Update. */ public final class SystemTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_Update.json */ /** * Sample code: SystemTopicEventSubscriptions_Update. @@ -3803,7 +4947,7 @@ public final class SystemTopicEventSubscriptionsUpdateSamples { .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3817,7 +4961,7 @@ import java.util.Map; /** Samples for SystemTopics CreateOrUpdate. */ public final class SystemTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_CreateOrUpdate.json */ /** * Sample code: SystemTopics_CreateOrUpdate. @@ -3832,7 +4976,7 @@ public final class SystemTopicsCreateOrUpdateSamples { .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withSource( - "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e") + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e") .withTopicType("microsoft.storage.storageaccounts") .create(); } @@ -3853,12 +4997,10 @@ public final class SystemTopicsCreateOrUpdateSamples { ### SystemTopics_Delete ```java -import com.azure.core.util.Context; - /** Samples for SystemTopics Delete. */ public final class SystemTopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_Delete.json */ /** * Sample code: SystemTopics_Delete. @@ -3866,7 +5008,7 @@ public final class SystemTopicsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void systemTopicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.systemTopics().delete("examplerg", "exampleSystemTopic1", Context.NONE); + manager.systemTopics().delete("examplerg", "exampleSystemTopic1", com.azure.core.util.Context.NONE); } } ``` @@ -3874,12 +5016,10 @@ public final class SystemTopicsDeleteSamples { ### SystemTopics_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for SystemTopics GetByResourceGroup. */ public final class SystemTopicsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_Get.json */ /** * Sample code: SystemTopics_Get. @@ -3887,7 +5027,9 @@ public final class SystemTopicsGetByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void systemTopicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.systemTopics().getByResourceGroupWithResponse("examplerg", "exampleSystemTopic2", Context.NONE); + manager + .systemTopics() + .getByResourceGroupWithResponse("examplerg", "exampleSystemTopic2", com.azure.core.util.Context.NONE); } } ``` @@ -3895,12 +5037,10 @@ public final class SystemTopicsGetByResourceGroupSamples { ### SystemTopics_List ```java -import com.azure.core.util.Context; - /** Samples for SystemTopics List. */ public final class SystemTopicsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_ListBySubscription.json */ /** * Sample code: SystemTopics_ListBySubscription. @@ -3908,7 +5048,7 @@ public final class SystemTopicsListSamples { * @param manager Entry point to EventGridManager. */ public static void systemTopicsListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.systemTopics().list(null, null, Context.NONE); + manager.systemTopics().list(null, null, com.azure.core.util.Context.NONE); } } ``` @@ -3916,12 +5056,10 @@ public final class SystemTopicsListSamples { ### SystemTopics_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for SystemTopics ListByResourceGroup. */ public final class SystemTopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_ListByResourceGroup.json */ /** * Sample code: SystemTopics_ListByResourceGroup. @@ -3929,7 +5067,7 @@ public final class SystemTopicsListByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void systemTopicsListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.systemTopics().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.systemTopics().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -3937,7 +5075,6 @@ public final class SystemTopicsListByResourceGroupSamples { ### SystemTopics_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.SystemTopic; import java.util.HashMap; import java.util.Map; @@ -3945,7 +5082,7 @@ import java.util.Map; /** Samples for SystemTopics Update. */ public final class SystemTopicsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_Update.json */ /** * Sample code: SystemTopics_Update. @@ -3956,7 +5093,7 @@ public final class SystemTopicsUpdateSamples { SystemTopic resource = manager .systemTopics() - .getByResourceGroupWithResponse("examplerg", "exampleSystemTopic1", Context.NONE) + .getByResourceGroupWithResponse("examplerg", "exampleSystemTopic1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -3977,13 +5114,14 @@ public final class SystemTopicsUpdateSamples { ### TopicEventSubscriptions_CreateOrUpdate ```java +import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; /** Samples for TopicEventSubscriptions CreateOrUpdate. */ public final class TopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: TopicEventSubscriptions_CreateOrUpdate. @@ -3994,15 +5132,19 @@ public final class TopicEventSubscriptionsCreateOrUpdateSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .topicEventSubscriptions() - .define("exampleEventSubscriptionName1") - .withExistingTopic("examplerg", "exampleTopic1") - .withDestination(new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) - .withFilter( - new EventSubscriptionFilter() - .withSubjectBeginsWith("ExamplePrefix") - .withSubjectEndsWith("ExampleSuffix") - .withIsSubjectCaseSensitive(false)) - .create(); + .createOrUpdate( + "examplerg", + "exampleTopic1", + "exampleEventSubscriptionName1", + new EventSubscriptionInner() + .withDestination( + new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) + .withFilter( + new EventSubscriptionFilter() + .withSubjectBeginsWith("ExamplePrefix") + .withSubjectEndsWith("ExampleSuffix") + .withIsSubjectCaseSensitive(false)), + com.azure.core.util.Context.NONE); } } ``` @@ -4010,12 +5152,10 @@ public final class TopicEventSubscriptionsCreateOrUpdateSamples { ### TopicEventSubscriptions_Delete ```java -import com.azure.core.util.Context; - /** Samples for TopicEventSubscriptions Delete. */ public final class TopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_Delete.json */ /** * Sample code: TopicEventSubscriptions_Delete. @@ -4023,7 +5163,9 @@ public final class TopicEventSubscriptionsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void topicEventSubscriptionsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topicEventSubscriptions().delete("examplerg", "exampleTopic1", "examplesubscription1", Context.NONE); + manager + .topicEventSubscriptions() + .delete("examplerg", "exampleTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -4031,12 +5173,10 @@ public final class TopicEventSubscriptionsDeleteSamples { ### TopicEventSubscriptions_Get ```java -import com.azure.core.util.Context; - /** Samples for TopicEventSubscriptions Get. */ public final class TopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_Get.json */ /** * Sample code: TopicEventSubscriptions_Get. @@ -4046,7 +5186,7 @@ public final class TopicEventSubscriptionsGetSamples { public static void topicEventSubscriptionsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .topicEventSubscriptions() - .getWithResponse("examplerg", "exampleTopic1", "examplesubscription1", Context.NONE); + .getWithResponse("examplerg", "exampleTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -4054,12 +5194,10 @@ public final class TopicEventSubscriptionsGetSamples { ### TopicEventSubscriptions_GetDeliveryAttributes ```java -import com.azure.core.util.Context; - /** Samples for TopicEventSubscriptions GetDeliveryAttributes. */ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: TopicEventSubscriptions_GetDeliveryAttributes. @@ -4070,7 +5208,8 @@ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .topicEventSubscriptions() - .getDeliveryAttributesWithResponse("examplerg", "exampleTopic1", "examplesubscription1", Context.NONE); + .getDeliveryAttributesWithResponse( + "examplerg", "exampleTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -4078,12 +5217,10 @@ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { ### TopicEventSubscriptions_GetFullUrl ```java -import com.azure.core.util.Context; - /** Samples for TopicEventSubscriptions GetFullUrl. */ public final class TopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: TopicEventSubscriptions_GetFullUrl. @@ -4093,7 +5230,8 @@ public final class TopicEventSubscriptionsGetFullUrlSamples { public static void topicEventSubscriptionsGetFullUrl(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .topicEventSubscriptions() - .getFullUrlWithResponse("examplerg", "exampleTopic1", "examplesubscription1", Context.NONE); + .getFullUrlWithResponse( + "examplerg", "exampleTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } ``` @@ -4101,12 +5239,10 @@ public final class TopicEventSubscriptionsGetFullUrlSamples { ### TopicEventSubscriptions_List ```java -import com.azure.core.util.Context; - /** Samples for TopicEventSubscriptions List. */ public final class TopicEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_List.json */ /** * Sample code: TopicEventSubscriptions_List. @@ -4114,7 +5250,9 @@ public final class TopicEventSubscriptionsListSamples { * @param manager Entry point to EventGridManager. */ public static void topicEventSubscriptionsList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topicEventSubscriptions().list("examplerg", "exampleTopic1", null, null, Context.NONE); + manager + .topicEventSubscriptions() + .list("examplerg", "exampleTopic1", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -4122,16 +5260,15 @@ public final class TopicEventSubscriptionsListSamples { ### TopicEventSubscriptions_Update ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.eventgrid.models.EventSubscription; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; +import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; import java.util.Arrays; /** Samples for TopicEventSubscriptions Update. */ public final class TopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_Update.json */ /** * Sample code: TopicEventSubscriptions_Update. @@ -4139,34 +5276,123 @@ public final class TopicEventSubscriptionsUpdateSamples { * @param manager Entry point to EventGridManager. */ public static void topicEventSubscriptionsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - EventSubscription resource = - manager - .topicEventSubscriptions() - .getWithResponse("examplerg", "exampleTopic1", "exampleEventSubscriptionName1", Context.NONE) - .getValue(); - resource - .update() - .withDestination(new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) - .withFilter( - new EventSubscriptionFilter() - .withSubjectBeginsWith("existingPrefix") - .withSubjectEndsWith("newSuffix") - .withIsSubjectCaseSensitive(true)) - .withLabels(Arrays.asList("label1", "label2")) - .apply(); + manager + .topicEventSubscriptions() + .update( + "examplerg", + "exampleTopic1", + "exampleEventSubscriptionName1", + new EventSubscriptionUpdateParameters() + .withDestination( + new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) + .withFilter( + new EventSubscriptionFilter() + .withSubjectBeginsWith("existingPrefix") + .withSubjectEndsWith("newSuffix") + .withIsSubjectCaseSensitive(true)) + .withLabels(Arrays.asList("label1", "label2")), + com.azure.core.util.Context.NONE); } } ``` -### TopicTypes_Get +### TopicSpaces_CreateOrUpdate + +```java +import java.util.Arrays; + +/** Samples for TopicSpaces CreateOrUpdate. */ +public final class TopicSpacesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicSpaces_CreateOrUpdate.json + */ + /** + * Sample code: TopicSpaces_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void topicSpacesCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .topicSpaces() + .define("exampleTopicSpaceName1") + .withExistingNamespace("examplerg", "exampleNamespaceName1") + .withTopicTemplates(Arrays.asList("filter1", "filter2")) + .create(); + } +} +``` + +### TopicSpaces_Delete + +```java +/** Samples for TopicSpaces Delete. */ +public final class TopicSpacesDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicSpaces_Delete.json + */ + /** + * Sample code: TopicSpaces_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void topicSpacesDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .topicSpaces() + .delete("examplerg", "exampleNamespaceName1", "exampleTopicSpaceName1", com.azure.core.util.Context.NONE); + } +} +``` + +### TopicSpaces_Get + +```java +/** Samples for TopicSpaces Get. */ +public final class TopicSpacesGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicSpaces_Get.json + */ + /** + * Sample code: TopicSpaces_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void topicSpacesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .topicSpaces() + .getWithResponse( + "examplerg", "exampleNamespaceName1", "exampleTopicSpaceName1", com.azure.core.util.Context.NONE); + } +} +``` + +### TopicSpaces_ListByNamespace ```java -import com.azure.core.util.Context; +/** Samples for TopicSpaces ListByNamespace. */ +public final class TopicSpacesListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicSpaces_ListByNamespace.json + */ + /** + * Sample code: TopicSpaces_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void topicSpacesListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .topicSpaces() + .listByNamespace("examplerg", "namespace123", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### TopicTypes_Get +```java /** Samples for TopicTypes Get. */ public final class TopicTypesGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicTypes_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicTypes_Get.json */ /** * Sample code: TopicTypes_Get. @@ -4174,7 +5400,7 @@ public final class TopicTypesGetSamples { * @param manager Entry point to EventGridManager. */ public static void topicTypesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topicTypes().getWithResponse("Microsoft.Storage.StorageAccounts", Context.NONE); + manager.topicTypes().getWithResponse("Microsoft.Storage.StorageAccounts", com.azure.core.util.Context.NONE); } } ``` @@ -4182,12 +5408,10 @@ public final class TopicTypesGetSamples { ### TopicTypes_List ```java -import com.azure.core.util.Context; - /** Samples for TopicTypes List. */ public final class TopicTypesListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicTypes_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicTypes_List.json */ /** * Sample code: TopicTypes_List. @@ -4195,7 +5419,7 @@ public final class TopicTypesListSamples { * @param manager Entry point to EventGridManager. */ public static void topicTypesList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topicTypes().list(Context.NONE); + manager.topicTypes().list(com.azure.core.util.Context.NONE); } } ``` @@ -4203,12 +5427,10 @@ public final class TopicTypesListSamples { ### TopicTypes_ListEventTypes ```java -import com.azure.core.util.Context; - /** Samples for TopicTypes ListEventTypes. */ public final class TopicTypesListEventTypesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicTypes_ListEventTypes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicTypes_ListEventTypes.json */ /** * Sample code: TopicTypes_ListEventTypes. @@ -4216,7 +5438,7 @@ public final class TopicTypesListEventTypesSamples { * @param manager Entry point to EventGridManager. */ public static void topicTypesListEventTypes(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topicTypes().listEventTypes("Microsoft.Storage.StorageAccounts", Context.NONE); + manager.topicTypes().listEventTypes("Microsoft.Storage.StorageAccounts", com.azure.core.util.Context.NONE); } } ``` @@ -4224,9 +5446,12 @@ public final class TopicTypesListEventTypesSamples { ### Topics_CreateOrUpdate ```java +import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; +import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.IpActionType; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.ResourceKind; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -4234,7 +5459,7 @@ import java.util.Map; /** Samples for Topics CreateOrUpdate. */ public final class TopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_CreateOrUpdate.json */ /** * Sample code: Topics_CreateOrUpdate. @@ -4257,6 +5482,31 @@ public final class TopicsCreateOrUpdateSamples { .create(); } + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_CreateOrUpdateForAzureArc.json + */ + /** + * Sample code: Topics_CreateOrUpdateForAzureArc. + * + * @param manager Entry point to EventGridManager. + */ + public static void topicsCreateOrUpdateForAzureArc(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .topics() + .define("exampletopic1") + .withRegion("westus2") + .withExistingResourceGroup("examplerg") + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withKind(ResourceKind.AZURE_ARC) + .withExtendedLocation( + new ExtendedLocation() + .withName( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourcegroups/examplerg/providers/Microsoft.ExtendedLocation/CustomLocations/exampleCustomLocation") + .withType("CustomLocation")) + .withInputSchema(InputSchema.CLOUD_EVENT_SCHEMA_V1_0) + .create(); + } + @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -4273,12 +5523,10 @@ public final class TopicsCreateOrUpdateSamples { ### Topics_Delete ```java -import com.azure.core.util.Context; - /** Samples for Topics Delete. */ public final class TopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_Delete.json */ /** * Sample code: Topics_Delete. @@ -4286,7 +5534,7 @@ public final class TopicsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void topicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().delete("examplerg", "exampletopic1", Context.NONE); + manager.topics().delete("examplerg1", "exampletopic1", com.azure.core.util.Context.NONE); } } ``` @@ -4294,12 +5542,10 @@ public final class TopicsDeleteSamples { ### Topics_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Topics GetByResourceGroup. */ public final class TopicsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_Get.json */ /** * Sample code: Topics_Get. @@ -4307,7 +5553,7 @@ public final class TopicsGetByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void topicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().getByResourceGroupWithResponse("examplerg", "exampletopic2", Context.NONE); + manager.topics().getByResourceGroupWithResponse("examplerg", "exampletopic2", com.azure.core.util.Context.NONE); } } ``` @@ -4315,12 +5561,10 @@ public final class TopicsGetByResourceGroupSamples { ### Topics_List ```java -import com.azure.core.util.Context; - /** Samples for Topics List. */ public final class TopicsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_ListBySubscription.json */ /** * Sample code: Topics_ListBySubscription. @@ -4328,7 +5572,7 @@ public final class TopicsListSamples { * @param manager Entry point to EventGridManager. */ public static void topicsListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().list(null, null, Context.NONE); + manager.topics().list(null, null, com.azure.core.util.Context.NONE); } } ``` @@ -4336,12 +5580,10 @@ public final class TopicsListSamples { ### Topics_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Topics ListByResourceGroup. */ public final class TopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_ListByResourceGroup.json */ /** * Sample code: Topics_ListByResourceGroup. @@ -4349,7 +5591,7 @@ public final class TopicsListByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void topicsListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.topics().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -4357,12 +5599,10 @@ public final class TopicsListByResourceGroupSamples { ### Topics_ListEventTypes ```java -import com.azure.core.util.Context; - /** Samples for Topics ListEventTypes. */ public final class TopicsListEventTypesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_ListEventTypes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_ListEventTypes.json */ /** * Sample code: Topics_ListEventTypes. @@ -4372,7 +5612,12 @@ public final class TopicsListEventTypesSamples { public static void topicsListEventTypes(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .topics() - .listEventTypes("examplerg", "Microsoft.Storage", "storageAccounts", "ExampleStorageAccount", Context.NONE); + .listEventTypes( + "examplerg", + "Microsoft.Storage", + "storageAccounts", + "ExampleStorageAccount", + com.azure.core.util.Context.NONE); } } ``` @@ -4380,12 +5625,10 @@ public final class TopicsListEventTypesSamples { ### Topics_ListSharedAccessKeys ```java -import com.azure.core.util.Context; - /** Samples for Topics ListSharedAccessKeys. */ public final class TopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_ListSharedAccessKeys.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_ListSharedAccessKeys.json */ /** * Sample code: Topics_ListSharedAccessKeys. @@ -4393,7 +5636,9 @@ public final class TopicsListSharedAccessKeysSamples { * @param manager Entry point to EventGridManager. */ public static void topicsListSharedAccessKeys(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().listSharedAccessKeysWithResponse("examplerg", "exampletopic2", Context.NONE); + manager + .topics() + .listSharedAccessKeysWithResponse("examplerg", "exampletopic2", com.azure.core.util.Context.NONE); } } ``` @@ -4401,13 +5646,12 @@ public final class TopicsListSharedAccessKeysSamples { ### Topics_RegenerateKey ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; /** Samples for Topics RegenerateKey. */ public final class TopicsRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_RegenerateKey.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_RegenerateKey.json */ /** * Sample code: Topics_RegenerateKey. @@ -4418,7 +5662,10 @@ public final class TopicsRegenerateKeySamples { manager .topics() .regenerateKey( - "examplerg", "exampletopic2", new TopicRegenerateKeyRequest().withKeyName("key1"), Context.NONE); + "examplerg", + "exampletopic2", + new TopicRegenerateKeyRequest().withKeyName("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); } } ``` @@ -4426,7 +5673,6 @@ public final class TopicsRegenerateKeySamples { ### Topics_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.IpActionType; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; @@ -4438,7 +5684,7 @@ import java.util.Map; /** Samples for Topics Update. */ public final class TopicsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_Update.json */ /** * Sample code: Topics_Update. @@ -4447,7 +5693,10 @@ public final class TopicsUpdateSamples { */ public static void topicsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { Topic resource = - manager.topics().getByResourceGroupWithResponse("examplerg", "exampletopic1", Context.NONE).getValue(); + manager + .topics() + .getByResourceGroupWithResponse("examplerg", "exampletopic1", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) @@ -4476,12 +5725,10 @@ public final class TopicsUpdateSamples { ### VerifiedPartners_Get ```java -import com.azure.core.util.Context; - /** Samples for VerifiedPartners Get. */ public final class VerifiedPartnersGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/VerifiedPartners_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/VerifiedPartners_Get.json */ /** * Sample code: VerifiedPartners_Get. @@ -4489,7 +5736,7 @@ public final class VerifiedPartnersGetSamples { * @param manager Entry point to EventGridManager. */ public static void verifiedPartnersGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.verifiedPartners().getWithResponse("Contoso.Finance", Context.NONE); + manager.verifiedPartners().getWithResponse("Contoso.Finance", com.azure.core.util.Context.NONE); } } ``` @@ -4497,12 +5744,10 @@ public final class VerifiedPartnersGetSamples { ### VerifiedPartners_List ```java -import com.azure.core.util.Context; - /** Samples for VerifiedPartners List. */ public final class VerifiedPartnersListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/VerifiedPartners_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/VerifiedPartners_List.json */ /** * Sample code: VerifiedPartners_List. @@ -4510,7 +5755,7 @@ public final class VerifiedPartnersListSamples { * @param manager Entry point to EventGridManager. */ public static void verifiedPartnersList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.verifiedPartners().list(null, null, Context.NONE); + manager.verifiedPartners().list(null, null, com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml index f82b507c44c7..499cce980ff0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ jar Microsoft Azure SDK for EventGrid Management - This package contains Microsoft Azure SDK for EventGrid Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure EventGrid Management Client. Package tag package-2022-06. + This package contains Microsoft Azure SDK for EventGrid Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure EventGrid Management Client. Package tag package-2023-06-preview. https://github.com/Azure/azure-sdk-for-java @@ -38,8 +43,8 @@ UTF-8 - true - true + 0 + 0 diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/EventGridManager.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/EventGridManager.java index 5bb76d59e6cd..14cc95d7d9e2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/EventGridManager.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/EventGridManager.java @@ -24,7 +24,10 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.eventgrid.fluent.EventGridManagementClient; +import com.azure.resourcemanager.eventgrid.implementation.CaCertificatesImpl; import com.azure.resourcemanager.eventgrid.implementation.ChannelsImpl; +import com.azure.resourcemanager.eventgrid.implementation.ClientGroupsImpl; +import com.azure.resourcemanager.eventgrid.implementation.ClientsImpl; import com.azure.resourcemanager.eventgrid.implementation.DomainEventSubscriptionsImpl; import com.azure.resourcemanager.eventgrid.implementation.DomainTopicEventSubscriptionsImpl; import com.azure.resourcemanager.eventgrid.implementation.DomainTopicsImpl; @@ -32,38 +35,53 @@ import com.azure.resourcemanager.eventgrid.implementation.EventGridManagementClientBuilder; import com.azure.resourcemanager.eventgrid.implementation.EventSubscriptionsImpl; import com.azure.resourcemanager.eventgrid.implementation.ExtensionTopicsImpl; +import com.azure.resourcemanager.eventgrid.implementation.NamespaceTopicEventSubscriptionsImpl; +import com.azure.resourcemanager.eventgrid.implementation.NamespaceTopicsImpl; +import com.azure.resourcemanager.eventgrid.implementation.NamespacesImpl; import com.azure.resourcemanager.eventgrid.implementation.OperationsImpl; import com.azure.resourcemanager.eventgrid.implementation.PartnerConfigurationsImpl; +import com.azure.resourcemanager.eventgrid.implementation.PartnerDestinationsImpl; import com.azure.resourcemanager.eventgrid.implementation.PartnerNamespacesImpl; import com.azure.resourcemanager.eventgrid.implementation.PartnerRegistrationsImpl; import com.azure.resourcemanager.eventgrid.implementation.PartnerTopicEventSubscriptionsImpl; import com.azure.resourcemanager.eventgrid.implementation.PartnerTopicsImpl; +import com.azure.resourcemanager.eventgrid.implementation.PermissionBindingsImpl; import com.azure.resourcemanager.eventgrid.implementation.PrivateEndpointConnectionsImpl; import com.azure.resourcemanager.eventgrid.implementation.PrivateLinkResourcesImpl; import com.azure.resourcemanager.eventgrid.implementation.SystemTopicEventSubscriptionsImpl; import com.azure.resourcemanager.eventgrid.implementation.SystemTopicsImpl; import com.azure.resourcemanager.eventgrid.implementation.TopicEventSubscriptionsImpl; +import com.azure.resourcemanager.eventgrid.implementation.TopicSpacesImpl; import com.azure.resourcemanager.eventgrid.implementation.TopicTypesImpl; import com.azure.resourcemanager.eventgrid.implementation.TopicsImpl; import com.azure.resourcemanager.eventgrid.implementation.VerifiedPartnersImpl; +import com.azure.resourcemanager.eventgrid.models.CaCertificates; import com.azure.resourcemanager.eventgrid.models.Channels; +import com.azure.resourcemanager.eventgrid.models.ClientGroups; +import com.azure.resourcemanager.eventgrid.models.Clients; import com.azure.resourcemanager.eventgrid.models.DomainEventSubscriptions; import com.azure.resourcemanager.eventgrid.models.DomainTopicEventSubscriptions; import com.azure.resourcemanager.eventgrid.models.DomainTopics; import com.azure.resourcemanager.eventgrid.models.Domains; import com.azure.resourcemanager.eventgrid.models.EventSubscriptions; import com.azure.resourcemanager.eventgrid.models.ExtensionTopics; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopicEventSubscriptions; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopics; +import com.azure.resourcemanager.eventgrid.models.Namespaces; import com.azure.resourcemanager.eventgrid.models.Operations; import com.azure.resourcemanager.eventgrid.models.PartnerConfigurations; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinations; import com.azure.resourcemanager.eventgrid.models.PartnerNamespaces; import com.azure.resourcemanager.eventgrid.models.PartnerRegistrations; import com.azure.resourcemanager.eventgrid.models.PartnerTopicEventSubscriptions; import com.azure.resourcemanager.eventgrid.models.PartnerTopics; +import com.azure.resourcemanager.eventgrid.models.PermissionBindings; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnections; import com.azure.resourcemanager.eventgrid.models.PrivateLinkResources; import com.azure.resourcemanager.eventgrid.models.SystemTopicEventSubscriptions; import com.azure.resourcemanager.eventgrid.models.SystemTopics; import com.azure.resourcemanager.eventgrid.models.TopicEventSubscriptions; +import com.azure.resourcemanager.eventgrid.models.TopicSpaces; import com.azure.resourcemanager.eventgrid.models.TopicTypes; import com.azure.resourcemanager.eventgrid.models.Topics; import com.azure.resourcemanager.eventgrid.models.VerifiedPartners; @@ -76,44 +94,62 @@ /** Entry point to EventGridManager. Azure EventGrid Management Client. */ public final class EventGridManager { + private CaCertificates caCertificates; + private Channels channels; + private ClientGroups clientGroups; + + private Clients clients; + private Domains domains; private DomainTopics domainTopics; + private DomainTopicEventSubscriptions domainTopicEventSubscriptions; + private TopicEventSubscriptions topicEventSubscriptions; private DomainEventSubscriptions domainEventSubscriptions; private EventSubscriptions eventSubscriptions; - private DomainTopicEventSubscriptions domainTopicEventSubscriptions; - private SystemTopicEventSubscriptions systemTopicEventSubscriptions; + private NamespaceTopicEventSubscriptions namespaceTopicEventSubscriptions; + private PartnerTopicEventSubscriptions partnerTopicEventSubscriptions; - private Operations operations; + private Namespaces namespaces; - private Topics topics; + private NamespaceTopics namespaceTopics; + + private Operations operations; private PartnerConfigurations partnerConfigurations; + private PartnerDestinations partnerDestinations; + private PartnerNamespaces partnerNamespaces; private PartnerRegistrations partnerRegistrations; private PartnerTopics partnerTopics; + private PermissionBindings permissionBindings; + private PrivateEndpointConnections privateEndpointConnections; private PrivateLinkResources privateLinkResources; private SystemTopics systemTopics; + private Topics topics; + private ExtensionTopics extensionTopics; + private TopicSpaces topicSpaces; + private TopicTypes topicTypes; private VerifiedPartners verifiedPartners; @@ -283,7 +319,7 @@ public EventGridManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.eventgrid") .append("/") - .append("1.2.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -340,6 +376,18 @@ public EventGridManager authenticate(TokenCredential credential, AzureProfile pr } } + /** + * Gets the resource collection API of CaCertificates. It manages CaCertificate. + * + * @return Resource collection API of CaCertificates. + */ + public CaCertificates caCertificates() { + if (this.caCertificates == null) { + this.caCertificates = new CaCertificatesImpl(clientObject.getCaCertificates(), this); + } + return caCertificates; + } + /** * Gets the resource collection API of Channels. It manages Channel. * @@ -352,6 +400,30 @@ public Channels channels() { return channels; } + /** + * Gets the resource collection API of ClientGroups. It manages ClientGroup. + * + * @return Resource collection API of ClientGroups. + */ + public ClientGroups clientGroups() { + if (this.clientGroups == null) { + this.clientGroups = new ClientGroupsImpl(clientObject.getClientGroups(), this); + } + return clientGroups; + } + + /** + * Gets the resource collection API of Clients. It manages Client. + * + * @return Resource collection API of Clients. + */ + public Clients clients() { + if (this.clients == null) { + this.clients = new ClientsImpl(clientObject.getClients(), this); + } + return clients; + } + /** * Gets the resource collection API of Domains. It manages Domain. * @@ -377,7 +449,20 @@ public DomainTopics domainTopics() { } /** - * Gets the resource collection API of TopicEventSubscriptions. It manages EventSubscription. + * Gets the resource collection API of DomainTopicEventSubscriptions. It manages EventSubscription. + * + * @return Resource collection API of DomainTopicEventSubscriptions. + */ + public DomainTopicEventSubscriptions domainTopicEventSubscriptions() { + if (this.domainTopicEventSubscriptions == null) { + this.domainTopicEventSubscriptions = + new DomainTopicEventSubscriptionsImpl(clientObject.getDomainTopicEventSubscriptions(), this); + } + return domainTopicEventSubscriptions; + } + + /** + * Gets the resource collection API of TopicEventSubscriptions. * * @return Resource collection API of TopicEventSubscriptions. */ @@ -414,19 +499,6 @@ public EventSubscriptions eventSubscriptions() { return eventSubscriptions; } - /** - * Gets the resource collection API of DomainTopicEventSubscriptions. - * - * @return Resource collection API of DomainTopicEventSubscriptions. - */ - public DomainTopicEventSubscriptions domainTopicEventSubscriptions() { - if (this.domainTopicEventSubscriptions == null) { - this.domainTopicEventSubscriptions = - new DomainTopicEventSubscriptionsImpl(clientObject.getDomainTopicEventSubscriptions(), this); - } - return domainTopicEventSubscriptions; - } - /** * Gets the resource collection API of SystemTopicEventSubscriptions. * @@ -440,6 +512,19 @@ public SystemTopicEventSubscriptions systemTopicEventSubscriptions() { return systemTopicEventSubscriptions; } + /** + * Gets the resource collection API of NamespaceTopicEventSubscriptions. It manages Subscription. + * + * @return Resource collection API of NamespaceTopicEventSubscriptions. + */ + public NamespaceTopicEventSubscriptions namespaceTopicEventSubscriptions() { + if (this.namespaceTopicEventSubscriptions == null) { + this.namespaceTopicEventSubscriptions = + new NamespaceTopicEventSubscriptionsImpl(clientObject.getNamespaceTopicEventSubscriptions(), this); + } + return namespaceTopicEventSubscriptions; + } + /** * Gets the resource collection API of PartnerTopicEventSubscriptions. * @@ -454,27 +539,39 @@ public PartnerTopicEventSubscriptions partnerTopicEventSubscriptions() { } /** - * Gets the resource collection API of Operations. + * Gets the resource collection API of Namespaces. It manages Namespace. * - * @return Resource collection API of Operations. + * @return Resource collection API of Namespaces. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); + public Namespaces namespaces() { + if (this.namespaces == null) { + this.namespaces = new NamespacesImpl(clientObject.getNamespaces(), this); } - return operations; + return namespaces; } /** - * Gets the resource collection API of Topics. It manages Topic. + * Gets the resource collection API of NamespaceTopics. It manages NamespaceTopic. * - * @return Resource collection API of Topics. + * @return Resource collection API of NamespaceTopics. */ - public Topics topics() { - if (this.topics == null) { - this.topics = new TopicsImpl(clientObject.getTopics(), this); + public NamespaceTopics namespaceTopics() { + if (this.namespaceTopics == null) { + this.namespaceTopics = new NamespaceTopicsImpl(clientObject.getNamespaceTopics(), this); } - return topics; + return namespaceTopics; + } + + /** + * 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); + } + return operations; } /** @@ -489,6 +586,18 @@ public PartnerConfigurations partnerConfigurations() { return partnerConfigurations; } + /** + * Gets the resource collection API of PartnerDestinations. It manages PartnerDestination. + * + * @return Resource collection API of PartnerDestinations. + */ + public PartnerDestinations partnerDestinations() { + if (this.partnerDestinations == null) { + this.partnerDestinations = new PartnerDestinationsImpl(clientObject.getPartnerDestinations(), this); + } + return partnerDestinations; + } + /** * Gets the resource collection API of PartnerNamespaces. It manages PartnerNamespace. * @@ -525,6 +634,18 @@ public PartnerTopics partnerTopics() { return partnerTopics; } + /** + * Gets the resource collection API of PermissionBindings. It manages PermissionBinding. + * + * @return Resource collection API of PermissionBindings. + */ + public PermissionBindings permissionBindings() { + if (this.permissionBindings == null) { + this.permissionBindings = new PermissionBindingsImpl(clientObject.getPermissionBindings(), this); + } + return permissionBindings; + } + /** * Gets the resource collection API of PrivateEndpointConnections. * @@ -562,6 +683,18 @@ public SystemTopics systemTopics() { return systemTopics; } + /** + * Gets the resource collection API of Topics. It manages Topic. + * + * @return Resource collection API of Topics. + */ + public Topics topics() { + if (this.topics == null) { + this.topics = new TopicsImpl(clientObject.getTopics(), this); + } + return topics; + } + /** * Gets the resource collection API of ExtensionTopics. * @@ -574,6 +707,18 @@ public ExtensionTopics extensionTopics() { return extensionTopics; } + /** + * Gets the resource collection API of TopicSpaces. It manages TopicSpace. + * + * @return Resource collection API of TopicSpaces. + */ + public TopicSpaces topicSpaces() { + if (this.topicSpaces == null) { + this.topicSpaces = new TopicSpacesImpl(clientObject.getTopicSpaces(), this); + } + return topicSpaces; + } + /** * Gets the resource collection API of TopicTypes. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/CaCertificatesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/CaCertificatesClient.java new file mode 100644 index 000000000000..743effcf314c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/CaCertificatesClient.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateInner; + +/** An instance of this class provides access to all the operations defined in CaCertificatesClient. */ +public interface CaCertificatesClient { + /** + * Get a CA certificate. + * + *

Get properties of a CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 properties of a CA certificate along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String namespaceName, String caCertificateName, Context context); + + /** + * Get a CA certificate. + * + *

Get properties of a CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 properties of a CA certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CaCertificateInner get(String resourceGroupName, String namespaceName, String caCertificateName); + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @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 {@link SyncPoller} for polling of the CA Certificate resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CaCertificateInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, String caCertificateName, CaCertificateInner caCertificateInfo); + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @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 the {@link SyncPoller} for polling of the CA Certificate resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CaCertificateInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo, + Context context); + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @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 CA Certificate resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CaCertificateInner createOrUpdate( + String resourceGroupName, String namespaceName, String caCertificateName, CaCertificateInner caCertificateInfo); + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @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 the CA Certificate resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CaCertificateInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo, + Context context); + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String caCertificateName); + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String caCertificateName, Context context); + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String caCertificateName); + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String caCertificateName, Context context); + + /** + * List all CA certificates under a namespace. + * + *

Get all the CA certificates under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List all CA certificates under a namespace. + * + *

Get all the CA certificates under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ChannelsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ChannelsClient.java index cf636fda7bce..c2830b3f319b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ChannelsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ChannelsClient.java @@ -18,21 +18,9 @@ /** An instance of this class provides access to all the operations defined in ChannelsClient. */ public interface ChannelsClient { /** - * Get properties of a channel. + * Get a channel. * - * @param resourceGroupName The name of the resource group within the partners subscription. - * @param partnerNamespaceName Name of the partner namespace. - * @param channelName Name of the channel. - * @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 properties of a channel. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ChannelInner get(String resourceGroupName, String partnerNamespaceName, String channelName); - - /** - * Get properties of a channel. + *

Get properties of a channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -48,23 +36,25 @@ Response getWithResponse( String resourceGroupName, String partnerNamespaceName, String channelName, Context context); /** - * Synchronously creates or updates a new channel with the specified parameters. + * Get a channel. + * + *

Get properties of a channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. - * @param channelInfo Channel information. * @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 channel info. + * @return properties of a channel. */ @ServiceMethod(returns = ReturnType.SINGLE) - ChannelInner createOrUpdate( - String resourceGroupName, String partnerNamespaceName, String channelName, ChannelInner channelInfo); + ChannelInner get(String resourceGroupName, String partnerNamespaceName, String channelName); /** - * Synchronously creates or updates a new channel with the specified parameters. + * Create or update a channel. + * + *

Synchronously creates or updates a new channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -85,7 +75,27 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete an existing channel. + * Create or update a channel. + * + *

Synchronously creates or updates a new channel with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the partners subscription. + * @param partnerNamespaceName Name of the partner namespace. + * @param channelName Name of the channel. + * @param channelInfo Channel information. + * @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 channel info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ChannelInner createOrUpdate( + String resourceGroupName, String partnerNamespaceName, String channelName, ChannelInner channelInfo); + + /** + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -100,7 +110,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String partnerNamespaceName, String channelName); /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -116,7 +128,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String partnerNamespaceName, String channelName, Context context); /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -129,7 +143,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String partnerNamespaceName, String channelName); /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -143,46 +159,52 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String partnerNamespaceName, String channelName, Context context); /** - * Synchronously updates a channel with the specified parameters. + * Update a Channel. + * + *

Synchronously updates a channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelUpdateParameters Channel update information. + * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update( + Response updateWithResponse( String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters); + ChannelUpdateParameters channelUpdateParameters, + Context context); /** - * Synchronously updates a channel with the specified parameters. + * Update a Channel. + * + *

Synchronously updates a channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelUpdateParameters Channel update information. - * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + void update( String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters, - Context context); + ChannelUpdateParameters channelUpdateParameters); /** - * List all the channels in a partner namespace. + * List channels. + * + *

List all the channels in a partner namespace. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -195,7 +217,9 @@ Response updateWithResponse( PagedIterable listByPartnerNamespace(String resourceGroupName, String partnerNamespaceName); /** - * List all the channels in a partner namespace. + * List channels. + * + *

List all the channels in a partner namespace. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -218,32 +242,36 @@ PagedIterable listByPartnerNamespace( String resourceGroupName, String partnerNamespaceName, String filter, Integer top, Context context); /** - * Get the full endpoint URL of a partner destination channel. + * Get full URL of partner destination channel. + * + *

Get the full endpoint URL of a partner destination channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the Channel. + * @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 the full endpoint URL of a partner destination channel. + * @return the full endpoint URL of a partner destination channel along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partnerNamespaceName, String channelName); + Response getFullUrlWithResponse( + String resourceGroupName, String partnerNamespaceName, String channelName, Context context); /** - * Get the full endpoint URL of a partner destination channel. + * Get full URL of partner destination channel. + * + *

Get the full endpoint URL of a partner destination channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the Channel. - * @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 the full endpoint URL of a partner destination channel along with {@link Response}. + * @return the full endpoint URL of a partner destination channel. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse( - String resourceGroupName, String partnerNamespaceName, String channelName, Context context); + EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String partnerNamespaceName, String channelName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientGroupsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientGroupsClient.java new file mode 100644 index 000000000000..40660886a0f1 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientGroupsClient.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner; + +/** An instance of this class provides access to all the operations defined in ClientGroupsClient. */ +public interface ClientGroupsClient { + /** + * Get a client group. + * + *

Get properties of a client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 properties of a client group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String namespaceName, String clientGroupName, Context context); + + /** + * Get a client group. + * + *

Get properties of a client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 properties of a client group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClientGroupInner get(String resourceGroupName, String namespaceName, String clientGroupName); + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @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 {@link SyncPoller} for polling of the Client group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClientGroupInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo); + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @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 the {@link SyncPoller} for polling of the Client group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClientGroupInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String clientGroupName, + ClientGroupInner clientGroupInfo, + Context context); + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @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 Client group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClientGroupInner createOrUpdate( + String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo); + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @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 the Client group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClientGroupInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String clientGroupName, + ClientGroupInner clientGroupInfo, + Context context); + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String clientGroupName); + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String clientGroupName, Context context); + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String clientGroupName); + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String clientGroupName, Context context); + + /** + * List all client groups under a namespace. + * + *

Get all the client groups under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the client groups under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List all client groups under a namespace. + * + *

Get all the client groups under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the client groups under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientsClient.java new file mode 100644 index 000000000000..8cf5a7612202 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ClientsClient.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientInner; + +/** An instance of this class provides access to all the operations defined in ClientsClient. */ +public interface ClientsClient { + /** + * Get a client. + * + *

Get properties of a client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 properties of a client along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String namespaceName, String clientName, Context context); + + /** + * Get a client. + * + *

Get properties of a client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 properties of a client. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClientInner get(String resourceGroupName, String namespaceName, String clientName); + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @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 {@link SyncPoller} for polling of the Client resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClientInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo); + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @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 the {@link SyncPoller} for polling of the Client resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClientInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo, Context context); + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @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 Client resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClientInner createOrUpdate( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo); + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @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 the Client resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClientInner createOrUpdate( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo, Context context); + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String clientName); + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String clientName, Context context); + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String clientName); + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String clientName, Context context); + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainEventSubscriptionsClient.java index f2fa0713e5e9..4def449abd28 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainEventSubscriptionsClient.java @@ -19,70 +19,80 @@ /** An instance of this class provides access to all the operations defined in DomainEventSubscriptionsClient. */ public interface DomainEventSubscriptionsClient { /** - * Get all delivery attributes for an event subscription for domain. + * Get delivery attributes for an event subscription for domain. + * + *

Get all delivery attributes for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription for domain. + * @return all delivery attributes for an event subscription for domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes( - String resourceGroupName, String domainName, String eventSubscriptionName); + Response getDeliveryAttributesWithResponse( + String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** - * Get all delivery attributes for an event subscription for domain. + * Get delivery attributes for an event subscription for domain. + * + *

Get all delivery attributes for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription for domain along with {@link Response}. + * @return all delivery attributes for an event subscription for domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse( - String resourceGroupName, String domainName, String eventSubscriptionName, Context context); + DeliveryAttributeListResultInner getDeliveryAttributes( + String resourceGroupName, String domainName, String eventSubscriptionName); /** - * Get properties of an event subscription of a domain. + * Get an event subscription of a domain. + * + *

Get properties of an event subscription of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the partner topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a domain. + * @return properties of an event subscription of a domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionInner get(String resourceGroupName, String domainName, String eventSubscriptionName); + Response getWithResponse( + String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** - * Get properties of an event subscription of a domain. + * Get an event subscription of a domain. + * + *

Get properties of an event subscription of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the partner topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. - * @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 properties of an event subscription of a domain along with {@link Response}. + * @return properties of an event subscription of a domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String domainName, String eventSubscriptionName, Context context); + EventSubscriptionInner get(String resourceGroupName, String domainName, String eventSubscriptionName); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -102,7 +112,9 @@ SyncPoller, EventSubscriptionInner> beginCrea EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -124,7 +136,9 @@ SyncPoller, EventSubscriptionInner> beginCrea Context context); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -144,7 +158,9 @@ EventSubscriptionInner createOrUpdate( EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -166,7 +182,9 @@ EventSubscriptionInner createOrUpdate( Context context); /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -182,7 +200,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, String eventSubscriptionName); /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -199,7 +219,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -213,7 +235,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String domainName, String eventSubscriptionName); /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -228,7 +252,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -247,7 +273,9 @@ SyncPoller, EventSubscriptionInner> beginUpda EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -268,7 +296,9 @@ SyncPoller, EventSubscriptionInner> beginUpda Context context); /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -287,7 +317,9 @@ EventSubscriptionInner update( EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -308,37 +340,43 @@ EventSubscriptionInner update( Context context); /** - * Get the full endpoint URL for an event subscription for domain. + * Get full URL of an event subscription for domain. + * + *

Get the full endpoint URL for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. + * @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 the full endpoint URL for an event subscription for domain. + * @return the full endpoint URL for an event subscription for domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, String eventSubscriptionName); + Response getFullUrlWithResponse( + String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for an event subscription for domain. + * Get full URL of an event subscription for domain. + * + *

Get the full endpoint URL for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. - * @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 the full endpoint URL for an event subscription for domain along with {@link Response}. + * @return the full endpoint URL for an event subscription for domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse( - String resourceGroupName, String domainName, String eventSubscriptionName, Context context); + EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String domainName, String eventSubscriptionName); /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific domain. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -351,7 +389,9 @@ Response getFullUrlWithResponse( PagedIterable list(String resourceGroupName, String domainName); /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific domain. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java index 22ed96214abf..2154e9b8a074 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicEventSubscriptionsClient.java @@ -19,23 +19,46 @@ /** An instance of this class provides access to all the operations defined in DomainTopicEventSubscriptionsClient. */ public interface DomainTopicEventSubscriptionsClient { /** - * Get properties of a nested event subscription for a domain topic. + * Get delivery attributes for an event subscription for domain topic. + * + *

Get all delivery attributes for an event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. + * @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 properties of a nested event subscription for a domain topic. + * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionInner get( + Response getDeliveryAttributesWithResponse( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription for domain topic. + * + *

Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription for domain topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeliveryAttributeListResultInner getDeliveryAttributes( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); /** - * Get properties of a nested event subscription for a domain topic. + * Get a nested event subscription for domain topic. + * + *

Get properties of a nested event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -52,7 +75,27 @@ Response getWithResponse( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Get a nested event subscription for domain topic. + * + *

Get properties of a nested event subscription for a domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 properties of a nested event subscription for a domain topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EventSubscriptionInner get( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); + + /** + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -74,7 +117,9 @@ SyncPoller, EventSubscriptionInner> beginCrea EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -98,7 +143,9 @@ SyncPoller, EventSubscriptionInner> beginCrea Context context); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -120,7 +167,9 @@ EventSubscriptionInner createOrUpdate( EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -144,7 +193,9 @@ EventSubscriptionInner createOrUpdate( Context context); /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -161,7 +212,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -179,7 +232,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -194,7 +249,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -211,7 +268,9 @@ void delete( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -232,7 +291,9 @@ SyncPoller, EventSubscriptionInner> beginUpda EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -255,7 +316,9 @@ SyncPoller, EventSubscriptionInner> beginUpda Context context); /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -276,7 +339,9 @@ EventSubscriptionInner update( EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -299,40 +364,46 @@ EventSubscriptionInner update( Context context); /** - * Get the full endpoint URL for a nested event subscription for domain topic. + * Get full URL of a nested event subscription for domain topic. + * + *

Get the full endpoint URL for a nested event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. + * @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 the full endpoint URL for a nested event subscription for domain topic. + * @return the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); + Response getFullUrlWithResponse( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for a nested event subscription for domain topic. + * Get full URL of a nested event subscription for domain topic. + * + *

Get the full endpoint URL for a nested event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. - * @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 the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. + * @return the full endpoint URL for a nested event subscription for domain topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); + EventSubscriptionFullUrlInner getFullUrl( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); /** - * List all event subscriptions that have been created for a specific domain topic. + * List all nested event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -346,7 +417,9 @@ Response getFullUrlWithResponse( PagedIterable list(String resourceGroupName, String domainName, String topicName); /** - * List all event subscriptions that have been created for a specific domain topic. + * List all nested event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -368,37 +441,4 @@ Response getFullUrlWithResponse( @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( String resourceGroupName, String domainName, String topicName, String filter, Integer top, Context context); - - /** - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription for domain topic. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); - - /** - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription for domain topic along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicsClient.java index c6625686bb81..f016c2c71785 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainTopicsClient.java @@ -16,37 +16,43 @@ /** An instance of this class provides access to all the operations defined in DomainTopicsClient. */ public interface DomainTopicsClient { /** - * Get properties of a domain topic. + * Get a domain topic. + * + *

Get properties of a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. + * @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 properties of a domain topic. + * @return properties of a domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DomainTopicInner get(String resourceGroupName, String domainName, String domainTopicName); + Response getWithResponse( + String resourceGroupName, String domainName, String domainTopicName, Context context); /** - * Get properties of a domain topic. + * Get a domain topic. + * + *

Get properties of a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. - * @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 properties of a domain topic along with {@link Response}. + * @return properties of a domain topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String domainName, String domainTopicName, Context context); + DomainTopicInner get(String resourceGroupName, String domainName, String domainTopicName); /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -61,7 +67,9 @@ SyncPoller, DomainTopicInner> beginCreateOrUpdate( String resourceGroupName, String domainName, String domainTopicName); /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -77,7 +85,9 @@ SyncPoller, DomainTopicInner> beginCreateOrUpdate( String resourceGroupName, String domainName, String domainTopicName, Context context); /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -91,7 +101,9 @@ SyncPoller, DomainTopicInner> beginCreateOrUpdate( DomainTopicInner createOrUpdate(String resourceGroupName, String domainName, String domainTopicName); /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -107,7 +119,9 @@ DomainTopicInner createOrUpdate( String resourceGroupName, String domainName, String domainTopicName, Context context); /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -121,7 +135,9 @@ DomainTopicInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, String domainTopicName); /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -137,7 +153,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, String domainTopicName, Context context); /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -150,7 +168,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String domainName, String domainTopicName); /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -164,7 +184,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String domainName, String domainTopicName, Context context); /** - * List all the topics in a domain. + * List domain topics. + * + *

List all the topics in a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Domain name. @@ -177,7 +199,9 @@ SyncPoller, Void> beginDelete( PagedIterable listByDomain(String resourceGroupName, String domainName); /** - * List all the topics in a domain. + * List domain topics. + * + *

List all the topics in a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Domain name. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainsClient.java index 12abdb9e3f26..c10bc74b0a90 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/DomainsClient.java @@ -19,34 +19,40 @@ /** An instance of this class provides access to all the operations defined in DomainsClient. */ public interface DomainsClient { /** - * Get properties of a domain. + * Get a domain. + * + *

Get properties of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. + * @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 properties of a domain. + * @return properties of a domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DomainInner getByResourceGroup(String resourceGroupName, String domainName); + Response getByResourceGroupWithResponse(String resourceGroupName, String domainName, Context context); /** - * Get properties of a domain. + * Get a domain. + * + *

Get properties of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. - * @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 properties of a domain along with {@link Response}. + * @return properties of a domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String domainName, Context context); + DomainInner getByResourceGroup(String resourceGroupName, String domainName); /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -61,7 +67,9 @@ SyncPoller, DomainInner> beginCreateOrUpdate( String resourceGroupName, String domainName, DomainInner domainInfo); /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -77,7 +85,9 @@ SyncPoller, DomainInner> beginCreateOrUpdate( String resourceGroupName, String domainName, DomainInner domainInfo, Context context); /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -91,7 +101,9 @@ SyncPoller, DomainInner> beginCreateOrUpdate( DomainInner createOrUpdate(String resourceGroupName, String domainName, DomainInner domainInfo); /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -106,7 +118,9 @@ SyncPoller, DomainInner> beginCreateOrUpdate( DomainInner createOrUpdate(String resourceGroupName, String domainName, DomainInner domainInfo, Context context); /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -119,7 +133,9 @@ SyncPoller, DomainInner> beginCreateOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String domainName); /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -133,7 +149,9 @@ SyncPoller, DomainInner> beginCreateOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String domainName, Context context); /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -145,7 +163,9 @@ SyncPoller, DomainInner> beginCreateOrUpdate( void delete(String resourceGroupName, String domainName); /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -158,7 +178,9 @@ SyncPoller, DomainInner> beginCreateOrUpdate( void delete(String resourceGroupName, String domainName, Context context); /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -173,7 +195,9 @@ SyncPoller, DomainInner> beginUpdate( String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters); /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -189,7 +213,9 @@ SyncPoller, DomainInner> beginUpdate( String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters, Context context); /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -203,7 +229,9 @@ SyncPoller, DomainInner> beginUpdate( DomainInner update(String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters); /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -219,7 +247,9 @@ DomainInner update( String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters, Context context); /** - * List all the domains under an Azure subscription. + * List domains under an Azure subscription. + * + *

List all the domains under an Azure subscription. * * @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. @@ -229,7 +259,9 @@ DomainInner update( PagedIterable list(); /** - * List all the domains under an Azure subscription. + * List domains under an Azure subscription. + * + *

List all the domains under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -249,7 +281,9 @@ DomainInner update( PagedIterable list(String filter, Integer top, Context context); /** - * List all the domains under a resource group. + * List domains under a resource group. + * + *

List all the domains under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -261,7 +295,9 @@ DomainInner update( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the domains under a resource group. + * List domains under a resource group. + * + *

List all the domains under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -283,61 +319,69 @@ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, Context context); /** - * List the two keys used to publish to a domain. + * List keys for a domain. + * + *

List the two keys used to publish to a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. + * @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 shared access keys of the Domain. + * @return shared access keys of the Domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DomainSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String domainName); + Response listSharedAccessKeysWithResponse( + String resourceGroupName, String domainName, Context context); /** - * List the two keys used to publish to a domain. + * List keys for a domain. + * + *

List the two keys used to publish to a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. - * @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 shared access keys of the Domain along with {@link Response}. + * @return shared access keys of the Domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listSharedAccessKeysWithResponse( - String resourceGroupName, String domainName, Context context); + DomainSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String domainName); /** - * Regenerate a shared access key for a domain. + * Regenerate key for a domain. + * + *

Regenerate a shared access key for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Domain. + * @return shared access keys of the Domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DomainSharedAccessKeysInner regenerateKey( - String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest); + Response regenerateKeyWithResponse( + String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest, Context context); /** - * Regenerate a shared access key for a domain. + * Regenerate key for a domain. + * + *

Regenerate a shared access key for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. - * @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 shared access keys of the Domain along with {@link Response}. + * @return shared access keys of the Domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response regenerateKeyWithResponse( - String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest, Context context); + DomainSharedAccessKeysInner regenerateKey( + String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java index d1bb996ae3ad..2dc59046d79c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventGridManagementClient.java @@ -45,6 +45,13 @@ public interface EventGridManagementClient { */ Duration getDefaultPollInterval(); + /** + * Gets the CaCertificatesClient object to access its operations. + * + * @return the CaCertificatesClient object. + */ + CaCertificatesClient getCaCertificates(); + /** * Gets the ChannelsClient object to access its operations. * @@ -52,6 +59,20 @@ public interface EventGridManagementClient { */ ChannelsClient getChannels(); + /** + * Gets the ClientGroupsClient object to access its operations. + * + * @return the ClientGroupsClient object. + */ + ClientGroupsClient getClientGroups(); + + /** + * Gets the ClientsClient object to access its operations. + * + * @return the ClientsClient object. + */ + ClientsClient getClients(); + /** * Gets the DomainsClient object to access its operations. * @@ -66,6 +87,13 @@ public interface EventGridManagementClient { */ DomainTopicsClient getDomainTopics(); + /** + * Gets the DomainTopicEventSubscriptionsClient object to access its operations. + * + * @return the DomainTopicEventSubscriptionsClient object. + */ + DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions(); + /** * Gets the TopicEventSubscriptionsClient object to access its operations. * @@ -88,18 +116,18 @@ public interface EventGridManagementClient { EventSubscriptionsClient getEventSubscriptions(); /** - * Gets the DomainTopicEventSubscriptionsClient object to access its operations. + * Gets the SystemTopicEventSubscriptionsClient object to access its operations. * - * @return the DomainTopicEventSubscriptionsClient object. + * @return the SystemTopicEventSubscriptionsClient object. */ - DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions(); + SystemTopicEventSubscriptionsClient getSystemTopicEventSubscriptions(); /** - * Gets the SystemTopicEventSubscriptionsClient object to access its operations. + * Gets the NamespaceTopicEventSubscriptionsClient object to access its operations. * - * @return the SystemTopicEventSubscriptionsClient object. + * @return the NamespaceTopicEventSubscriptionsClient object. */ - SystemTopicEventSubscriptionsClient getSystemTopicEventSubscriptions(); + NamespaceTopicEventSubscriptionsClient getNamespaceTopicEventSubscriptions(); /** * Gets the PartnerTopicEventSubscriptionsClient object to access its operations. @@ -109,18 +137,25 @@ public interface EventGridManagementClient { PartnerTopicEventSubscriptionsClient getPartnerTopicEventSubscriptions(); /** - * Gets the OperationsClient object to access its operations. + * Gets the NamespacesClient object to access its operations. * - * @return the OperationsClient object. + * @return the NamespacesClient object. */ - OperationsClient getOperations(); + NamespacesClient getNamespaces(); /** - * Gets the TopicsClient object to access its operations. + * Gets the NamespaceTopicsClient object to access its operations. * - * @return the TopicsClient object. + * @return the NamespaceTopicsClient object. */ - TopicsClient getTopics(); + NamespaceTopicsClient getNamespaceTopics(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); /** * Gets the PartnerConfigurationsClient object to access its operations. @@ -129,6 +164,13 @@ public interface EventGridManagementClient { */ PartnerConfigurationsClient getPartnerConfigurations(); + /** + * Gets the PartnerDestinationsClient object to access its operations. + * + * @return the PartnerDestinationsClient object. + */ + PartnerDestinationsClient getPartnerDestinations(); + /** * Gets the PartnerNamespacesClient object to access its operations. * @@ -150,6 +192,13 @@ public interface EventGridManagementClient { */ PartnerTopicsClient getPartnerTopics(); + /** + * Gets the PermissionBindingsClient object to access its operations. + * + * @return the PermissionBindingsClient object. + */ + PermissionBindingsClient getPermissionBindings(); + /** * Gets the PrivateEndpointConnectionsClient object to access its operations. * @@ -171,6 +220,13 @@ public interface EventGridManagementClient { */ SystemTopicsClient getSystemTopics(); + /** + * Gets the TopicsClient object to access its operations. + * + * @return the TopicsClient object. + */ + TopicsClient getTopics(); + /** * Gets the ExtensionTopicsClient object to access its operations. * @@ -178,6 +234,13 @@ public interface EventGridManagementClient { */ ExtensionTopicsClient getExtensionTopics(); + /** + * Gets the TopicSpacesClient object to access its operations. + * + * @return the TopicSpacesClient object. + */ + TopicSpacesClient getTopicSpaces(); + /** * Gets the TopicTypesClient object to access its operations. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java index fd29a6bdf528..e914dbaa7bd6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/EventSubscriptionsClient.java @@ -19,7 +19,9 @@ /** An instance of this class provides access to all the operations defined in EventSubscriptionsClient. */ public interface EventSubscriptionsClient { /** - * Get properties of an event subscription. + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -30,16 +32,42 @@ public interface EventSubscriptionsClient { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * @param eventSubscriptionName Name of the event subscription. + * @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 properties of an event subscription. + * @return all delivery attributes for an event subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionInner get(String scope, String eventSubscriptionName); + Response getDeliveryAttributesWithResponse( + String scope, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName); /** - * Get properties of an event subscription. + * Get an event subscription. + * + *

Get properties of an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -60,8 +88,32 @@ public interface EventSubscriptionsClient { Response getWithResponse(String scope, String eventSubscriptionName, Context context); /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Get an event subscription. + * + *

Get properties of an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 properties of an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EventSubscriptionInner get(String scope, String eventSubscriptionName); + + /** + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -84,8 +136,10 @@ SyncPoller, EventSubscriptionInner> beginCrea String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -109,8 +163,10 @@ SyncPoller, EventSubscriptionInner> beginCrea String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -133,8 +189,10 @@ EventSubscriptionInner createOrUpdate( String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -158,7 +216,9 @@ EventSubscriptionInner createOrUpdate( String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -178,7 +238,9 @@ EventSubscriptionInner createOrUpdate( SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName); /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -199,7 +261,9 @@ EventSubscriptionInner createOrUpdate( SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName, Context context); /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -218,7 +282,9 @@ EventSubscriptionInner createOrUpdate( void delete(String scope, String eventSubscriptionName); /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -238,7 +304,9 @@ EventSubscriptionInner createOrUpdate( void delete(String scope, String eventSubscriptionName, Context context); /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -262,7 +330,9 @@ SyncPoller, EventSubscriptionInner> beginUpda EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -288,7 +358,9 @@ SyncPoller, EventSubscriptionInner> beginUpda Context context); /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -312,7 +384,9 @@ EventSubscriptionInner update( EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -338,7 +412,9 @@ EventSubscriptionInner update( Context context); /** - * Get the full endpoint URL for an event subscription. + * Get full URL of an event subscription. + * + *

Get the full endpoint URL for an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -349,16 +425,20 @@ EventSubscriptionInner update( * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * @param eventSubscriptionName Name of the event subscription. + * @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 the full endpoint URL for an event subscription. + * @return the full endpoint URL for an event subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName); + Response getFullUrlWithResponse( + String scope, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for an event subscription. + * Get full URL of an event subscription. + * + *

Get the full endpoint URL for an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -369,18 +449,18 @@ EventSubscriptionInner update( * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * @param eventSubscriptionName Name of the event subscription. - * @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 the full endpoint URL for an event subscription along with {@link Response}. + * @return the full endpoint URL for an event subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse( - String scope, String eventSubscriptionName, Context context); + EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName); /** - * List all aggregated global event subscriptions under a specific Azure subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * + *

List all aggregated global event subscriptions under a specific Azure subscription. * * @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. @@ -390,7 +470,9 @@ Response getFullUrlWithResponse( PagedIterable list(); /** - * List all aggregated global event subscriptions under a specific Azure subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * + *

List all aggregated global event subscriptions under a specific Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -410,7 +492,9 @@ Response getFullUrlWithResponse( PagedIterable list(String filter, Integer top, Context context); /** - * List all global event subscriptions under an Azure subscription for a topic type. + * List all global event subscriptions for a topic type. + * + *

List all global event subscriptions under an Azure subscription for a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -422,7 +506,9 @@ Response getFullUrlWithResponse( PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName); /** - * List all global event subscriptions under an Azure subscription for a topic type. + * List all global event subscriptions for a topic type. + * + *

List all global event subscriptions under an Azure subscription for a topic type. * * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -444,7 +530,9 @@ PagedIterable listGlobalBySubscriptionForTopicType( String topicTypeName, String filter, Integer top, Context context); /** - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription and resource group. + * + *

List all global event subscriptions under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -456,7 +544,9 @@ PagedIterable listGlobalBySubscriptionForTopicType( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription and resource group. + * + *

List all global event subscriptions under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -478,7 +568,9 @@ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, Context context); /** - * List all global event subscriptions under a resource group for a specific topic type. + * List all global event subscriptions under a resource group for a topic type. + * + *

List all global event subscriptions under a resource group for a specific topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicTypeName Name of the topic type. @@ -492,7 +584,9 @@ PagedIterable listGlobalByResourceGroupForTopicType( String resourceGroupName, String topicTypeName); /** - * List all global event subscriptions under a resource group for a specific topic type. + * List all global event subscriptions under a resource group for a topic type. + * + *

List all global event subscriptions under a resource group for a specific topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicTypeName Name of the topic type. @@ -515,7 +609,9 @@ PagedIterable listGlobalByResourceGroupForTopicType( String resourceGroupName, String topicTypeName, String filter, Integer top, Context context); /** - * List all event subscriptions from the given location under a specific Azure subscription. + * List all regional event subscriptions under an Azure subscription. + * + *

List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -527,7 +623,9 @@ PagedIterable listGlobalByResourceGroupForTopicType( PagedIterable listRegionalBySubscription(String location); /** - * List all event subscriptions from the given location under a specific Azure subscription. + * List all regional event subscriptions under an Azure subscription. + * + *

List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -549,7 +647,9 @@ PagedIterable listRegionalBySubscription( String location, String filter, Integer top, Context context); /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all regional event subscriptions under an Azure subscription and resource group. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -562,7 +662,9 @@ PagedIterable listRegionalBySubscription( PagedIterable listRegionalByResourceGroup(String resourceGroupName, String location); /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all regional event subscriptions under an Azure subscription and resource group. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -585,7 +687,9 @@ PagedIterable listRegionalByResourceGroup( String resourceGroupName, String location, String filter, Integer top, Context context); /** - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all regional event subscriptions under an Azure subscription for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and topic type. * * @param location Name of the location. * @param topicTypeName Name of the topic type. @@ -598,7 +702,9 @@ PagedIterable listRegionalByResourceGroup( PagedIterable listRegionalBySubscriptionForTopicType(String location, String topicTypeName); /** - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all regional event subscriptions under an Azure subscription for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and topic type. * * @param location Name of the location. * @param topicTypeName Name of the topic type. @@ -621,8 +727,10 @@ PagedIterable listRegionalBySubscriptionForTopicType( String location, String topicTypeName, String filter, Integer top, Context context); /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group + * and topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -637,8 +745,10 @@ PagedIterable listRegionalByResourceGroupForTopicType( String resourceGroupName, String location, String topicTypeName); /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group + * and topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -662,7 +772,9 @@ PagedIterable listRegionalByResourceGroupForTopicType( String resourceGroupName, String location, String topicTypeName, String filter, Integer top, Context context); /** - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions. + * + *

List all event subscriptions that have been created for a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -678,7 +790,9 @@ PagedIterable listByResource( String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName); /** - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions. + * + *

List all event subscriptions that have been created for a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -709,7 +823,9 @@ PagedIterable listByResource( Context context); /** - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -724,7 +840,9 @@ PagedIterable listByDomainTopic( String resourceGroupName, String domainName, String topicName); /** - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -746,46 +864,4 @@ PagedIterable listByDomainTopic( @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByDomainTopic( String resourceGroupName, String domainName, String topicName, String filter, Integer top, Context context); - - /** - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName); - - /** - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse( - String scope, String eventSubscriptionName, Context context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ExtensionTopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ExtensionTopicsClient.java index 9f8605ecb3b6..7adb73a9176c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ExtensionTopicsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/ExtensionTopicsClient.java @@ -13,7 +13,9 @@ /** An instance of this class provides access to all the operations defined in ExtensionTopicsClient. */ public interface ExtensionTopicsClient { /** - * Get the properties of an extension topic. + * Get properties of an extension topic. + * + *

Get the properties of an extension topic. * * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use @@ -21,16 +23,19 @@ public interface ExtensionTopicsClient { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' * for Azure resource. + * @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 the properties of an extension topic. + * @return the properties of an extension topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExtensionTopicInner get(String scope); + Response getWithResponse(String scope, Context context); /** - * Get the properties of an extension topic. + * Get properties of an extension topic. + * + *

Get the properties of an extension topic. * * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use @@ -38,12 +43,11 @@ public interface ExtensionTopicsClient { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' * for Azure resource. - * @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 the properties of an extension topic along with {@link Response}. + * @return the properties of an extension topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String scope, Context context); + ExtensionTopicInner get(String scope); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicEventSubscriptionsClient.java new file mode 100644 index 000000000000..143b99ed1fd1 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicEventSubscriptionsClient.java @@ -0,0 +1,397 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner; +import com.azure.resourcemanager.eventgrid.models.SubscriptionUpdateParameters; + +/** + * An instance of this class provides access to all the operations defined in NamespaceTopicEventSubscriptionsClient. + */ +public interface NamespaceTopicEventSubscriptionsClient { + /** + * Get an event subscription of a namespace topic. + * + *

Get properties of an event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a namespace topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context); + + /** + * Get an event subscription of a namespace topic. + * + *

Get properties of an event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a namespace topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SubscriptionInner get( + String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName); + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @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 {@link SyncPoller} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo); + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @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 the {@link SyncPoller} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo, + Context context); + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @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 event Subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SubscriptionInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo); + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @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 event Subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SubscriptionInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo, + Context context); + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName); + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context); + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName); + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context); + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @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 {@link SyncPoller} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SubscriptionInner> beginUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters); + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @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 the {@link SyncPoller} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SubscriptionInner> beginUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @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 event Subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SubscriptionInner update( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters); + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @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 event Subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SubscriptionInner update( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); + + /** + * List event subscriptions of a namespace topic. + * + *

List event subscriptions that belong to a specific namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @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 result of the List event subscriptions operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespaceTopic( + String resourceGroupName, String namespaceName, String topicName); + + /** + * List event subscriptions of a namespace topic. + * + *

List event subscriptions that belong to a specific namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List event subscriptions operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespaceTopic( + String resourceGroupName, String namespaceName, String topicName, String filter, Integer top, Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicsClient.java new file mode 100644 index 000000000000..484dbb713949 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespaceTopicsClient.java @@ -0,0 +1,451 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner; +import com.azure.resourcemanager.eventgrid.fluent.models.TopicSharedAccessKeysInner; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopicUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; + +/** An instance of this class provides access to all the operations defined in NamespaceTopicsClient. */ +public interface NamespaceTopicsClient { + /** + * Get a namespace topic. + * + *

Get properties of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @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 properties of a namespace topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String namespaceName, String topicName, Context context); + + /** + * Get a namespace topic. + * + *

Get properties of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @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 properties of a namespace topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceTopicInner get(String resourceGroupName, String namespaceName, String topicName); + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @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 {@link SyncPoller} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NamespaceTopicInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo); + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @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 the {@link SyncPoller} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NamespaceTopicInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicInner namespaceTopicInfo, + Context context); + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @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 namespace topic details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceTopicInner createOrUpdate( + String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo); + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @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 namespace topic details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceTopicInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicInner namespaceTopicInfo, + Context context); + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, String topicName); + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String topicName, Context context); + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String topicName); + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String topicName, Context context); + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @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 {@link SyncPoller} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NamespaceTopicInner> beginUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters); + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @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 the {@link SyncPoller} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NamespaceTopicInner> beginUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, + Context context); + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @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 namespace topic details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceTopicInner update( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters); + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @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 namespace topic details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceTopicInner update( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, + Context context); + + /** + * List namespace topics under a namespace. + * + *

List all the namespace topics under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 result of the List namespace topics operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List namespace topics under a namespace. + * + *

List all the namespace topics under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List namespace topics operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); + + /** + * List keys for a namespace topic. + * + *

List the two keys used to publish to a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 shared access keys of the Topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSharedAccessKeysWithResponse( + String resourceGroupName, String namespaceName, String topicName, Context context); + + /** + * List keys for a namespace topic. + * + *

List the two keys used to publish to a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String namespaceName, String topicName); + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 {@link SyncPoller} for polling of shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TopicSharedAccessKeysInner> beginRegenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest); + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 the {@link SyncPoller} for polling of shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TopicSharedAccessKeysInner> beginRegenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest, + Context context); + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TopicSharedAccessKeysInner regenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest); + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TopicSharedAccessKeysInner regenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest, + Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespacesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespacesClient.java new file mode 100644 index 000000000000..eb2a35e71efb --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/NamespacesClient.java @@ -0,0 +1,437 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceSharedAccessKeysInner; +import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; +import com.azure.resourcemanager.eventgrid.models.NamespaceUpdateParameters; + +/** An instance of this class provides access to all the operations defined in NamespacesClient. */ +public interface NamespacesClient { + /** + * Get a namespace. + * + *

Get properties of a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 properties of a namespace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String namespaceName, Context context); + + /** + * Get a namespace. + * + *

Get properties of a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 properties of a namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName); + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @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 {@link SyncPoller} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo); + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @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 the {@link SyncPoller} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo, Context context); + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @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 namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo); + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @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 namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceInner createOrUpdate( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo, Context context); + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName); + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, Context context); + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName); + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, Context context); + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @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 {@link SyncPoller} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NamespaceInner> beginUpdate( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters); + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @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 the {@link SyncPoller} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NamespaceInner> beginUpdate( + String resourceGroupName, + String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters, + Context context); + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @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 namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceInner update( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters); + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @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 namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceInner update( + String resourceGroupName, + String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters, + Context context); + + /** + * List namespaces under an Azure subscription. + * + *

List all the namespaces under an Azure subscription. + * + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List namespaces under an Azure subscription. + * + *

List all the namespaces under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String filter, Integer top, Context context); + + /** + * List namespaces under a resource group. + * + *

List all the namespaces under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List namespaces under a resource group. + * + *

List all the namespaces under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup( + String resourceGroupName, String filter, Integer top, Context context); + + /** + * List keys for a namespace. + * + *

List the two keys used to publish to a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 shared access keys of the Namespace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSharedAccessKeysWithResponse( + String resourceGroupName, String namespaceName, Context context); + + /** + * List keys for a namespace. + * + *

List the two keys used to publish to a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String namespaceName); + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 {@link SyncPoller} for polling of shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NamespaceSharedAccessKeysInner> beginRegenerateKey( + String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest); + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 the {@link SyncPoller} for polling of shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NamespaceSharedAccessKeysInner> beginRegenerateKey( + String resourceGroupName, + String namespaceName, + NamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context); + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceSharedAccessKeysInner regenerateKey( + String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest); + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NamespaceSharedAccessKeysInner regenerateKey( + String resourceGroupName, + String namespaceName, + NamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/OperationsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/OperationsClient.java index 6f3f3c3350b7..f491e20d4c67 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/OperationsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/OperationsClient.java @@ -13,7 +13,9 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { /** - * List the available operations supported by the Microsoft.EventGrid resource provider. + * List available operations. + * + *

List the available operations supported by the Microsoft.EventGrid resource provider. * * @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. @@ -23,7 +25,9 @@ public interface OperationsClient { PagedIterable list(); /** - * List the available operations supported by the Microsoft.EventGrid resource provider. + * List available operations. + * + *

List the available operations supported by the Microsoft.EventGrid resource provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerConfigurationsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerConfigurationsClient.java index ec490626321c..b1d1a338a19f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerConfigurationsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerConfigurationsClient.java @@ -18,32 +18,38 @@ /** An instance of this class provides access to all the operations defined in PartnerConfigurationsClient. */ public interface PartnerConfigurationsClient { /** - * Get properties of a partner configuration. + * Get a partner configuration. + * + *

Get properties of a partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. + * @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 properties of a partner configuration. + * @return properties of a partner configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerConfigurationInner getByResourceGroup(String resourceGroupName); + Response getByResourceGroupWithResponse(String resourceGroupName, Context context); /** - * Get properties of a partner configuration. + * Get a partner configuration. + * + *

Get properties of a partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @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 properties of a partner configuration along with {@link Response}. + * @return properties of a partner configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, Context context); + PartnerConfigurationInner getByResourceGroup(String resourceGroupName); /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -57,7 +63,9 @@ SyncPoller, PartnerConfigurationInner> beg String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo); /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -72,7 +80,9 @@ SyncPoller, PartnerConfigurationInner> beg String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo, Context context); /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -86,7 +96,9 @@ PartnerConfigurationInner createOrUpdate( String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo); /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -101,7 +113,9 @@ PartnerConfigurationInner createOrUpdate( String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo, Context context); /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -113,7 +127,9 @@ PartnerConfigurationInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName); /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -126,7 +142,9 @@ PartnerConfigurationInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, Context context); /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,7 +155,9 @@ PartnerConfigurationInner createOrUpdate( void delete(String resourceGroupName); /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -149,7 +169,9 @@ PartnerConfigurationInner createOrUpdate( void delete(String resourceGroupName, Context context); /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -163,7 +185,9 @@ SyncPoller, PartnerConfigurationInner> beg String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters); /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -180,7 +204,9 @@ SyncPoller, PartnerConfigurationInner> beg Context context); /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -194,7 +220,9 @@ PartnerConfigurationInner update( String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters); /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -211,7 +239,9 @@ PartnerConfigurationInner update( Context context); /** - * List all the partner configurations under a resource group. + * List partner configurations under a resource group. + * + *

List all the partner configurations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -223,7 +253,9 @@ PartnerConfigurationInner update( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the partner configurations under a resource group. + * List partner configurations under a resource group. + * + *

List all the partner configurations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -236,7 +268,9 @@ PartnerConfigurationInner update( PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List all the partner configurations under an Azure subscription. + * List partner configurations under an Azure subscription. + * + *

List all the partner configurations under an Azure subscription. * * @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. @@ -246,7 +280,9 @@ PartnerConfigurationInner update( PagedIterable list(); /** - * List all the partner configurations under an Azure subscription. + * List partner configurations under an Azure subscription. + * + *

List all the partner configurations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -266,58 +302,66 @@ PartnerConfigurationInner update( PagedIterable list(String filter, Integer top, Context context); /** - * Authorize a single partner either by partner registration immutable Id or by partner name. + * Authorize a partner. + * + *

Authorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be authorized. + * @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 partner configuration information. + * @return partner configuration information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerConfigurationInner authorizePartner(String resourceGroupName, Partner partnerInfo); + Response authorizePartnerWithResponse( + String resourceGroupName, Partner partnerInfo, Context context); /** - * Authorize a single partner either by partner registration immutable Id or by partner name. + * Authorize a partner. + * + *

Authorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be authorized. - * @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 partner configuration information along with {@link Response}. + * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response authorizePartnerWithResponse( - String resourceGroupName, Partner partnerInfo, Context context); + PartnerConfigurationInner authorizePartner(String resourceGroupName, Partner partnerInfo); /** - * Unauthorize a single partner either by partner registration immutable Id or by partner name. + * Unauthorize a partner. + * + *

Unauthorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be unauthorized. + * @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 partner configuration information. + * @return partner configuration information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerConfigurationInner unauthorizePartner(String resourceGroupName, Partner partnerInfo); + Response unauthorizePartnerWithResponse( + String resourceGroupName, Partner partnerInfo, Context context); /** - * Unauthorize a single partner either by partner registration immutable Id or by partner name. + * Unauthorize a partner. + * + *

Unauthorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be unauthorized. - * @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 partner configuration information along with {@link Response}. + * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response unauthorizePartnerWithResponse( - String resourceGroupName, Partner partnerInfo, Context context); + PartnerConfigurationInner unauthorizePartner(String resourceGroupName, Partner partnerInfo); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerDestinationsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerDestinationsClient.java new file mode 100644 index 000000000000..ed4e7f46603d --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerDestinationsClient.java @@ -0,0 +1,371 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationUpdateParameters; + +/** An instance of this class provides access to all the operations defined in PartnerDestinationsClient. */ +public interface PartnerDestinationsClient { + /** + * Get a partner destination. + * + *

Get properties of a partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 properties of a partner destination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerDestinationName, Context context); + + /** + * Get a partner destination. + * + *

Get properties of a partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 properties of a partner destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PartnerDestinationInner getByResourceGroup(String resourceGroupName, String partnerDestinationName); + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @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 {@link SyncPoller} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PartnerDestinationInner> beginCreateOrUpdate( + String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination); + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @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 the {@link SyncPoller} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PartnerDestinationInner> beginCreateOrUpdate( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationInner partnerDestination, + Context context); + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @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 event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PartnerDestinationInner createOrUpdate( + String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination); + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @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 event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PartnerDestinationInner createOrUpdate( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationInner partnerDestination, + Context context); + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName); + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String partnerDestinationName, Context context); + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String partnerDestinationName); + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String partnerDestinationName, Context context); + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @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 {@link SyncPoller} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PartnerDestinationInner> beginUpdate( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters); + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @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 the {@link SyncPoller} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PartnerDestinationInner> beginUpdate( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, + Context context); + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @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 event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PartnerDestinationInner update( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters); + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @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 event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PartnerDestinationInner update( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, + Context context); + + /** + * List partner destinations under an Azure subscription. + * + *

List all the partner destinations under an Azure subscription. + * + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List partner destinations under an Azure subscription. + * + *

List all the partner destinations under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String filter, Integer top, Context context); + + /** + * List partner destinations under a resource group. + * + *

List all the partner destinations under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List partner destinations under a resource group. + * + *

List all the partner destinations under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup( + String resourceGroupName, String filter, Integer top, Context context); + + /** + * Activate a partner destination. + * + *

Activate a newly created partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 event Grid Partner Destination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response activateWithResponse( + String resourceGroupName, String partnerDestinationName, Context context); + + /** + * Activate a partner destination. + * + *

Activate a newly created partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PartnerDestinationInner activate(String resourceGroupName, String partnerDestinationName); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerNamespacesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerNamespacesClient.java index a4fa7d4d18f0..38ce86abc8fc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerNamespacesClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerNamespacesClient.java @@ -19,35 +19,41 @@ /** An instance of this class provides access to all the operations defined in PartnerNamespacesClient. */ public interface PartnerNamespacesClient { /** - * Get properties of a partner namespace. + * Get a partner namespace. + * + *

Get properties of a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. + * @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 properties of a partner namespace. + * @return properties of a partner namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerNamespaceInner getByResourceGroup(String resourceGroupName, String partnerNamespaceName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerNamespaceName, Context context); /** - * Get properties of a partner namespace. + * Get a partner namespace. + * + *

Get properties of a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. - * @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 properties of a partner namespace along with {@link Response}. + * @return properties of a partner namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String partnerNamespaceName, Context context); + PartnerNamespaceInner getByResourceGroup(String resourceGroupName, String partnerNamespaceName); /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -62,7 +68,9 @@ SyncPoller, PartnerNamespaceInner> beginCreate String resourceGroupName, String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo); /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -81,7 +89,9 @@ SyncPoller, PartnerNamespaceInner> beginCreate Context context); /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -96,7 +106,9 @@ PartnerNamespaceInner createOrUpdate( String resourceGroupName, String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo); /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -115,7 +127,9 @@ PartnerNamespaceInner createOrUpdate( Context context); /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -128,7 +142,9 @@ PartnerNamespaceInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName); /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -143,7 +159,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String partnerNamespaceName, Context context); /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -155,7 +173,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String partnerNamespaceName); /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -168,7 +188,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String partnerNamespaceName, Context context); /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -185,7 +207,9 @@ SyncPoller, PartnerNamespaceInner> beginUpdate PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters); /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -204,7 +228,9 @@ SyncPoller, PartnerNamespaceInner> beginUpdate Context context); /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -221,7 +247,9 @@ PartnerNamespaceInner update( PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters); /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -240,7 +268,9 @@ PartnerNamespaceInner update( Context context); /** - * List all the partner namespaces under an Azure subscription. + * List partner namespaces under an Azure subscription. + * + *

List all the partner namespaces under an Azure subscription. * * @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. @@ -250,7 +280,9 @@ PartnerNamespaceInner update( PagedIterable list(); /** - * List all the partner namespaces under an Azure subscription. + * List partner namespaces under an Azure subscription. + * + *

List all the partner namespaces under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -270,7 +302,9 @@ PartnerNamespaceInner update( PagedIterable list(String filter, Integer top, Context context); /** - * List all the partner namespaces under a resource group. + * List partner namespaces under a resource group. + * + *

List all the partner namespaces under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -282,7 +316,9 @@ PartnerNamespaceInner update( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the partner namespaces under a resource group. + * List partner namespaces under a resource group. + * + *

List all the partner namespaces under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -304,66 +340,74 @@ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, Context context); /** - * List the two keys used to publish to a partner namespace. + * List keys for a partner namespace. + * + *

List the two keys used to publish to a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. + * @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 shared access keys of the partner namespace. + * @return shared access keys of the partner namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerNamespaceSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String partnerNamespaceName); + Response listSharedAccessKeysWithResponse( + String resourceGroupName, String partnerNamespaceName, Context context); /** - * List the two keys used to publish to a partner namespace. + * List keys for a partner namespace. + * + *

List the two keys used to publish to a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. - * @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 shared access keys of the partner namespace along with {@link Response}. + * @return shared access keys of the partner namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listSharedAccessKeysWithResponse( - String resourceGroupName, String partnerNamespaceName, Context context); + PartnerNamespaceSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String partnerNamespaceName); /** - * Regenerate a shared access key for a partner namespace. + * Regenerate key for a partner namespace. + * + *

Regenerate a shared access key for a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the partner namespace. + * @return shared access keys of the partner namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerNamespaceSharedAccessKeysInner regenerateKey( + Response regenerateKeyWithResponse( String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest); + PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context); /** - * Regenerate a shared access key for a partner namespace. + * Regenerate key for a partner namespace. + * + *

Regenerate a shared access key for a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. - * @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 shared access keys of the partner namespace along with {@link Response}. + * @return shared access keys of the partner namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response regenerateKeyWithResponse( + PartnerNamespaceSharedAccessKeysInner regenerateKey( String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, - Context context); + PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerRegistrationsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerRegistrationsClient.java index 14afb76494f4..54184fa30f4b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerRegistrationsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerRegistrationsClient.java @@ -17,35 +17,41 @@ /** An instance of this class provides access to all the operations defined in PartnerRegistrationsClient. */ public interface PartnerRegistrationsClient { /** - * Gets a partner registration with the specified parameters. + * Get a partner registration. + * + *

Gets a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. + * @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 a partner registration with the specified parameters. + * @return a partner registration with the specified parameters along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerRegistrationInner getByResourceGroup(String resourceGroupName, String partnerRegistrationName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerRegistrationName, Context context); /** - * Gets a partner registration with the specified parameters. + * Get a partner registration. + * + *

Gets a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. - * @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 a partner registration with the specified parameters along with {@link Response}. + * @return a partner registration with the specified parameters. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String partnerRegistrationName, Context context); + PartnerRegistrationInner getByResourceGroup(String resourceGroupName, String partnerRegistrationName); /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -60,7 +66,9 @@ SyncPoller, PartnerRegistrationInner> begin String resourceGroupName, String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo); /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -79,7 +87,9 @@ SyncPoller, PartnerRegistrationInner> begin Context context); /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -94,7 +104,9 @@ PartnerRegistrationInner createOrUpdate( String resourceGroupName, String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo); /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -113,7 +125,9 @@ PartnerRegistrationInner createOrUpdate( Context context); /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -126,7 +140,9 @@ PartnerRegistrationInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName); /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -141,7 +157,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String partnerRegistrationName, Context context); /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -153,7 +171,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String partnerRegistrationName); /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -166,7 +186,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String partnerRegistrationName, Context context); /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -183,7 +205,9 @@ SyncPoller, PartnerRegistrationInner> begin PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters); /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -202,7 +226,9 @@ SyncPoller, PartnerRegistrationInner> begin Context context); /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -219,7 +245,9 @@ PartnerRegistrationInner update( PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters); /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -238,7 +266,9 @@ PartnerRegistrationInner update( Context context); /** - * List all the partner registrations under an Azure subscription. + * List partner registrations under an Azure subscription. + * + *

List all the partner registrations under an Azure subscription. * * @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. @@ -248,7 +278,9 @@ PartnerRegistrationInner update( PagedIterable list(); /** - * List all the partner registrations under an Azure subscription. + * List partner registrations under an Azure subscription. + * + *

List all the partner registrations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -268,7 +300,9 @@ PartnerRegistrationInner update( PagedIterable list(String filter, Integer top, Context context); /** - * List all the partner registrations under a resource group. + * List partner registrations under a resource group. + * + *

List all the partner registrations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -280,7 +314,9 @@ PartnerRegistrationInner update( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the partner registrations under a resource group. + * List partner registrations under a resource group. + * + *

List all the partner registrations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicEventSubscriptionsClient.java index 9d2f1b17054a..6a0dc4181e53 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicEventSubscriptionsClient.java @@ -19,39 +19,45 @@ /** An instance of this class provides access to all the operations defined in PartnerTopicEventSubscriptionsClient. */ public interface PartnerTopicEventSubscriptionsClient { /** - * Get properties of an event subscription of a partner topic. + * Get an event subscription of a partner topic. + * + *

Get properties of an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a partner topic. + * @return properties of an event subscription of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionInner get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); + Response getWithResponse( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** - * Get properties of an event subscription of a partner topic. + * Get an event subscription of a partner topic. + * + *

Get properties of an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. - * @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 properties of an event subscription of a partner topic along with {@link Response}. + * @return properties of an event subscription of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); + EventSubscriptionInner get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -72,7 +78,9 @@ SyncPoller, EventSubscriptionInner> beginCrea EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -95,7 +103,9 @@ SyncPoller, EventSubscriptionInner> beginCrea Context context); /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -116,7 +126,9 @@ EventSubscriptionInner createOrUpdate( EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -139,7 +151,9 @@ EventSubscriptionInner createOrUpdate( Context context); /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -155,7 +169,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String partnerTopicName, String eventSubscriptionName); /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -172,7 +188,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -186,7 +204,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -201,7 +221,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -221,7 +243,9 @@ SyncPoller, EventSubscriptionInner> beginUpda EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -243,7 +267,9 @@ SyncPoller, EventSubscriptionInner> beginUpda Context context); /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -263,7 +289,9 @@ EventSubscriptionInner update( EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -285,40 +313,46 @@ EventSubscriptionInner update( Context context); /** - * Get the full endpoint URL for an event subscription of a partner topic. + * Get full URL of an event subscription of a partner topic. + * + *

Get the full endpoint URL for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 the full endpoint URL for an event subscription of a partner topic. + * @return the full endpoint URL for an event subscription of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName); + Response getFullUrlWithResponse( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for an event subscription of a partner topic. + * Get full URL of an event subscription of a partner topic. + * + *

Get the full endpoint URL for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 the full endpoint URL for an event subscription of a partner topic along with {@link Response}. + * @return the full endpoint URL for an event subscription of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); + EventSubscriptionFullUrlInner getFullUrl( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName); /** - * List event subscriptions that belong to a specific partner topic. + * List event subscriptions of a partner topic. + * + *

List event subscriptions that belong to a specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -331,7 +365,9 @@ Response getFullUrlWithResponse( PagedIterable listByPartnerTopic(String resourceGroupName, String partnerTopicName); /** - * List event subscriptions that belong to a specific partner topic. + * List event subscriptions of a partner topic. + * + *

List event subscriptions that belong to a specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -354,35 +390,39 @@ PagedIterable listByPartnerTopic( String resourceGroupName, String partnerTopicName, String filter, Integer top, Context context); /** - * Get all delivery attributes for an event subscription of a partner topic. + * Get delivery attributes for an event subscription of a partner topic. + * + *

Get all delivery attributes for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 all delivery attributes for an event subscription of a partner topic. + * @return all delivery attributes for an event subscription of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName); + Response getDeliveryAttributesWithResponse( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** - * Get all delivery attributes for an event subscription of a partner topic. + * Get delivery attributes for an event subscription of a partner topic. + * + *

Get all delivery attributes for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 all delivery attributes for an event subscription of a partner topic along with {@link Response}. + * @return all delivery attributes for an event subscription of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); + DeliveryAttributeListResultInner getDeliveryAttributes( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicsClient.java index 2a1d131343c2..ca529474c49a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PartnerTopicsClient.java @@ -17,66 +17,76 @@ /** An instance of this class provides access to all the operations defined in PartnerTopicsClient. */ public interface PartnerTopicsClient { /** - * Get properties of a partner topic. + * Get a partner topic. + * + *

Get properties of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. + * @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 properties of a partner topic. + * @return properties of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerTopicInner getByResourceGroup(String resourceGroupName, String partnerTopicName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerTopicName, Context context); /** - * Get properties of a partner topic. + * Get a partner topic. + * + *

Get properties of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. - * @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 properties of a partner topic along with {@link Response}. + * @return properties of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String partnerTopicName, Context context); + PartnerTopicInner getByResourceGroup(String resourceGroupName, String partnerTopicName); /** - * Asynchronously creates a new partner topic with the specified parameters. + * Create a partner topic. + * + *

Asynchronously creates a new partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param partnerTopicInfo Partner Topic information. + * @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 event Grid Partner Topic. + * @return event Grid Partner Topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerTopicInner createOrUpdate( - String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo); + Response createOrUpdateWithResponse( + String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo, Context context); /** - * Asynchronously creates a new partner topic with the specified parameters. + * Create a partner topic. + * + *

Asynchronously creates a new partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param partnerTopicInfo Partner Topic information. - * @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 event Grid Partner Topic along with {@link Response}. + * @return event Grid Partner Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo, Context context); + PartnerTopicInner createOrUpdate( + String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo); /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -89,7 +99,9 @@ Response createOrUpdateWithResponse( SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName); /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -103,7 +115,9 @@ Response createOrUpdateWithResponse( SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName, Context context); /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -115,7 +129,9 @@ Response createOrUpdateWithResponse( void delete(String resourceGroupName, String partnerTopicName); /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -128,41 +144,47 @@ Response createOrUpdateWithResponse( void delete(String resourceGroupName, String partnerTopicName, Context context); /** - * Asynchronously updates a partner topic with the specified parameters. + * Update a partner topic. + * + *

Asynchronously updates a partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param partnerTopicUpdateParameters PartnerTopic update information. + * @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 the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerTopicInner update( - String resourceGroupName, String partnerTopicName, PartnerTopicUpdateParameters partnerTopicUpdateParameters); + Response updateWithResponse( + String resourceGroupName, + String partnerTopicName, + PartnerTopicUpdateParameters partnerTopicUpdateParameters, + Context context); /** - * Asynchronously updates a partner topic with the specified parameters. + * Update a partner topic. + * + *

Asynchronously updates a partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param partnerTopicUpdateParameters PartnerTopic update information. - * @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 the response body along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String partnerTopicName, - PartnerTopicUpdateParameters partnerTopicUpdateParameters, - Context context); + PartnerTopicInner update( + String resourceGroupName, String partnerTopicName, PartnerTopicUpdateParameters partnerTopicUpdateParameters); /** - * List all the partner topics under an Azure subscription. + * List partner topics under an Azure subscription. + * + *

List all the partner topics under an Azure subscription. * * @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. @@ -172,7 +194,9 @@ Response updateWithResponse( PagedIterable list(); /** - * List all the partner topics under an Azure subscription. + * List partner topics under an Azure subscription. + * + *

List all the partner topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -192,7 +216,9 @@ Response updateWithResponse( PagedIterable list(String filter, Integer top, Context context); /** - * List all the partner topics under a resource group. + * List partner topics under a resource group. + * + *

List all the partner topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -204,7 +230,9 @@ Response updateWithResponse( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the partner topics under a resource group. + * List partner topics under a resource group. + * + *

List all the partner topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -226,20 +254,9 @@ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, Context context); /** - * Activate a newly created partner topic. + * Activate a partner topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerTopicName Name of the partner topic. - * @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 event Grid Partner Topic. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PartnerTopicInner activate(String resourceGroupName, String partnerTopicName); - - /** - * Activate a newly created partner topic. + *

Activate a newly created partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -254,7 +271,9 @@ Response activateWithResponse( String resourceGroupName, String partnerTopicName, Context context); /** - * Deactivate specific partner topic. + * Activate a partner topic. + * + *

Activate a newly created partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -264,10 +283,12 @@ Response activateWithResponse( * @return event Grid Partner Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - PartnerTopicInner deactivate(String resourceGroupName, String partnerTopicName); + PartnerTopicInner activate(String resourceGroupName, String partnerTopicName); /** - * Deactivate specific partner topic. + * Deactivate a partner topic. + * + *

Deactivate specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -280,4 +301,19 @@ Response activateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deactivateWithResponse( String resourceGroupName, String partnerTopicName, Context context); + + /** + * Deactivate a partner topic. + * + *

Deactivate specific partner topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerTopicName Name of the partner topic. + * @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 event Grid Partner Topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PartnerTopicInner deactivate(String resourceGroupName, String partnerTopicName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PermissionBindingsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PermissionBindingsClient.java new file mode 100644 index 000000000000..9dc212ef7bd9 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PermissionBindingsClient.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner; + +/** An instance of this class provides access to all the operations defined in PermissionBindingsClient. */ +public interface PermissionBindingsClient { + /** + * Get a permission binding. + * + *

Get properties of a permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 properties of a permission binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String namespaceName, String permissionBindingName, Context context); + + /** + * Get a permission binding. + * + *

Get properties of a permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 properties of a permission binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PermissionBindingInner get(String resourceGroupName, String namespaceName, String permissionBindingName); + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @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 {@link SyncPoller} for polling of the Permission binding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PermissionBindingInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo); + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @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 the {@link SyncPoller} for polling of the Permission binding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PermissionBindingInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo, + Context context); + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @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 Permission binding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PermissionBindingInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo); + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @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 the Permission binding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PermissionBindingInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo, + Context context); + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String permissionBindingName); + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String permissionBindingName, Context context); + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String permissionBindingName); + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String permissionBindingName, Context context); + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateEndpointConnectionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateEndpointConnectionsClient.java index 14757a21db26..e55293d965df 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateEndpointConnectionsClient.java @@ -17,58 +17,64 @@ /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { /** - * Get a specific private endpoint connection under a topic, domain, or partner namespace. + * Get a specific private endpoint connection. + * + *

Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @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 a specific private endpoint connection under a topic, domain, or partner namespace. + * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get( + Response getWithResponse( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, - String privateEndpointConnectionName); + String privateEndpointConnectionName, + Context context); /** - * Get a specific private endpoint connection under a topic, domain, or partner namespace. + * Get a specific private endpoint connection. + * + *

Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. - * @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 a specific private endpoint connection under a topic, domain, or partner namespace along with {@link - * Response}. + * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + PrivateEndpointConnectionInner get( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, - String privateEndpointConnectionName, - Context context); + String privateEndpointConnectionName); /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -85,13 +91,15 @@ SyncPoller, PrivateEndpointConnection PrivateEndpointConnectionInner privateEndpointConnection); /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. @@ -110,13 +118,15 @@ SyncPoller, PrivateEndpointConnection Context context); /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -133,13 +143,15 @@ PrivateEndpointConnectionInner update( PrivateEndpointConnectionInner privateEndpointConnection); /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. @@ -158,13 +170,15 @@ PrivateEndpointConnectionInner update( Context context); /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -179,13 +193,15 @@ SyncPoller, Void> beginDelete( String privateEndpointConnectionName); /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -202,13 +218,15 @@ SyncPoller, Void> beginDelete( Context context); /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -222,13 +240,15 @@ void delete( String privateEndpointConnectionName); /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -244,31 +264,35 @@ void delete( Context context); /** - * Get all private endpoint connections under a topic, domain, or partner namespace. + * Lists all private endpoint connections under a resource. + * + *

Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @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 all private endpoint connections under a topic, domain, or partner namespace as paginated response with - * {@link PagedIterable}. + * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResource( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName); /** - * Get all private endpoint connections under a topic, domain, or partner namespace. + * Lists all private endpoint connections under a resource. + * + *

Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -281,8 +305,8 @@ PagedIterable listByResource( * @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 all private endpoint connections under a topic, domain, or partner namespace as paginated response with - * {@link PagedIterable}. + * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResource( diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateLinkResourcesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateLinkResourcesClient.java index 263cb986e1d0..b605481df25e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateLinkResourcesClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/PrivateLinkResourcesClient.java @@ -14,54 +14,62 @@ /** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ public interface PrivateLinkResourcesClient { /** - * Get properties of a private link resource. + * Get a private link resource. + * + *

Get properties of a private link resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). - * @param privateLinkResourceName The name of private link resource. + * namespace name or namespace name). + * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace + * or namespace. + * @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 properties of a private link resource. + * @return properties of a private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceInner get( - String resourceGroupName, String parentType, String parentName, String privateLinkResourceName); + Response getWithResponse( + String resourceGroupName, + String parentType, + String parentName, + String privateLinkResourceName, + Context context); /** - * Get properties of a private link resource. + * Get a private link resource. + * + *

Get properties of a private link resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). - * @param privateLinkResourceName The name of private link resource. - * @param context The context to associate with this operation. + * namespace name or namespace name). + * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace + * or namespace. * @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 properties of a private link resource along with {@link Response}. + * @return properties of a private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String parentType, - String parentName, - String privateLinkResourceName, - Context context); + PrivateLinkResourceInner get( + String resourceGroupName, String parentType, String parentName, String privateLinkResourceName); /** - * List all the private link resources under a topic, domain, or partner namespace. + * List private link resources under specific topic, domain, or partner namespace or namespace. + * + *

List all the private link resources under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace or namespace name). * @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. @@ -72,13 +80,15 @@ PagedIterable listByResource( String resourceGroupName, String parentType, String parentName); /** - * List all the private link resources under a topic, domain, or partner namespace. + * List private link resources under specific topic, domain, or partner namespace or namespace. + * + *

List all the private link resources under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java index e77b68ffdf94..2a464ab823cc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicEventSubscriptionsClient.java @@ -19,22 +19,46 @@ /** An instance of this class provides access to all the operations defined in SystemTopicEventSubscriptionsClient. */ public interface SystemTopicEventSubscriptionsClient { /** - * Get an event subscription. + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 an event subscription. + * @return all delivery attributes for an event subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionInner get(String resourceGroupName, String systemTopicName, String eventSubscriptionName); + Response getDeliveryAttributesWithResponse( + String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); /** - * Get an event subscription. + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 all delivery attributes for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeliveryAttributeListResultInner getDeliveryAttributes( + String resourceGroupName, String systemTopicName, String eventSubscriptionName); + + /** + * Get an event subscription of a system topic. + * + *

Get an event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -51,7 +75,26 @@ Response getWithResponse( String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Get an event subscription of a system topic. + * + *

Get an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EventSubscriptionInner get(String resourceGroupName, String systemTopicName, String eventSubscriptionName); + + /** + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -72,7 +115,9 @@ SyncPoller, EventSubscriptionInner> beginCrea EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -95,7 +140,9 @@ SyncPoller, EventSubscriptionInner> beginCrea Context context); /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -116,7 +163,9 @@ EventSubscriptionInner createOrUpdate( EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -139,7 +188,9 @@ EventSubscriptionInner createOrUpdate( Context context); /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -155,7 +206,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String systemTopicName, String eventSubscriptionName); /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -172,7 +225,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -186,7 +241,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName); /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -201,7 +258,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -221,7 +280,9 @@ SyncPoller, EventSubscriptionInner> beginUpda EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -243,7 +304,9 @@ SyncPoller, EventSubscriptionInner> beginUpda Context context); /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -263,7 +326,9 @@ EventSubscriptionInner update( EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -285,40 +350,46 @@ EventSubscriptionInner update( Context context); /** - * Get the full endpoint URL for an event subscription of a system topic. + * Get full URL of an event subscription of a system topic + * + *

Get the full endpoint URL for an event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 the full endpoint URL for an event subscription of a system topic. + * @return the full endpoint URL for an event subscription of a system topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl( - String resourceGroupName, String systemTopicName, String eventSubscriptionName); + Response getFullUrlWithResponse( + String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for an event subscription of a system topic. + * Get full URL of an event subscription of a system topic + * + *

Get the full endpoint URL for an event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 the full endpoint URL for an event subscription of a system topic along with {@link Response}. + * @return the full endpoint URL for an event subscription of a system topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse( - String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); + EventSubscriptionFullUrlInner getFullUrl( + String resourceGroupName, String systemTopicName, String eventSubscriptionName); /** - * List event subscriptions that belong to a specific system topic. + * List event subscriptions of a system topic. + * + *

List event subscriptions that belong to a specific system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -331,7 +402,9 @@ Response getFullUrlWithResponse( PagedIterable listBySystemTopic(String resourceGroupName, String systemTopicName); /** - * List event subscriptions that belong to a specific system topic. + * List event subscriptions of a system topic. + * + *

List event subscriptions that belong to a specific system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -352,37 +425,4 @@ Response getFullUrlWithResponse( @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listBySystemTopic( String resourceGroupName, String systemTopicName, String filter, Integer top, Context context); - - /** - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 all delivery attributes for an event subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes( - String resourceGroupName, String systemTopicName, String eventSubscriptionName); - - /** - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 all delivery attributes for an event subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse( - String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicsClient.java index 8be5ba7837c3..5d94a8cb26c5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/SystemTopicsClient.java @@ -17,35 +17,41 @@ /** An instance of this class provides access to all the operations defined in SystemTopicsClient. */ public interface SystemTopicsClient { /** - * Get properties of a system topic. + * Get a system topic. + * + *

Get properties of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. + * @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 properties of a system topic. + * @return properties of a system topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SystemTopicInner getByResourceGroup(String resourceGroupName, String systemTopicName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String systemTopicName, Context context); /** - * Get properties of a system topic. + * Get a system topic. + * + *

Get properties of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. - * @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 properties of a system topic along with {@link Response}. + * @return properties of a system topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String systemTopicName, Context context); + SystemTopicInner getByResourceGroup(String resourceGroupName, String systemTopicName); /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -60,7 +66,9 @@ SyncPoller, SystemTopicInner> beginCreateOrUpdate( String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo); /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -76,7 +84,9 @@ SyncPoller, SystemTopicInner> beginCreateOrUpdate( String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo, Context context); /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -90,7 +100,9 @@ SyncPoller, SystemTopicInner> beginCreateOrUpdate( SystemTopicInner createOrUpdate(String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo); /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -106,7 +118,9 @@ SystemTopicInner createOrUpdate( String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo, Context context); /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -119,7 +133,9 @@ SystemTopicInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName); /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -133,7 +149,9 @@ SystemTopicInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName, Context context); /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -145,7 +163,9 @@ SystemTopicInner createOrUpdate( void delete(String resourceGroupName, String systemTopicName); /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -158,7 +178,9 @@ SystemTopicInner createOrUpdate( void delete(String resourceGroupName, String systemTopicName, Context context); /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -173,7 +195,9 @@ SyncPoller, SystemTopicInner> beginUpdate( String resourceGroupName, String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters); /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -192,7 +216,9 @@ SyncPoller, SystemTopicInner> beginUpdate( Context context); /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -207,7 +233,9 @@ SystemTopicInner update( String resourceGroupName, String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters); /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -226,7 +254,9 @@ SystemTopicInner update( Context context); /** - * List all the system topics under an Azure subscription. + * List system topics under an Azure subscription. + * + *

List all the system topics under an Azure subscription. * * @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. @@ -236,7 +266,9 @@ SystemTopicInner update( PagedIterable list(); /** - * List all the system topics under an Azure subscription. + * List system topics under an Azure subscription. + * + *

List all the system topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -256,7 +288,9 @@ SystemTopicInner update( PagedIterable list(String filter, Integer top, Context context); /** - * List all the system topics under a resource group. + * List system topics under a resource group. + * + *

List all the system topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -268,7 +302,9 @@ SystemTopicInner update( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the system topics under a resource group. + * List system topics under a resource group. + * + *

List all the system topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicEventSubscriptionsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicEventSubscriptionsClient.java index 3f45991af15f..ef157e8976ad 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicEventSubscriptionsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicEventSubscriptionsClient.java @@ -19,70 +19,80 @@ /** An instance of this class provides access to all the operations defined in TopicEventSubscriptionsClient. */ public interface TopicEventSubscriptionsClient { /** - * Get all delivery attributes for an event subscription for topic. + * Get delivery attributes for an event subscription for topic. + * + *

Get all delivery attributes for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription for topic. + * @return all delivery attributes for an event subscription for topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeliveryAttributeListResultInner getDeliveryAttributes( - String resourceGroupName, String topicName, String eventSubscriptionName); + Response getDeliveryAttributesWithResponse( + String resourceGroupName, String topicName, String eventSubscriptionName, Context context); /** - * Get all delivery attributes for an event subscription for topic. + * Get delivery attributes for an event subscription for topic. + * + *

Get all delivery attributes for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription for topic along with {@link Response}. + * @return all delivery attributes for an event subscription for topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDeliveryAttributesWithResponse( - String resourceGroupName, String topicName, String eventSubscriptionName, Context context); + DeliveryAttributeListResultInner getDeliveryAttributes( + String resourceGroupName, String topicName, String eventSubscriptionName); /** - * Get properties of an event subscription of a topic. + * Get an event subscription of a topic. + * + *

Get properties of an event subscription of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the partner topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a topic. + * @return properties of an event subscription of a topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionInner get(String resourceGroupName, String topicName, String eventSubscriptionName); + Response getWithResponse( + String resourceGroupName, String topicName, String eventSubscriptionName, Context context); /** - * Get properties of an event subscription of a topic. + * Get an event subscription of a topic. + * + *

Get properties of an event subscription of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the partner topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. - * @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 properties of an event subscription of a topic along with {@link Response}. + * @return properties of an event subscription of a topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String topicName, String eventSubscriptionName, Context context); + EventSubscriptionInner get(String resourceGroupName, String topicName, String eventSubscriptionName); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -102,7 +112,9 @@ SyncPoller, EventSubscriptionInner> beginCrea EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -124,7 +136,9 @@ SyncPoller, EventSubscriptionInner> beginCrea Context context); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -144,7 +158,9 @@ EventSubscriptionInner createOrUpdate( EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -166,7 +182,9 @@ EventSubscriptionInner createOrUpdate( Context context); /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -182,7 +200,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String topicName, String eventSubscriptionName); /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -199,7 +219,9 @@ SyncPoller, Void> beginDelete( String resourceGroupName, String topicName, String eventSubscriptionName, Context context); /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -213,7 +235,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String topicName, String eventSubscriptionName); /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -228,7 +252,9 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context); /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -247,7 +273,9 @@ SyncPoller, EventSubscriptionInner> beginUpda EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -268,7 +296,9 @@ SyncPoller, EventSubscriptionInner> beginUpda Context context); /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -287,7 +317,9 @@ EventSubscriptionInner update( EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -308,37 +340,43 @@ EventSubscriptionInner update( Context context); /** - * Get the full endpoint URL for an event subscription for topic. + * Get full URL of an event subscription for topic. + * + *

Get the full endpoint URL for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. + * @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 the full endpoint URL for an event subscription for topic. + * @return the full endpoint URL for an event subscription for topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String topicName, String eventSubscriptionName); + Response getFullUrlWithResponse( + String resourceGroupName, String topicName, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for an event subscription for topic. + * Get full URL of an event subscription for topic. + * + *

Get the full endpoint URL for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. - * @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 the full endpoint URL for an event subscription for topic along with {@link Response}. + * @return the full endpoint URL for an event subscription for topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getFullUrlWithResponse( - String resourceGroupName, String topicName, String eventSubscriptionName, Context context); + EventSubscriptionFullUrlInner getFullUrl(String resourceGroupName, String topicName, String eventSubscriptionName); /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific topic. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -351,7 +389,9 @@ Response getFullUrlWithResponse( PagedIterable list(String resourceGroupName, String topicName); /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific topic. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicSpacesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicSpacesClient.java new file mode 100644 index 000000000000..2c796e9dfa7f --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicSpacesClient.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceInner; + +/** An instance of this class provides access to all the operations defined in TopicSpacesClient. */ +public interface TopicSpacesClient { + /** + * Get a topic space. + * + *

Get properties of a topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 properties of a topic space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String namespaceName, String topicSpaceName, Context context); + + /** + * Get a topic space. + * + *

Get properties of a topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 properties of a topic space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TopicSpaceInner get(String resourceGroupName, String namespaceName, String topicSpaceName); + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @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 {@link SyncPoller} for polling of the Topic space resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TopicSpaceInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo); + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @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 the {@link SyncPoller} for polling of the Topic space resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, TopicSpaceInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String topicSpaceName, + TopicSpaceInner topicSpaceInfo, + Context context); + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @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 Topic space resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TopicSpaceInner createOrUpdate( + String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo); + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @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 the Topic space resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TopicSpaceInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String topicSpaceName, + TopicSpaceInner topicSpaceInfo, + Context context); + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String topicSpaceName); + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String topicSpaceName, Context context); + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String topicSpaceName); + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String namespaceName, String topicSpaceName, Context context); + + /** + * List all topic spaces under a namespace. + * + *

Get all the topic spaces under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List all topic spaces under a namespace. + * + *

Get all the topic spaces under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicTypesClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicTypesClient.java index d5900dc3fcff..179dfd5909ca 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicTypesClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicTypesClient.java @@ -15,7 +15,9 @@ /** An instance of this class provides access to all the operations defined in TopicTypesClient. */ public interface TopicTypesClient { /** - * List all registered topic types. + * List topic types. + * + *

List all registered topic types. * * @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. @@ -25,7 +27,9 @@ public interface TopicTypesClient { PagedIterable list(); /** - * List all registered topic types. + * List topic types. + * + *

List all registered topic types. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -37,32 +41,38 @@ public interface TopicTypesClient { PagedIterable list(Context context); /** - * Get information about a topic type. + * Get a topic type. + * + *

Get information about a topic type. * * @param topicTypeName Name of the topic type. + * @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 information about a topic type. + * @return information about a topic type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - TopicTypeInfoInner get(String topicTypeName); + Response getWithResponse(String topicTypeName, Context context); /** - * Get information about a topic type. + * Get a topic type. + * + *

Get information about a topic type. * * @param topicTypeName Name of the topic type. - * @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 information about a topic type along with {@link Response}. + * @return information about a topic type. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String topicTypeName, Context context); + TopicTypeInfoInner get(String topicTypeName); /** - * List event types for a topic type. + * List event types. + * + *

List event types for a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -74,7 +84,9 @@ public interface TopicTypesClient { PagedIterable listEventTypes(String topicTypeName); /** - * List event types for a topic type. + * List event types. + * + *

List event types for a topic type. * * @param topicTypeName Name of the topic type. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicsClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicsClient.java index bedbdd09c0c5..719458313753 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicsClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/TopicsClient.java @@ -20,34 +20,40 @@ /** An instance of this class provides access to all the operations defined in TopicsClient. */ public interface TopicsClient { /** - * Get properties of a topic. + * Get a topic. + * + *

Get properties of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. + * @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 properties of a topic. + * @return properties of a topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - TopicInner getByResourceGroup(String resourceGroupName, String topicName); + Response getByResourceGroupWithResponse(String resourceGroupName, String topicName, Context context); /** - * Get properties of a topic. + * Get a topic. + * + *

Get properties of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. - * @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 properties of a topic along with {@link Response}. + * @return properties of a topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String topicName, Context context); + TopicInner getByResourceGroup(String resourceGroupName, String topicName); /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -62,7 +68,9 @@ SyncPoller, TopicInner> beginCreateOrUpdate( String resourceGroupName, String topicName, TopicInner topicInfo); /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -78,7 +86,9 @@ SyncPoller, TopicInner> beginCreateOrUpdate( String resourceGroupName, String topicName, TopicInner topicInfo, Context context); /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -92,7 +102,9 @@ SyncPoller, TopicInner> beginCreateOrUpdate( TopicInner createOrUpdate(String resourceGroupName, String topicName, TopicInner topicInfo); /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -107,7 +119,9 @@ SyncPoller, TopicInner> beginCreateOrUpdate( TopicInner createOrUpdate(String resourceGroupName, String topicName, TopicInner topicInfo, Context context); /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -120,7 +134,9 @@ SyncPoller, TopicInner> beginCreateOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String topicName); /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -134,7 +150,9 @@ SyncPoller, TopicInner> beginCreateOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, Context context); /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -146,7 +164,9 @@ SyncPoller, TopicInner> beginCreateOrUpdate( void delete(String resourceGroupName, String topicName); /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -159,7 +179,9 @@ SyncPoller, TopicInner> beginCreateOrUpdate( void delete(String resourceGroupName, String topicName, Context context); /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -174,7 +196,9 @@ SyncPoller, TopicInner> beginUpdate( String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters); /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -190,7 +214,9 @@ SyncPoller, TopicInner> beginUpdate( String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters, Context context); /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -204,7 +230,9 @@ SyncPoller, TopicInner> beginUpdate( TopicInner update(String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters); /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -220,7 +248,9 @@ TopicInner update( String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters, Context context); /** - * List all the topics under an Azure subscription. + * List topics under an Azure subscription. + * + *

List all the topics under an Azure subscription. * * @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. @@ -230,7 +260,9 @@ TopicInner update( PagedIterable list(); /** - * List all the topics under an Azure subscription. + * List topics under an Azure subscription. + * + *

List all the topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -250,7 +282,9 @@ TopicInner update( PagedIterable list(String filter, Integer top, Context context); /** - * List all the topics under a resource group. + * List topics under a resource group. + * + *

List all the topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -262,7 +296,9 @@ TopicInner update( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the topics under a resource group. + * List topics under a resource group. + * + *

List all the topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -284,35 +320,41 @@ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, Context context); /** - * List the two keys used to publish to a topic. + * List keys for a topic. + * + *

List the two keys used to publish to a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. + * @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 shared access keys of the Topic. + * @return shared access keys of the Topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String topicName); + Response listSharedAccessKeysWithResponse( + String resourceGroupName, String topicName, Context context); /** - * List the two keys used to publish to a topic. + * List keys for a topic. + * + *

List the two keys used to publish to a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. - * @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 shared access keys of the Topic along with {@link Response}. + * @return shared access keys of the Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listSharedAccessKeysWithResponse( - String resourceGroupName, String topicName, Context context); + TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String topicName); /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -327,7 +369,9 @@ SyncPoller, TopicSharedAccessKeysInner> b String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest); /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -343,7 +387,9 @@ SyncPoller, TopicSharedAccessKeysInner> b String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest, Context context); /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -358,7 +404,9 @@ TopicSharedAccessKeysInner regenerateKey( String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest); /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -374,7 +422,9 @@ TopicSharedAccessKeysInner regenerateKey( String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest, Context context); /** - * List event types for a topic. + * List topic event types. + * + *

List event types for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -390,7 +440,9 @@ PagedIterable listEventTypes( String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName); /** - * List event types for a topic. + * List topic event types. + * + *

List event types for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/VerifiedPartnersClient.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/VerifiedPartnersClient.java index bb51f2ad5939..8c6a275da047 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/VerifiedPartnersClient.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/VerifiedPartnersClient.java @@ -14,32 +14,38 @@ /** An instance of this class provides access to all the operations defined in VerifiedPartnersClient. */ public interface VerifiedPartnersClient { /** - * Get properties of a verified partner. + * Get a verified partner. + * + *

Get properties of a verified partner. * * @param verifiedPartnerName Name of the verified partner. + * @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 properties of a verified partner. + * @return properties of a verified partner along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - VerifiedPartnerInner get(String verifiedPartnerName); + Response getWithResponse(String verifiedPartnerName, Context context); /** - * Get properties of a verified partner. + * Get a verified partner. + * + *

Get properties of a verified partner. * * @param verifiedPartnerName Name of the verified partner. - * @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 properties of a verified partner along with {@link Response}. + * @return properties of a verified partner. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String verifiedPartnerName, Context context); + VerifiedPartnerInner get(String verifiedPartnerName); /** - * Get a list of all verified partners. + * List all verified partners. + * + *

Get a list of all verified partners. * * @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. @@ -49,7 +55,9 @@ public interface VerifiedPartnersClient { PagedIterable list(); /** - * Get a list of all verified partners. + * List all verified partners. + * + *

Get a list of all verified partners. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureADPartnerClientAuthenticationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureADPartnerClientAuthenticationProperties.java new file mode 100644 index 000000000000..e16c52c358ce --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureADPartnerClientAuthenticationProperties.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of an Azure Active Directory Partner Client Authentication. */ +@Fluent +public final class AzureADPartnerClientAuthenticationProperties { + /* + * The Azure Active Directory Tenant ID to get the access token that will be included as the bearer token in + * delivery requests. + */ + @JsonProperty(value = "azureActiveDirectoryTenantId") + private String azureActiveDirectoryTenantId; + + /* + * The Azure Active Directory Application ID or URI to get the access token that will be included as the bearer + * token in delivery requests. + */ + @JsonProperty(value = "azureActiveDirectoryApplicationIdOrUri") + private String azureActiveDirectoryApplicationIdOrUri; + + /** Creates an instance of AzureADPartnerClientAuthenticationProperties class. */ + public AzureADPartnerClientAuthenticationProperties() { + } + + /** + * Get the azureActiveDirectoryTenantId property: The Azure Active Directory Tenant ID to get the access token that + * will be included as the bearer token in delivery requests. + * + * @return the azureActiveDirectoryTenantId value. + */ + public String azureActiveDirectoryTenantId() { + return this.azureActiveDirectoryTenantId; + } + + /** + * Set the azureActiveDirectoryTenantId property: The Azure Active Directory Tenant ID to get the access token that + * will be included as the bearer token in delivery requests. + * + * @param azureActiveDirectoryTenantId the azureActiveDirectoryTenantId value to set. + * @return the AzureADPartnerClientAuthenticationProperties object itself. + */ + public AzureADPartnerClientAuthenticationProperties withAzureActiveDirectoryTenantId( + String azureActiveDirectoryTenantId) { + this.azureActiveDirectoryTenantId = azureActiveDirectoryTenantId; + return this; + } + + /** + * Get the azureActiveDirectoryApplicationIdOrUri property: The Azure Active Directory Application ID or URI to get + * the access token that will be included as the bearer token in delivery requests. + * + * @return the azureActiveDirectoryApplicationIdOrUri value. + */ + public String azureActiveDirectoryApplicationIdOrUri() { + return this.azureActiveDirectoryApplicationIdOrUri; + } + + /** + * Set the azureActiveDirectoryApplicationIdOrUri property: The Azure Active Directory Application ID or URI to get + * the access token that will be included as the bearer token in delivery requests. + * + * @param azureActiveDirectoryApplicationIdOrUri the azureActiveDirectoryApplicationIdOrUri value to set. + * @return the AzureADPartnerClientAuthenticationProperties object itself. + */ + public AzureADPartnerClientAuthenticationProperties withAzureActiveDirectoryApplicationIdOrUri( + String azureActiveDirectoryApplicationIdOrUri) { + this.azureActiveDirectoryApplicationIdOrUri = azureActiveDirectoryApplicationIdOrUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureFunctionEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureFunctionEventSubscriptionDestinationProperties.java index a9129d7b8be6..e1d9afc50d5d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureFunctionEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/AzureFunctionEventSubscriptionDestinationProperties.java @@ -13,8 +13,7 @@ @Fluent public final class AzureFunctionEventSubscriptionDestinationProperties { /* - * The Azure Resource Id that represents the endpoint of the Azure Function - * destination of an event subscription. + * The Azure Resource Id that represents the endpoint of the Azure Function destination of an event subscription. */ @JsonProperty(value = "resourceId") private String resourceId; @@ -37,6 +36,10 @@ public final class AzureFunctionEventSubscriptionDestinationProperties { @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; + /** Creates an instance of AzureFunctionEventSubscriptionDestinationProperties class. */ + public AzureFunctionEventSubscriptionDestinationProperties() { + } + /** * Get the resourceId property: The Azure Resource Id that represents the endpoint of the Azure Function destination * of an event subscription. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateInner.java new file mode 100644 index 000000000000..134b9478f016 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateInner.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.eventgrid.models.CaCertificateProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The CA Certificate resource. */ +@Fluent +public final class CaCertificateInner extends ProxyResource { + /* + * The properties of CA certificate. + */ + @JsonProperty(value = "properties") + private CaCertificateProperties innerProperties; + + /* + * The system metadata relating to the CaCertificate resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of CaCertificateInner class. */ + public CaCertificateInner() { + } + + /** + * Get the innerProperties property: The properties of CA certificate. + * + * @return the innerProperties value. + */ + private CaCertificateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: The system metadata relating to the CaCertificate resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the description property: Description for the CA Certificate resource. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Description for the CA Certificate resource. + * + * @param description the description value to set. + * @return the CaCertificateInner object itself. + */ + public CaCertificateInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new CaCertificateProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the encodedCertificate property: Base64 encoded PEM (Privacy Enhanced Mail) format certificate data. + * + * @return the encodedCertificate value. + */ + public String encodedCertificate() { + return this.innerProperties() == null ? null : this.innerProperties().encodedCertificate(); + } + + /** + * Set the encodedCertificate property: Base64 encoded PEM (Privacy Enhanced Mail) format certificate data. + * + * @param encodedCertificate the encodedCertificate value to set. + * @return the CaCertificateInner object itself. + */ + public CaCertificateInner withEncodedCertificate(String encodedCertificate) { + if (this.innerProperties() == null) { + this.innerProperties = new CaCertificateProperties(); + } + this.innerProperties().withEncodedCertificate(encodedCertificate); + return this; + } + + /** + * Get the issueTimeInUtc property: Certificate issue time in UTC. This is a read-only field. + * + * @return the issueTimeInUtc value. + */ + public OffsetDateTime issueTimeInUtc() { + return this.innerProperties() == null ? null : this.innerProperties().issueTimeInUtc(); + } + + /** + * Get the expiryTimeInUtc property: Certificate expiry time in UTC. This is a read-only field. + * + * @return the expiryTimeInUtc value. + */ + public OffsetDateTime expiryTimeInUtc() { + return this.innerProperties() == null ? null : this.innerProperties().expiryTimeInUtc(); + } + + /** + * Get the provisioningState property: Provisioning state of the CA Certificate resource. + * + * @return the provisioningState value. + */ + public CaCertificateProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateProperties.java new file mode 100644 index 000000000000..a6cc9fba2da4 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/CaCertificateProperties.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.CaCertificateProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The properties of CA certificate. */ +@Fluent +public final class CaCertificateProperties { + /* + * Description for the CA Certificate resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Base64 encoded PEM (Privacy Enhanced Mail) format certificate data. + */ + @JsonProperty(value = "encodedCertificate") + private String encodedCertificate; + + /* + * Certificate issue time in UTC. This is a read-only field. + */ + @JsonProperty(value = "issueTimeInUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime issueTimeInUtc; + + /* + * Certificate expiry time in UTC. This is a read-only field. + */ + @JsonProperty(value = "expiryTimeInUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expiryTimeInUtc; + + /* + * Provisioning state of the CA Certificate resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private CaCertificateProvisioningState provisioningState; + + /** Creates an instance of CaCertificateProperties class. */ + public CaCertificateProperties() { + } + + /** + * Get the description property: Description for the CA Certificate resource. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description for the CA Certificate resource. + * + * @param description the description value to set. + * @return the CaCertificateProperties object itself. + */ + public CaCertificateProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the encodedCertificate property: Base64 encoded PEM (Privacy Enhanced Mail) format certificate data. + * + * @return the encodedCertificate value. + */ + public String encodedCertificate() { + return this.encodedCertificate; + } + + /** + * Set the encodedCertificate property: Base64 encoded PEM (Privacy Enhanced Mail) format certificate data. + * + * @param encodedCertificate the encodedCertificate value to set. + * @return the CaCertificateProperties object itself. + */ + public CaCertificateProperties withEncodedCertificate(String encodedCertificate) { + this.encodedCertificate = encodedCertificate; + return this; + } + + /** + * Get the issueTimeInUtc property: Certificate issue time in UTC. This is a read-only field. + * + * @return the issueTimeInUtc value. + */ + public OffsetDateTime issueTimeInUtc() { + return this.issueTimeInUtc; + } + + /** + * Get the expiryTimeInUtc property: Certificate expiry time in UTC. This is a read-only field. + * + * @return the expiryTimeInUtc value. + */ + public OffsetDateTime expiryTimeInUtc() { + return this.expiryTimeInUtc; + } + + /** + * Get the provisioningState property: Provisioning state of the CA Certificate resource. + * + * @return the provisioningState value. + */ + public CaCertificateProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelInner.java index 9aca46b86fc1..fdb411501a84 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelInner.java @@ -9,6 +9,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; import com.azure.resourcemanager.eventgrid.models.ChannelType; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; import com.azure.resourcemanager.eventgrid.models.ReadinessState; import com.fasterxml.jackson.annotation.JsonProperty; @@ -29,6 +30,10 @@ public final class ChannelInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of ChannelInner class. */ + public ChannelInner() { + } + /** * Get the innerProperties property: Properties of the Channel. * @@ -95,6 +100,31 @@ public ChannelInner withPartnerTopicInfo(PartnerTopicInfo partnerTopicInfo) { return this; } + /** + * Get the partnerDestinationInfo property: This property should be populated when channelType is PartnerDestination + * and represents information about the partner destination resource corresponding to the channel. + * + * @return the partnerDestinationInfo value. + */ + public PartnerDestinationInfo partnerDestinationInfo() { + return this.innerProperties() == null ? null : this.innerProperties().partnerDestinationInfo(); + } + + /** + * Set the partnerDestinationInfo property: This property should be populated when channelType is PartnerDestination + * and represents information about the partner destination resource corresponding to the channel. + * + * @param partnerDestinationInfo the partnerDestinationInfo value to set. + * @return the ChannelInner object itself. + */ + public ChannelInner withPartnerDestinationInfo(PartnerDestinationInfo partnerDestinationInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new ChannelProperties(); + } + this.innerProperties().withPartnerDestinationInfo(partnerDestinationInfo); + return this; + } + /** * Get the messageForActivation property: Context or helpful message that can be used during the approval process by * the subscriber. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelProperties.java index 5255c7b5d0ab..947429462957 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelProperties.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; import com.azure.resourcemanager.eventgrid.models.ChannelType; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; import com.azure.resourcemanager.eventgrid.models.ReadinessState; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,23 +17,27 @@ @Fluent public final class ChannelProperties { /* - * The type of the event channel which represents the direction flow of - * events. + * The type of the event channel which represents the direction flow of events. */ @JsonProperty(value = "channelType") private ChannelType channelType; /* - * This property should be populated when channelType is PartnerTopic and - * represents information about the partner topic resource corresponding to - * the channel. + * This property should be populated when channelType is PartnerTopic and represents information about the partner + * topic resource corresponding to the channel. */ @JsonProperty(value = "partnerTopicInfo") private PartnerTopicInfo partnerTopicInfo; /* - * Context or helpful message that can be used during the approval process - * by the subscriber. + * This property should be populated when channelType is PartnerDestination and represents information about the + * partner destination resource corresponding to the channel. + */ + @JsonProperty(value = "partnerDestinationInfo") + private PartnerDestinationInfo partnerDestinationInfo; + + /* + * Context or helpful message that can be used during the approval process by the subscriber. */ @JsonProperty(value = "messageForActivation") private String messageForActivation; @@ -50,13 +55,16 @@ public final class ChannelProperties { private ReadinessState readinessState; /* - * Expiration time of the channel. If this timer expires while the - * corresponding partner topic is never activated, + * Expiration time of the channel. If this timer expires while the corresponding partner topic is never activated, * the channel and corresponding partner topic are deleted. */ @JsonProperty(value = "expirationTimeIfNotActivatedUtc") private OffsetDateTime expirationTimeIfNotActivatedUtc; + /** Creates an instance of ChannelProperties class. */ + public ChannelProperties() { + } + /** * Get the channelType property: The type of the event channel which represents the direction flow of events. * @@ -99,6 +107,28 @@ public ChannelProperties withPartnerTopicInfo(PartnerTopicInfo partnerTopicInfo) return this; } + /** + * Get the partnerDestinationInfo property: This property should be populated when channelType is PartnerDestination + * and represents information about the partner destination resource corresponding to the channel. + * + * @return the partnerDestinationInfo value. + */ + public PartnerDestinationInfo partnerDestinationInfo() { + return this.partnerDestinationInfo; + } + + /** + * Set the partnerDestinationInfo property: This property should be populated when channelType is PartnerDestination + * and represents information about the partner destination resource corresponding to the channel. + * + * @param partnerDestinationInfo the partnerDestinationInfo value to set. + * @return the ChannelProperties object itself. + */ + public ChannelProperties withPartnerDestinationInfo(PartnerDestinationInfo partnerDestinationInfo) { + this.partnerDestinationInfo = partnerDestinationInfo; + return this; + } + /** * Get the messageForActivation property: Context or helpful message that can be used during the approval process by * the subscriber. @@ -192,5 +222,8 @@ public void validate() { if (partnerTopicInfo() != null) { partnerTopicInfo().validate(); } + if (partnerDestinationInfo() != null) { + partnerDestinationInfo().validate(); + } } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelUpdateParametersProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelUpdateParametersProperties.java index 30353f800df2..2a6ea3f58381 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelUpdateParametersProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ChannelUpdateParametersProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.eventgrid.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.PartnerUpdateDestinationInfo; import com.azure.resourcemanager.eventgrid.models.PartnerUpdateTopicInfo; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -13,21 +14,29 @@ @Fluent public final class ChannelUpdateParametersProperties { /* - * Expiration time of the channel. If this timer expires while the - * corresponding partner topic or partner destination is never activated, - * the channel and corresponding partner topic or partner destination are - * deleted. + * Expiration time of the channel. If this timer expires while the corresponding partner topic or partner + * destination is never activated, + * the channel and corresponding partner topic or partner destination are deleted. */ @JsonProperty(value = "expirationTimeIfNotActivatedUtc") private OffsetDateTime expirationTimeIfNotActivatedUtc; /* - * Partner topic properties which can be updated if the channel is of type - * PartnerTopic. + * Partner destination properties which can be updated if the channel is of type PartnerDestination. + */ + @JsonProperty(value = "partnerDestinationInfo") + private PartnerUpdateDestinationInfo partnerDestinationInfo; + + /* + * Partner topic properties which can be updated if the channel is of type PartnerTopic. */ @JsonProperty(value = "partnerTopicInfo") private PartnerUpdateTopicInfo partnerTopicInfo; + /** Creates an instance of ChannelUpdateParametersProperties class. */ + public ChannelUpdateParametersProperties() { + } + /** * Get the expirationTimeIfNotActivatedUtc property: Expiration time of the channel. If this timer expires while the * corresponding partner topic or partner destination is never activated, the channel and corresponding partner @@ -53,6 +62,29 @@ public ChannelUpdateParametersProperties withExpirationTimeIfNotActivatedUtc( return this; } + /** + * Get the partnerDestinationInfo property: Partner destination properties which can be updated if the channel is of + * type PartnerDestination. + * + * @return the partnerDestinationInfo value. + */ + public PartnerUpdateDestinationInfo partnerDestinationInfo() { + return this.partnerDestinationInfo; + } + + /** + * Set the partnerDestinationInfo property: Partner destination properties which can be updated if the channel is of + * type PartnerDestination. + * + * @param partnerDestinationInfo the partnerDestinationInfo value to set. + * @return the ChannelUpdateParametersProperties object itself. + */ + public ChannelUpdateParametersProperties withPartnerDestinationInfo( + PartnerUpdateDestinationInfo partnerDestinationInfo) { + this.partnerDestinationInfo = partnerDestinationInfo; + return this; + } + /** * Get the partnerTopicInfo property: Partner topic properties which can be updated if the channel is of type * PartnerTopic. @@ -81,6 +113,9 @@ public ChannelUpdateParametersProperties withPartnerTopicInfo(PartnerUpdateTopic * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (partnerDestinationInfo() != null) { + partnerDestinationInfo().validate(); + } if (partnerTopicInfo() != null) { partnerTopicInfo().validate(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupInner.java new file mode 100644 index 000000000000..598e7e47f27e --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupInner.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.eventgrid.models.ClientGroupProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Client group resource. */ +@Fluent +public final class ClientGroupInner extends ProxyResource { + /* + * The properties of client group. + */ + @JsonProperty(value = "properties") + private ClientGroupProperties innerProperties; + + /* + * The system metadata relating to the ClientGroup resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ClientGroupInner class. */ + public ClientGroupInner() { + } + + /** + * Get the innerProperties property: The properties of client group. + * + * @return the innerProperties value. + */ + private ClientGroupProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: The system metadata relating to the ClientGroup resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the description property: Description for the Client Group resource. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Description for the Client Group resource. + * + * @param description the description value to set. + * @return the ClientGroupInner object itself. + */ + public ClientGroupInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new ClientGroupProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the query property: The grouping query for the clients. Example : attributes.keyName IN ['a', 'b', 'c']. + * + * @return the query value. + */ + public String query() { + return this.innerProperties() == null ? null : this.innerProperties().query(); + } + + /** + * Set the query property: The grouping query for the clients. Example : attributes.keyName IN ['a', 'b', 'c']. + * + * @param query the query value to set. + * @return the ClientGroupInner object itself. + */ + public ClientGroupInner withQuery(String query) { + if (this.innerProperties() == null) { + this.innerProperties = new ClientGroupProperties(); + } + this.innerProperties().withQuery(query); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the ClientGroup resource. + * + * @return the provisioningState value. + */ + public ClientGroupProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupProperties.java new file mode 100644 index 000000000000..2a907aa34369 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientGroupProperties.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.ClientGroupProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of client group. */ +@Fluent +public final class ClientGroupProperties { + /* + * Description for the Client Group resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The grouping query for the clients. + * Example : attributes.keyName IN ['a', 'b', 'c']. + */ + @JsonProperty(value = "query") + private String query; + + /* + * Provisioning state of the ClientGroup resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ClientGroupProvisioningState provisioningState; + + /** Creates an instance of ClientGroupProperties class. */ + public ClientGroupProperties() { + } + + /** + * Get the description property: Description for the Client Group resource. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description for the Client Group resource. + * + * @param description the description value to set. + * @return the ClientGroupProperties object itself. + */ + public ClientGroupProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the query property: The grouping query for the clients. Example : attributes.keyName IN ['a', 'b', 'c']. + * + * @return the query value. + */ + public String query() { + return this.query; + } + + /** + * Set the query property: The grouping query for the clients. Example : attributes.keyName IN ['a', 'b', 'c']. + * + * @param query the query value to set. + * @return the ClientGroupProperties object itself. + */ + public ClientGroupProperties withQuery(String query) { + this.query = query; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the ClientGroup resource. + * + * @return the provisioningState value. + */ + public ClientGroupProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientInner.java new file mode 100644 index 000000000000..b77fd5146184 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientInner.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.eventgrid.models.ClientAuthentication; +import com.azure.resourcemanager.eventgrid.models.ClientCertificateAuthentication; +import com.azure.resourcemanager.eventgrid.models.ClientProvisioningState; +import com.azure.resourcemanager.eventgrid.models.ClientState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The Client resource. */ +@Fluent +public final class ClientInner extends ProxyResource { + /* + * The properties of client. + */ + @JsonProperty(value = "properties") + private ClientProperties innerProperties; + + /* + * The system metadata relating to the Client resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ClientInner class. */ + public ClientInner() { + } + + /** + * Get the innerProperties property: The properties of client. + * + * @return the innerProperties value. + */ + private ClientProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: The system metadata relating to the Client resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the description property: Description for the Client resource. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Description for the Client resource. + * + * @param description the description value to set. + * @return the ClientInner object itself. + */ + public ClientInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new ClientProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the authenticationName property: The name presented by the client for authentication. The default value is + * the name of the resource. + * + * @return the authenticationName value. + */ + public String authenticationName() { + return this.innerProperties() == null ? null : this.innerProperties().authenticationName(); + } + + /** + * Set the authenticationName property: The name presented by the client for authentication. The default value is + * the name of the resource. + * + * @param authenticationName the authenticationName value to set. + * @return the ClientInner object itself. + */ + public ClientInner withAuthenticationName(String authenticationName) { + if (this.innerProperties() == null) { + this.innerProperties = new ClientProperties(); + } + this.innerProperties().withAuthenticationName(authenticationName); + return this; + } + + /** + * Get the authentication property: Authentication information for the client. + * + * @return the authentication value. + */ + public ClientAuthentication authentication() { + return this.innerProperties() == null ? null : this.innerProperties().authentication(); + } + + /** + * Set the authentication property: Authentication information for the client. + * + * @param authentication the authentication value to set. + * @return the ClientInner object itself. + */ + public ClientInner withAuthentication(ClientAuthentication authentication) { + if (this.innerProperties() == null) { + this.innerProperties = new ClientProperties(); + } + this.innerProperties().withAuthentication(authentication); + return this; + } + + /** + * Get the clientCertificateAuthentication property: The client certificate authentication information. + * + * @return the clientCertificateAuthentication value. + */ + public ClientCertificateAuthentication clientCertificateAuthentication() { + return this.innerProperties() == null ? null : this.innerProperties().clientCertificateAuthentication(); + } + + /** + * Set the clientCertificateAuthentication property: The client certificate authentication information. + * + * @param clientCertificateAuthentication the clientCertificateAuthentication value to set. + * @return the ClientInner object itself. + */ + public ClientInner withClientCertificateAuthentication( + ClientCertificateAuthentication clientCertificateAuthentication) { + if (this.innerProperties() == null) { + this.innerProperties = new ClientProperties(); + } + this.innerProperties().withClientCertificateAuthentication(clientCertificateAuthentication); + return this; + } + + /** + * Get the state property: Indicates if the client is enabled or not. Default value is Enabled. + * + * @return the state value. + */ + public ClientState state() { + return this.innerProperties() == null ? null : this.innerProperties().state(); + } + + /** + * Set the state property: Indicates if the client is enabled or not. Default value is Enabled. + * + * @param state the state value to set. + * @return the ClientInner object itself. + */ + public ClientInner withState(ClientState state) { + if (this.innerProperties() == null) { + this.innerProperties = new ClientProperties(); + } + this.innerProperties().withState(state); + return this; + } + + /** + * Get the attributes property: Attributes for the client. Supported values are int, bool, string, string[]. + * Example: "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }. + * + * @return the attributes value. + */ + public Map attributes() { + return this.innerProperties() == null ? null : this.innerProperties().attributes(); + } + + /** + * Set the attributes property: Attributes for the client. Supported values are int, bool, string, string[]. + * Example: "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }. + * + * @param attributes the attributes value to set. + * @return the ClientInner object itself. + */ + public ClientInner withAttributes(Map attributes) { + if (this.innerProperties() == null) { + this.innerProperties = new ClientProperties(); + } + this.innerProperties().withAttributes(attributes); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Client resource. + * + * @return the provisioningState value. + */ + public ClientProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientProperties.java new file mode 100644 index 000000000000..b7b39fce8fda --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ClientProperties.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.ClientAuthentication; +import com.azure.resourcemanager.eventgrid.models.ClientCertificateAuthentication; +import com.azure.resourcemanager.eventgrid.models.ClientProvisioningState; +import com.azure.resourcemanager.eventgrid.models.ClientState; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The properties of client. */ +@Fluent +public final class ClientProperties { + /* + * Description for the Client resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The name presented by the client for authentication. The default value is the name of the resource. + */ + @JsonProperty(value = "authenticationName") + private String authenticationName; + + /* + * Authentication information for the client. + */ + @JsonProperty(value = "authentication") + private ClientAuthentication authentication; + + /* + * The client certificate authentication information. + */ + @JsonProperty(value = "clientCertificateAuthentication") + private ClientCertificateAuthentication clientCertificateAuthentication; + + /* + * Indicates if the client is enabled or not. Default value is Enabled. + */ + @JsonProperty(value = "state") + private ClientState state; + + /* + * Attributes for the client. Supported values are int, bool, string, string[]. + * Example: + * "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] } + */ + @JsonProperty(value = "attributes") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map attributes; + + /* + * Provisioning state of the Client resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ClientProvisioningState provisioningState; + + /** Creates an instance of ClientProperties class. */ + public ClientProperties() { + } + + /** + * Get the description property: Description for the Client resource. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description for the Client resource. + * + * @param description the description value to set. + * @return the ClientProperties object itself. + */ + public ClientProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the authenticationName property: The name presented by the client for authentication. The default value is + * the name of the resource. + * + * @return the authenticationName value. + */ + public String authenticationName() { + return this.authenticationName; + } + + /** + * Set the authenticationName property: The name presented by the client for authentication. The default value is + * the name of the resource. + * + * @param authenticationName the authenticationName value to set. + * @return the ClientProperties object itself. + */ + public ClientProperties withAuthenticationName(String authenticationName) { + this.authenticationName = authenticationName; + return this; + } + + /** + * Get the authentication property: Authentication information for the client. + * + * @return the authentication value. + */ + public ClientAuthentication authentication() { + return this.authentication; + } + + /** + * Set the authentication property: Authentication information for the client. + * + * @param authentication the authentication value to set. + * @return the ClientProperties object itself. + */ + public ClientProperties withAuthentication(ClientAuthentication authentication) { + this.authentication = authentication; + return this; + } + + /** + * Get the clientCertificateAuthentication property: The client certificate authentication information. + * + * @return the clientCertificateAuthentication value. + */ + public ClientCertificateAuthentication clientCertificateAuthentication() { + return this.clientCertificateAuthentication; + } + + /** + * Set the clientCertificateAuthentication property: The client certificate authentication information. + * + * @param clientCertificateAuthentication the clientCertificateAuthentication value to set. + * @return the ClientProperties object itself. + */ + public ClientProperties withClientCertificateAuthentication( + ClientCertificateAuthentication clientCertificateAuthentication) { + this.clientCertificateAuthentication = clientCertificateAuthentication; + return this; + } + + /** + * Get the state property: Indicates if the client is enabled or not. Default value is Enabled. + * + * @return the state value. + */ + public ClientState state() { + return this.state; + } + + /** + * Set the state property: Indicates if the client is enabled or not. Default value is Enabled. + * + * @param state the state value to set. + * @return the ClientProperties object itself. + */ + public ClientProperties withState(ClientState state) { + this.state = state; + return this; + } + + /** + * Get the attributes property: Attributes for the client. Supported values are int, bool, string, string[]. + * Example: "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }. + * + * @return the attributes value. + */ + public Map attributes() { + return this.attributes; + } + + /** + * Set the attributes property: Attributes for the client. Supported values are int, bool, string, string[]. + * Example: "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }. + * + * @param attributes the attributes value to set. + * @return the ClientProperties object itself. + */ + public ClientProperties withAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Client resource. + * + * @return the provisioningState value. + */ + public ClientProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (authentication() != null) { + authentication().validate(); + } + if (clientCertificateAuthentication() != null) { + clientCertificateAuthentication().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DeliveryAttributeListResultInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DeliveryAttributeListResultInner.java index b69af5574dfc..875ca4a71738 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DeliveryAttributeListResultInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DeliveryAttributeListResultInner.java @@ -18,6 +18,10 @@ public final class DeliveryAttributeListResultInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of DeliveryAttributeListResultInner class. */ + public DeliveryAttributeListResultInner() { + } + /** * Get the value property: A collection of DeliveryAttributeMapping. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainInner.java index aca87700559f..d16ebb541e6d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainInner.java @@ -9,11 +9,14 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; import com.azure.resourcemanager.eventgrid.models.DomainProvisioningState; +import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; import com.azure.resourcemanager.eventgrid.models.IdentityInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.ResourceSku; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -28,10 +31,10 @@ public final class DomainInner extends Resource { private DomainProperties innerProperties; /* - * The system metadata relating to the Event Grid Domain resource. + * The Sku pricing tier for the Event Grid Domain resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; + @JsonProperty(value = "sku") + private ResourceSku sku; /* * Identity information for the Event Grid Domain resource. @@ -39,6 +42,16 @@ public final class DomainInner extends Resource { @JsonProperty(value = "identity") private IdentityInfo identity; + /* + * The system metadata relating to the Event Grid Domain resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of DomainInner class. */ + public DomainInner() { + } + /** * Get the innerProperties property: Properties of the Event Grid Domain resource. * @@ -49,12 +62,23 @@ private DomainProperties innerProperties() { } /** - * Get the systemData property: The system metadata relating to the Event Grid Domain resource. + * Get the sku property: The Sku pricing tier for the Event Grid Domain resource. * - * @return the systemData value. + * @return the sku value. */ - public SystemData systemData() { - return this.systemData; + public ResourceSku sku() { + return this.sku; + } + + /** + * Set the sku property: The Sku pricing tier for the Event Grid Domain resource. + * + * @param sku the sku value to set. + * @return the DomainInner object itself. + */ + public DomainInner withSku(ResourceSku sku) { + this.sku = sku; + return this; } /** @@ -77,6 +101,15 @@ public DomainInner withIdentity(IdentityInfo identity) { return this; } + /** + * Get the systemData property: The system metadata relating to the Event Grid Domain resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** {@inheritDoc} */ @Override public DomainInner withLocation(String location) { @@ -92,7 +125,7 @@ public DomainInner withTags(Map tags) { } /** - * Get the privateEndpointConnections property: List of private endpoint connections. + * Get the privateEndpointConnections property: The privateEndpointConnections property. * * @return the privateEndpointConnections value. */ @@ -109,6 +142,31 @@ public DomainProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.innerProperties() == null ? null : this.innerProperties().minimumTlsVersionAllowed(); + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the DomainInner object itself. + */ + public DomainInner withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + /** * Get the endpoint property: Endpoint for the Event Grid Domain Resource which is used for publishing the events. * @@ -143,6 +201,31 @@ public DomainInner withInputSchema(InputSchema inputSchema) { return this; } + /** + * Get the eventTypeInfo property: Event Type Information for the domain. This information is provided by the + * publisher and can be used by the subscriber to view different types of events that are published. + * + * @return the eventTypeInfo value. + */ + public EventTypeInfo eventTypeInfo() { + return this.innerProperties() == null ? null : this.innerProperties().eventTypeInfo(); + } + + /** + * Set the eventTypeInfo property: Event Type Information for the domain. This information is provided by the + * publisher and can be used by the subscriber to view different types of events that are published. + * + * @param eventTypeInfo the eventTypeInfo value to set. + * @return the DomainInner object itself. + */ + public DomainInner withEventTypeInfo(EventTypeInfo eventTypeInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withEventTypeInfo(eventTypeInfo); + return this; + } + /** * Get the inputSchemaMapping property: Information about the InputSchemaMapping which specified the info about * mapping event payload. @@ -366,6 +449,9 @@ public void validate() { if (innerProperties() != null) { innerProperties().validate(); } + if (sku() != null) { + sku().validate(); + } if (identity() != null) { identity().validate(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainProperties.java index 3deb9254648b..790620a8ae10 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainProperties.java @@ -7,10 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; import com.azure.resourcemanager.eventgrid.models.DomainProvisioningState; +import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -18,7 +20,7 @@ @Fluent public final class DomainProperties { /* - * List of private endpoint connections. + * The privateEndpointConnections property. */ @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; @@ -30,22 +32,33 @@ public final class DomainProperties { private DomainProvisioningState provisioningState; /* - * Endpoint for the Event Grid Domain Resource which is used for publishing - * the events. + * Minimum TLS version of the publisher allowed to publish to this domain + */ + @JsonProperty(value = "minimumTlsVersionAllowed") + private TlsVersion minimumTlsVersionAllowed; + + /* + * Endpoint for the Event Grid Domain Resource which is used for publishing the events. */ @JsonProperty(value = "endpoint", access = JsonProperty.Access.WRITE_ONLY) private String endpoint; /* - * This determines the format that Event Grid should expect for incoming - * events published to the Event Grid Domain Resource. + * This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain + * Resource. */ @JsonProperty(value = "inputSchema") private InputSchema inputSchema; /* - * Information about the InputSchemaMapping which specified the info about - * mapping event payload. + * Event Type Information for the domain. This information is provided by the publisher and can be used by the + * subscriber to view different types of events that are published. + */ + @JsonProperty(value = "eventTypeInfo") + private EventTypeInfo eventTypeInfo; + + /* + * Information about the InputSchemaMapping which specified the info about mapping event payload. */ @JsonProperty(value = "inputSchemaMapping") private InputSchemaMapping inputSchemaMapping; @@ -57,73 +70,58 @@ public final class DomainProperties { private String metricResourceId; /* - * This determines if traffic is allowed over public network. By default it - * is enabled. + * This determines if traffic is allowed over public network. By default it is enabled. * You can further restrict to specific IPs by configuring + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.DomainProperties.InboundIpRules" /> */ @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all - * IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* - * This boolean is used to enable or disable local auth. Default value is - * false. When the property is set to true, only AAD token will be used to - * authenticate if user is allowed to publish to the domain. + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the domain. */ @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; /* - * This Boolean is used to specify the creation mechanism for 'all' the - * Event Grid Domain Topics associated with this Event Grid Domain - * resource. - * In this context, creation of domain topic can be auto-managed (when - * true) or self-managed (when false). The default value for this property - * is true. - * When this property is null or set to true, Event Grid is responsible of - * automatically creating the domain topic when the first event - * subscription is - * created at the scope of the domain topic. If this property is set to - * false, then creating the first event subscription will require creating - * a domain topic - * by the user. The self-management mode can be used if the user wants full - * control of when the domain topic is created, while auto-managed mode - * provides the - * flexibility to perform less operations and manage fewer resources by the - * user. Also, note that in auto-managed creation mode, user is allowed to - * create the + * This Boolean is used to specify the creation mechanism for 'all' the Event Grid Domain Topics associated with + * this Event Grid Domain resource. + * In this context, creation of domain topic can be auto-managed (when true) or self-managed (when false). The + * default value for this property is true. + * When this property is null or set to true, Event Grid is responsible of automatically creating the domain topic + * when the first event subscription is + * created at the scope of the domain topic. If this property is set to false, then creating the first event + * subscription will require creating a domain topic + * by the user. The self-management mode can be used if the user wants full control of when the domain topic is + * created, while auto-managed mode provides the + * flexibility to perform less operations and manage fewer resources by the user. Also, note that in auto-managed + * creation mode, user is allowed to create the * domain topic on demand if needed. */ @JsonProperty(value = "autoCreateTopicWithFirstSubscription") private Boolean autoCreateTopicWithFirstSubscription; /* - * This Boolean is used to specify the deletion mechanism for 'all' the - * Event Grid Domain Topics associated with this Event Grid Domain - * resource. - * In this context, deletion of domain topic can be auto-managed (when - * true) or self-managed (when false). The default value for this property - * is true. - * When this property is set to true, Event Grid is responsible of - * automatically deleting the domain topic when the last event subscription - * at the scope - * of the domain topic is deleted. If this property is set to false, then - * the user needs to manually delete the domain topic when it is no longer - * needed - * (e.g., when last event subscription is deleted and the resource needs to - * be cleaned up). The self-management mode can be used if the user wants - * full - * control of when the domain topic needs to be deleted, while auto-managed - * mode provides the flexibility to perform less operations and manage - * fewer + * This Boolean is used to specify the deletion mechanism for 'all' the Event Grid Domain Topics associated with + * this Event Grid Domain resource. + * In this context, deletion of domain topic can be auto-managed (when true) or self-managed (when false). The + * default value for this property is true. + * When this property is set to true, Event Grid is responsible of automatically deleting the domain topic when the + * last event subscription at the scope + * of the domain topic is deleted. If this property is set to false, then the user needs to manually delete the + * domain topic when it is no longer needed + * (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The self-management + * mode can be used if the user wants full + * control of when the domain topic needs to be deleted, while auto-managed mode provides the flexibility to + * perform less operations and manage fewer * resources by the user. */ @JsonProperty(value = "autoDeleteTopicWithLastSubscription") @@ -135,8 +133,12 @@ public final class DomainProperties { @JsonProperty(value = "dataResidencyBoundary") private DataResidencyBoundary dataResidencyBoundary; + /** Creates an instance of DomainProperties class. */ + public DomainProperties() { + } + /** - * Get the privateEndpointConnections property: List of private endpoint connections. + * Get the privateEndpointConnections property: The privateEndpointConnections property. * * @return the privateEndpointConnections value. */ @@ -153,6 +155,28 @@ public DomainProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.minimumTlsVersionAllowed; + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + this.minimumTlsVersionAllowed = minimumTlsVersionAllowed; + return this; + } + /** * Get the endpoint property: Endpoint for the Event Grid Domain Resource which is used for publishing the events. * @@ -184,6 +208,28 @@ public DomainProperties withInputSchema(InputSchema inputSchema) { return this; } + /** + * Get the eventTypeInfo property: Event Type Information for the domain. This information is provided by the + * publisher and can be used by the subscriber to view different types of events that are published. + * + * @return the eventTypeInfo value. + */ + public EventTypeInfo eventTypeInfo() { + return this.eventTypeInfo; + } + + /** + * Set the eventTypeInfo property: Event Type Information for the domain. This information is provided by the + * publisher and can be used by the subscriber to view different types of events that are published. + * + * @param eventTypeInfo the eventTypeInfo value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withEventTypeInfo(EventTypeInfo eventTypeInfo) { + this.eventTypeInfo = eventTypeInfo; + return this; + } + /** * Get the inputSchemaMapping property: Information about the InputSchemaMapping which specified the info about * mapping event payload. @@ -386,6 +432,9 @@ public void validate() { if (privateEndpointConnections() != null) { privateEndpointConnections().forEach(e -> e.validate()); } + if (eventTypeInfo() != null) { + eventTypeInfo().validate(); + } if (inputSchemaMapping() != null) { inputSchemaMapping().validate(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainSharedAccessKeysInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainSharedAccessKeysInner.java index 483efe166551..9e0058e3b720 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainSharedAccessKeysInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainSharedAccessKeysInner.java @@ -22,6 +22,10 @@ public final class DomainSharedAccessKeysInner { @JsonProperty(value = "key2") private String key2; + /** Creates an instance of DomainSharedAccessKeysInner class. */ + public DomainSharedAccessKeysInner() { + } + /** * Get the key1 property: Shared access key1 for the domain. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicInner.java index 1298dbff386b..b8c341efd12a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicInner.java @@ -25,6 +25,10 @@ public final class DomainTopicInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of DomainTopicInner class. */ + public DomainTopicInner() { + } + /** * Get the innerProperties property: Properties of the Domain Topic. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicProperties.java index 70008ce03045..ed668d1d9547 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainTopicProperties.java @@ -17,6 +17,10 @@ public final class DomainTopicProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private DomainTopicProvisioningState provisioningState; + /** Creates an instance of DomainTopicProperties class. */ + public DomainTopicProperties() { + } + /** * Get the provisioningState property: Provisioning state of the domain topic. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainUpdateParameterProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainUpdateParameterProperties.java index 60ab0b1828e3..6fad9243cf34 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainUpdateParameterProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DomainUpdateParameterProperties.java @@ -6,8 +6,10 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; +import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -15,8 +17,7 @@ @Fluent public final class DomainUpdateParameterProperties { /* - * This determines if traffic is allowed over public network. By default it - * is enabled. + * This determines if traffic is allowed over public network. By default it is enabled. * You can further restrict to specific IPs by configuring @@ -25,63 +26,56 @@ public final class DomainUpdateParameterProperties { private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all - * IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* - * This boolean is used to enable or disable local auth. Default value is - * false. When the property is set to true, only AAD token will be used to - * authenticate if user is allowed to publish to the domain. + * Minimum TLS version of the publisher allowed to publish to this domain + */ + @JsonProperty(value = "minimumTlsVersionAllowed") + private TlsVersion minimumTlsVersionAllowed; + + /* + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the domain. */ @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; /* - * This Boolean is used to specify the creation mechanism for 'all' the - * Event Grid Domain Topics associated with this Event Grid Domain - * resource. - * In this context, creation of domain topic can be auto-managed (when - * true) or self-managed (when false). The default value for this property - * is true. - * When this property is null or set to true, Event Grid is responsible of - * automatically creating the domain topic when the first event - * subscription is - * created at the scope of the domain topic. If this property is set to - * false, then creating the first event subscription will require creating - * a domain topic - * by the user. The self-management mode can be used if the user wants full - * control of when the domain topic is created, while auto-managed mode - * provides the - * flexibility to perform less operations and manage fewer resources by the - * user. Also, note that in auto-managed creation mode, user is allowed to - * create the + * This Boolean is used to specify the creation mechanism for 'all' the Event Grid Domain Topics associated with + * this Event Grid Domain resource. + * In this context, creation of domain topic can be auto-managed (when true) or self-managed (when false). The + * default value for this property is true. + * When this property is null or set to true, Event Grid is responsible of automatically creating the domain topic + * when the first event subscription is + * created at the scope of the domain topic. If this property is set to false, then creating the first event + * subscription will require creating a domain topic + * by the user. The self-management mode can be used if the user wants full control of when the domain topic is + * created, while auto-managed mode provides the + * flexibility to perform less operations and manage fewer resources by the user. Also, note that in auto-managed + * creation mode, user is allowed to create the * domain topic on demand if needed. */ @JsonProperty(value = "autoCreateTopicWithFirstSubscription") private Boolean autoCreateTopicWithFirstSubscription; /* - * This Boolean is used to specify the deletion mechanism for 'all' the - * Event Grid Domain Topics associated with this Event Grid Domain - * resource. - * In this context, deletion of domain topic can be auto-managed (when - * true) or self-managed (when false). The default value for this property - * is true. - * When this property is set to true, Event Grid is responsible of - * automatically deleting the domain topic when the last event subscription - * at the scope - * of the domain topic is deleted. If this property is set to false, then - * the user needs to manually delete the domain topic when it is no longer - * needed - * (e.g., when last event subscription is deleted and the resource needs to - * be cleaned up). The self-management mode can be used if the user wants - * full - * control of when the domain topic needs to be deleted, while auto-managed - * mode provides the flexibility to perform less operations and manage - * fewer + * This Boolean is used to specify the deletion mechanism for 'all' the Event Grid Domain Topics associated with + * this Event Grid Domain resource. + * In this context, deletion of domain topic can be auto-managed (when true) or self-managed (when false). The + * default value for this property is true. + * When this property is set to true, Event Grid is responsible of automatically deleting the domain topic when the + * last event subscription at the scope + * of the domain topic is deleted. If this property is set to false, then the user needs to manually delete the + * domain topic when it is no longer needed + * (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The self-management + * mode can be used if the user wants full + * control of when the domain topic needs to be deleted, while auto-managed mode provides the flexibility to + * perform less operations and manage fewer * resources by the user. */ @JsonProperty(value = "autoDeleteTopicWithLastSubscription") @@ -93,6 +87,16 @@ public final class DomainUpdateParameterProperties { @JsonProperty(value = "dataResidencyBoundary") private DataResidencyBoundary dataResidencyBoundary; + /* + * The eventTypeInfo for the domain. + */ + @JsonProperty(value = "eventTypeInfo") + private EventTypeInfo eventTypeInfo; + + /** Creates an instance of DomainUpdateParameterProperties class. */ + public DomainUpdateParameterProperties() { + } + /** * Get the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso @@ -141,6 +145,28 @@ public DomainUpdateParameterProperties withInboundIpRules(List in return this; } + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.minimumTlsVersionAllowed; + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the DomainUpdateParameterProperties object itself. + */ + public DomainUpdateParameterProperties withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + this.minimumTlsVersionAllowed = minimumTlsVersionAllowed; + return this; + } + /** * Get the disableLocalAuth property: This boolean is used to enable or disable local auth. Default value is false. * When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to @@ -259,6 +285,26 @@ public DomainUpdateParameterProperties withDataResidencyBoundary(DataResidencyBo return this; } + /** + * Get the eventTypeInfo property: The eventTypeInfo for the domain. + * + * @return the eventTypeInfo value. + */ + public EventTypeInfo eventTypeInfo() { + return this.eventTypeInfo; + } + + /** + * Set the eventTypeInfo property: The eventTypeInfo for the domain. + * + * @param eventTypeInfo the eventTypeInfo value to set. + * @return the DomainUpdateParameterProperties object itself. + */ + public DomainUpdateParameterProperties withEventTypeInfo(EventTypeInfo eventTypeInfo) { + this.eventTypeInfo = eventTypeInfo; + return this; + } + /** * Validates the instance. * @@ -268,5 +314,8 @@ public void validate() { if (inboundIpRules() != null) { inboundIpRules().forEach(e -> e.validate()); } + if (eventTypeInfo() != null) { + eventTypeInfo().validate(); + } } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DynamicDeliveryAttributeMappingProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DynamicDeliveryAttributeMappingProperties.java index 3abe5bb3307e..58c545eef9f6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DynamicDeliveryAttributeMappingProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/DynamicDeliveryAttributeMappingProperties.java @@ -16,6 +16,10 @@ public final class DynamicDeliveryAttributeMappingProperties { @JsonProperty(value = "sourceField") private String sourceField; + /** Creates an instance of DynamicDeliveryAttributeMappingProperties class. */ + public DynamicDeliveryAttributeMappingProperties() { + } + /** * Get the sourceField property: JSON path in the event which contains attribute value. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventHubEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventHubEventSubscriptionDestinationProperties.java index b8a66d32fa5c..a501939c0118 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventHubEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventHubEventSubscriptionDestinationProperties.java @@ -13,8 +13,7 @@ @Fluent public final class EventHubEventSubscriptionDestinationProperties { /* - * The Azure Resource Id that represents the endpoint of an Event Hub - * destination of an event subscription. + * The Azure Resource Id that represents the endpoint of an Event Hub destination of an event subscription. */ @JsonProperty(value = "resourceId") private String resourceId; @@ -25,6 +24,10 @@ public final class EventHubEventSubscriptionDestinationProperties { @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; + /** Creates an instance of EventHubEventSubscriptionDestinationProperties class. */ + public EventHubEventSubscriptionDestinationProperties() { + } + /** * Get the resourceId property: The Azure Resource Id that represents the endpoint of an Event Hub destination of an * event subscription. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionFullUrlInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionFullUrlInner.java index f9ad1d1b4d5c..a2554a823a55 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionFullUrlInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionFullUrlInner.java @@ -11,12 +11,15 @@ @Fluent public final class EventSubscriptionFullUrlInner { /* - * The URL that represents the endpoint of the destination of an event - * subscription. + * The URL that represents the endpoint of the destination of an event subscription. */ @JsonProperty(value = "endpointUrl") private String endpointUrl; + /** Creates an instance of EventSubscriptionFullUrlInner class. */ + public EventSubscriptionFullUrlInner() { + } + /** * Get the endpointUrl property: The URL that represents the endpoint of the destination of an event subscription. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionInner.java index f30b100ccfc4..d4cf79a0d196 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionInner.java @@ -34,6 +34,10 @@ public final class EventSubscriptionInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of EventSubscriptionInner class. */ + public EventSubscriptionInner() { + } + /** * Get the innerProperties property: Properties of the event subscription. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionProperties.java index ba9514ec17b4..dffcd8c4a416 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventSubscriptionProperties.java @@ -33,20 +33,17 @@ public final class EventSubscriptionProperties { private EventSubscriptionProvisioningState provisioningState; /* - * Information about the destination where events have to be delivered for - * the event subscription. - * Uses Azure Event Grid's identity to acquire the authentication tokens - * being used during delivery / dead-lettering. + * Information about the destination where events have to be delivered for the event subscription. + * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / + * dead-lettering. */ @JsonProperty(value = "destination") private EventSubscriptionDestination destination; /* - * Information about the destination where events have to be delivered for - * the event subscription. - * Uses the managed identity setup on the parent resource (namely, topic or - * domain) to acquire the authentication tokens being used during delivery - * / dead-lettering. + * Information about the destination where events have to be delivered for the event subscription. + * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication + * tokens being used during delivery / dead-lettering. */ @JsonProperty(value = "deliveryWithResourceIdentity") private DeliveryWithResourceIdentity deliveryWithResourceIdentity; @@ -76,33 +73,34 @@ public final class EventSubscriptionProperties { private EventDeliverySchema eventDeliverySchema; /* - * The retry policy for events. This can be used to configure maximum - * number of delivery attempts and time to live for events. + * The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live + * for events. */ @JsonProperty(value = "retryPolicy") private RetryPolicy retryPolicy; /* - * The dead letter destination of the event subscription. Any event that - * cannot be delivered to its' destination is sent to the dead letter - * destination. - * Uses Azure Event Grid's identity to acquire the authentication tokens - * being used during delivery / dead-lettering. + * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is + * sent to the dead letter destination. + * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / + * dead-lettering. */ @JsonProperty(value = "deadLetterDestination") private DeadLetterDestination deadLetterDestination; /* - * The dead letter destination of the event subscription. Any event that - * cannot be delivered to its' destination is sent to the dead letter - * destination. - * Uses the managed identity setup on the parent resource (namely, topic or - * domain) to acquire the authentication tokens being used during delivery - * / dead-lettering. + * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is + * sent to the dead letter destination. + * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication + * tokens being used during delivery / dead-lettering. */ @JsonProperty(value = "deadLetterWithResourceIdentity") private DeadLetterWithResourceIdentity deadLetterWithResourceIdentity; + /** Creates an instance of EventSubscriptionProperties class. */ + public EventSubscriptionProperties() { + } + /** * Get the topic property: Name of the topic of the event subscription. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeInner.java index 491e10879c48..9b21d401dcc4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeInner.java @@ -17,6 +17,10 @@ public final class EventTypeInner extends ProxyResource { @JsonProperty(value = "properties") private EventTypeProperties innerProperties; + /** Creates an instance of EventTypeInner class. */ + public EventTypeInner() { + } + /** * Get the innerProperties property: Properties of the event type. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeProperties.java index 9ecebfa95b37..5b6f323bd7e6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/EventTypeProperties.java @@ -34,6 +34,10 @@ public final class EventTypeProperties { @JsonProperty(value = "isInDefaultSet") private Boolean isInDefaultSet; + /** Creates an instance of EventTypeProperties class. */ + public EventTypeProperties() { + } + /** * Get the displayName property: Display name of the event type. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicInner.java index e01588eb0f0d..9d4d6a7b3381 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicInner.java @@ -13,7 +13,7 @@ @Fluent public final class ExtensionTopicInner extends ProxyResource { /* - * Properties of the extension topic + * Properties of the extension topic. */ @JsonProperty(value = "properties") private ExtensionTopicProperties innerProperties; @@ -24,6 +24,10 @@ public final class ExtensionTopicInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of ExtensionTopicInner class. */ + public ExtensionTopicInner() { + } + /** * Get the innerProperties property: Properties of the extension topic. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicProperties.java index 27a37cea4716..ab4ccd6ff35e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ExtensionTopicProperties.java @@ -22,6 +22,10 @@ public final class ExtensionTopicProperties { @JsonProperty(value = "systemTopic") private String systemTopic; + /** Creates an instance of ExtensionTopicProperties class. */ + public ExtensionTopicProperties() { + } + /** * Get the description property: Description of the extension topic. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/HybridConnectionEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/HybridConnectionEventSubscriptionDestinationProperties.java index c52cb77ec877..8d93c2628fb7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/HybridConnectionEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/HybridConnectionEventSubscriptionDestinationProperties.java @@ -13,8 +13,7 @@ @Fluent public final class HybridConnectionEventSubscriptionDestinationProperties { /* - * The Azure Resource ID of an hybrid connection that is the destination of - * an event subscription. + * The Azure Resource ID of an hybrid connection that is the destination of an event subscription. */ @JsonProperty(value = "resourceId") private String resourceId; @@ -25,6 +24,10 @@ public final class HybridConnectionEventSubscriptionDestinationProperties { @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; + /** Creates an instance of HybridConnectionEventSubscriptionDestinationProperties class. */ + public HybridConnectionEventSubscriptionDestinationProperties() { + } + /** * Get the resourceId property: The Azure Resource ID of an hybrid connection that is the destination of an event * subscription. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/JsonInputSchemaMappingProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/JsonInputSchemaMappingProperties.java index f7eeee6212e7..3e6634f2af97 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/JsonInputSchemaMappingProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/JsonInputSchemaMappingProperties.java @@ -28,33 +28,33 @@ public final class JsonInputSchemaMappingProperties { private JsonField topic; /* - * The mapping information for the EventTime property of the Event Grid - * Event. + * The mapping information for the EventTime property of the Event Grid Event. */ @JsonProperty(value = "eventTime") private JsonField eventTime; /* - * The mapping information for the EventType property of the Event Grid - * Event. + * The mapping information for the EventType property of the Event Grid Event. */ @JsonProperty(value = "eventType") private JsonFieldWithDefault eventType; /* - * The mapping information for the Subject property of the Event Grid - * Event. + * The mapping information for the Subject property of the Event Grid Event. */ @JsonProperty(value = "subject") private JsonFieldWithDefault subject; /* - * The mapping information for the DataVersion property of the Event Grid - * Event. + * The mapping information for the DataVersion property of the Event Grid Event. */ @JsonProperty(value = "dataVersion") private JsonFieldWithDefault dataVersion; + /** Creates an instance of JsonInputSchemaMappingProperties class. */ + public JsonInputSchemaMappingProperties() { + } + /** * Get the id property: The mapping information for the Id property of the Event Grid Event. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceInner.java new file mode 100644 index 000000000000..03ea9bfbf8a0 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceInner.java @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.eventgrid.models.IdentityInfo; +import com.azure.resourcemanager.eventgrid.models.InboundIpRule; +import com.azure.resourcemanager.eventgrid.models.NamespaceProvisioningState; +import com.azure.resourcemanager.eventgrid.models.NamespaceSku; +import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; +import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; +import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Namespace resource. */ +@Fluent +public final class NamespaceInner extends Resource { + /* + * Properties of the Namespace resource. + */ + @JsonProperty(value = "properties") + private NamespaceProperties innerProperties; + + /* + * Represents available Sku pricing tiers. + */ + @JsonProperty(value = "sku") + private NamespaceSku sku; + + /* + * Identity information for the Namespace resource. + */ + @JsonProperty(value = "identity") + private IdentityInfo identity; + + /* + * The system metadata relating to the namespace resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of NamespaceInner class. */ + public NamespaceInner() { + } + + /** + * Get the innerProperties property: Properties of the Namespace resource. + * + * @return the innerProperties value. + */ + private NamespaceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: Represents available Sku pricing tiers. + * + * @return the sku value. + */ + public NamespaceSku sku() { + return this.sku; + } + + /** + * Set the sku property: Represents available Sku pricing tiers. + * + * @param sku the sku value to set. + * @return the NamespaceInner object itself. + */ + public NamespaceInner withSku(NamespaceSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the identity property: Identity information for the Namespace resource. + * + * @return the identity value. + */ + public IdentityInfo identity() { + return this.identity; + } + + /** + * Set the identity property: Identity information for the Namespace resource. + * + * @param identity the identity value to set. + * @return the NamespaceInner object itself. + */ + public NamespaceInner withIdentity(IdentityInfo identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: The system metadata relating to the namespace resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public NamespaceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public NamespaceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the privateEndpointConnections property: The privateEndpointConnections property. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + } + + /** + * Set the privateEndpointConnections property: The privateEndpointConnections property. + * + * @param privateEndpointConnections the privateEndpointConnections value to set. + * @return the NamespaceInner object itself. + */ + public NamespaceInner withPrivateEndpointConnections( + List privateEndpointConnections) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceProperties(); + } + this.innerProperties().withPrivateEndpointConnections(privateEndpointConnections); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the namespace resource. + * + * @return the provisioningState value. + */ + public NamespaceProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the topicsConfiguration property: Topics configuration information for the namespace resource. + * + * @return the topicsConfiguration value. + */ + public TopicsConfiguration topicsConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().topicsConfiguration(); + } + + /** + * Set the topicsConfiguration property: Topics configuration information for the namespace resource. + * + * @param topicsConfiguration the topicsConfiguration value to set. + * @return the NamespaceInner object itself. + */ + public NamespaceInner withTopicsConfiguration(TopicsConfiguration topicsConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceProperties(); + } + this.innerProperties().withTopicsConfiguration(topicsConfiguration); + return this; + } + + /** + * Get the topicSpacesConfiguration property: Topic spaces configuration information for the namespace resource. + * + * @return the topicSpacesConfiguration value. + */ + public TopicSpacesConfiguration topicSpacesConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().topicSpacesConfiguration(); + } + + /** + * Set the topicSpacesConfiguration property: Topic spaces configuration information for the namespace resource. + * + * @param topicSpacesConfiguration the topicSpacesConfiguration value to set. + * @return the NamespaceInner object itself. + */ + public NamespaceInner withTopicSpacesConfiguration(TopicSpacesConfiguration topicSpacesConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceProperties(); + } + this.innerProperties().withTopicSpacesConfiguration(topicSpacesConfiguration); + return this; + } + + /** + * Get the isZoneRedundant property: Allows the user to specify if the service is zone-redundant. This is a required + * property and user needs to specify this value explicitly. Once specified, this property cannot be updated. + * + * @return the isZoneRedundant value. + */ + public Boolean isZoneRedundant() { + return this.innerProperties() == null ? null : this.innerProperties().isZoneRedundant(); + } + + /** + * Set the isZoneRedundant property: Allows the user to specify if the service is zone-redundant. This is a required + * property and user needs to specify this value explicitly. Once specified, this property cannot be updated. + * + * @param isZoneRedundant the isZoneRedundant value to set. + * @return the NamespaceInner object itself. + */ + public NamespaceInner withIsZoneRedundant(Boolean isZoneRedundant) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceProperties(); + } + this.innerProperties().withIsZoneRedundant(isZoneRedundant); + return this; + } + + /** + * Get the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is + * enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceProperties.InboundIpRules" + * />. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is + * enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceProperties.InboundIpRules" + * />. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the NamespaceInner object itself. + */ + public NamespaceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** + * Get the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of all IPs. Note: + * These are considered only if PublicNetworkAccess is enabled. + * + * @return the inboundIpRules value. + */ + public List inboundIpRules() { + return this.innerProperties() == null ? null : this.innerProperties().inboundIpRules(); + } + + /** + * Set the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of all IPs. Note: + * These are considered only if PublicNetworkAccess is enabled. + * + * @param inboundIpRules the inboundIpRules value to set. + * @return the NamespaceInner object itself. + */ + public NamespaceInner withInboundIpRules(List inboundIpRules) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceProperties(); + } + this.innerProperties().withInboundIpRules(inboundIpRules); + return this; + } + + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * namespace. Only TLS version 1.2 is supported. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.innerProperties() == null ? null : this.innerProperties().minimumTlsVersionAllowed(); + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * namespace. Only TLS version 1.2 is supported. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the NamespaceInner object itself. + */ + public NamespaceInner withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceProperties(); + } + this.innerProperties().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (sku() != null) { + sku().validate(); + } + if (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceProperties.java new file mode 100644 index 000000000000..be14b41b7234 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceProperties.java @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.InboundIpRule; +import com.azure.resourcemanager.eventgrid.models.NamespaceProvisioningState; +import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; +import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; +import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of the namespace resource. */ +@Fluent +public final class NamespaceProperties { + /* + * The privateEndpointConnections property. + */ + @JsonProperty(value = "privateEndpointConnections") + private List privateEndpointConnections; + + /* + * Provisioning state of the namespace resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private NamespaceProvisioningState provisioningState; + + /* + * Topics configuration information for the namespace resource + */ + @JsonProperty(value = "topicsConfiguration") + private TopicsConfiguration topicsConfiguration; + + /* + * Topic spaces configuration information for the namespace resource + */ + @JsonProperty(value = "topicSpacesConfiguration") + private TopicSpacesConfiguration topicSpacesConfiguration; + + /* + * Allows the user to specify if the service is zone-redundant. This is a required property and user needs to + * specify this value explicitly. + * Once specified, this property cannot be updated. + */ + @JsonProperty(value = "isZoneRedundant") + private Boolean isZoneRedundant; + + /* + * This determines if traffic is allowed over public network. By default it is enabled. + * You can further restrict to specific IPs by configuring + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /* + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. + */ + @JsonProperty(value = "inboundIpRules") + private List inboundIpRules; + + /* + * Minimum TLS version of the publisher allowed to publish to this namespace. Only TLS version 1.2 is supported. + */ + @JsonProperty(value = "minimumTlsVersionAllowed") + private TlsVersion minimumTlsVersionAllowed; + + /** Creates an instance of NamespaceProperties class. */ + public NamespaceProperties() { + } + + /** + * Get the privateEndpointConnections property: The privateEndpointConnections property. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Set the privateEndpointConnections property: The privateEndpointConnections property. + * + * @param privateEndpointConnections the privateEndpointConnections value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withPrivateEndpointConnections( + List privateEndpointConnections) { + this.privateEndpointConnections = privateEndpointConnections; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the namespace resource. + * + * @return the provisioningState value. + */ + public NamespaceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the topicsConfiguration property: Topics configuration information for the namespace resource. + * + * @return the topicsConfiguration value. + */ + public TopicsConfiguration topicsConfiguration() { + return this.topicsConfiguration; + } + + /** + * Set the topicsConfiguration property: Topics configuration information for the namespace resource. + * + * @param topicsConfiguration the topicsConfiguration value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withTopicsConfiguration(TopicsConfiguration topicsConfiguration) { + this.topicsConfiguration = topicsConfiguration; + return this; + } + + /** + * Get the topicSpacesConfiguration property: Topic spaces configuration information for the namespace resource. + * + * @return the topicSpacesConfiguration value. + */ + public TopicSpacesConfiguration topicSpacesConfiguration() { + return this.topicSpacesConfiguration; + } + + /** + * Set the topicSpacesConfiguration property: Topic spaces configuration information for the namespace resource. + * + * @param topicSpacesConfiguration the topicSpacesConfiguration value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withTopicSpacesConfiguration(TopicSpacesConfiguration topicSpacesConfiguration) { + this.topicSpacesConfiguration = topicSpacesConfiguration; + return this; + } + + /** + * Get the isZoneRedundant property: Allows the user to specify if the service is zone-redundant. This is a required + * property and user needs to specify this value explicitly. Once specified, this property cannot be updated. + * + * @return the isZoneRedundant value. + */ + public Boolean isZoneRedundant() { + return this.isZoneRedundant; + } + + /** + * Set the isZoneRedundant property: Allows the user to specify if the service is zone-redundant. This is a required + * property and user needs to specify this value explicitly. Once specified, this property cannot be updated. + * + * @param isZoneRedundant the isZoneRedundant value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withIsZoneRedundant(Boolean isZoneRedundant) { + this.isZoneRedundant = isZoneRedundant; + return this; + } + + /** + * Get the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is + * enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceProperties.InboundIpRules" + * />. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is + * enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceProperties.InboundIpRules" + * />. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of all IPs. Note: + * These are considered only if PublicNetworkAccess is enabled. + * + * @return the inboundIpRules value. + */ + public List inboundIpRules() { + return this.inboundIpRules; + } + + /** + * Set the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of all IPs. Note: + * These are considered only if PublicNetworkAccess is enabled. + * + * @param inboundIpRules the inboundIpRules value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withInboundIpRules(List inboundIpRules) { + this.inboundIpRules = inboundIpRules; + return this; + } + + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * namespace. Only TLS version 1.2 is supported. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.minimumTlsVersionAllowed; + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * namespace. Only TLS version 1.2 is supported. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the NamespaceProperties object itself. + */ + public NamespaceProperties withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + this.minimumTlsVersionAllowed = minimumTlsVersionAllowed; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } + if (topicsConfiguration() != null) { + topicsConfiguration().validate(); + } + if (topicSpacesConfiguration() != null) { + topicSpacesConfiguration().validate(); + } + if (inboundIpRules() != null) { + inboundIpRules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceSharedAccessKeysInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceSharedAccessKeysInner.java new file mode 100644 index 000000000000..26de6fa12346 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceSharedAccessKeysInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Shared access keys of the Namespace. */ +@Fluent +public final class NamespaceSharedAccessKeysInner { + /* + * Shared access key1 for the namespace. + */ + @JsonProperty(value = "key1") + private String key1; + + /* + * Shared access key2 for the namespace. + */ + @JsonProperty(value = "key2") + private String key2; + + /** Creates an instance of NamespaceSharedAccessKeysInner class. */ + public NamespaceSharedAccessKeysInner() { + } + + /** + * Get the key1 property: Shared access key1 for the namespace. + * + * @return the key1 value. + */ + public String key1() { + return this.key1; + } + + /** + * Set the key1 property: Shared access key1 for the namespace. + * + * @param key1 the key1 value to set. + * @return the NamespaceSharedAccessKeysInner object itself. + */ + public NamespaceSharedAccessKeysInner withKey1(String key1) { + this.key1 = key1; + return this; + } + + /** + * Get the key2 property: Shared access key2 for the namespace. + * + * @return the key2 value. + */ + public String key2() { + return this.key2; + } + + /** + * Set the key2 property: Shared access key2 for the namespace. + * + * @param key2 the key2 value to set. + * @return the NamespaceSharedAccessKeysInner object itself. + */ + public NamespaceSharedAccessKeysInner withKey2(String key2) { + this.key2 = key2; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicInner.java new file mode 100644 index 000000000000..b55fbd957ef4 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicInner.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.eventgrid.models.EventInputSchema; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopicProvisioningState; +import com.azure.resourcemanager.eventgrid.models.PublisherType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Namespace topic details. */ +@Fluent +public final class NamespaceTopicInner extends ProxyResource { + /* + * Properties of the namespace topic. + */ + @JsonProperty(value = "properties") + private NamespaceTopicProperties innerProperties; + + /* + * The system metadata relating to namespace topic resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of NamespaceTopicInner class. */ + public NamespaceTopicInner() { + } + + /** + * Get the innerProperties property: Properties of the namespace topic. + * + * @return the innerProperties value. + */ + private NamespaceTopicProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: The system metadata relating to namespace topic resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Provisioning state of the namespace topic. + * + * @return the provisioningState value. + */ + public NamespaceTopicProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the publisherType property: Publisher type of the namespace topic. + * + * @return the publisherType value. + */ + public PublisherType publisherType() { + return this.innerProperties() == null ? null : this.innerProperties().publisherType(); + } + + /** + * Set the publisherType property: Publisher type of the namespace topic. + * + * @param publisherType the publisherType value to set. + * @return the NamespaceTopicInner object itself. + */ + public NamespaceTopicInner withPublisherType(PublisherType publisherType) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceTopicProperties(); + } + this.innerProperties().withPublisherType(publisherType); + return this; + } + + /** + * Get the inputSchema property: This determines the format that is expected for incoming events published to the + * topic. + * + * @return the inputSchema value. + */ + public EventInputSchema inputSchema() { + return this.innerProperties() == null ? null : this.innerProperties().inputSchema(); + } + + /** + * Set the inputSchema property: This determines the format that is expected for incoming events published to the + * topic. + * + * @param inputSchema the inputSchema value to set. + * @return the NamespaceTopicInner object itself. + */ + public NamespaceTopicInner withInputSchema(EventInputSchema inputSchema) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceTopicProperties(); + } + this.innerProperties().withInputSchema(inputSchema); + return this; + } + + /** + * Get the eventRetentionInDays property: Event retention for the namespace topic expressed in days. The property + * default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1 + * day. + * + * @return the eventRetentionInDays value. + */ + public Integer eventRetentionInDays() { + return this.innerProperties() == null ? null : this.innerProperties().eventRetentionInDays(); + } + + /** + * Set the eventRetentionInDays property: Event retention for the namespace topic expressed in days. The property + * default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1 + * day. + * + * @param eventRetentionInDays the eventRetentionInDays value to set. + * @return the NamespaceTopicInner object itself. + */ + public NamespaceTopicInner withEventRetentionInDays(Integer eventRetentionInDays) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceTopicProperties(); + } + this.innerProperties().withEventRetentionInDays(eventRetentionInDays); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicProperties.java new file mode 100644 index 000000000000..2efdda1504e3 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicProperties.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.EventInputSchema; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopicProvisioningState; +import com.azure.resourcemanager.eventgrid.models.PublisherType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of the namespace topic. */ +@Fluent +public final class NamespaceTopicProperties { + /* + * Provisioning state of the namespace topic. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private NamespaceTopicProvisioningState provisioningState; + + /* + * Publisher type of the namespace topic. + */ + @JsonProperty(value = "publisherType") + private PublisherType publisherType; + + /* + * This determines the format that is expected for incoming events published to the topic. + */ + @JsonProperty(value = "inputSchema") + private EventInputSchema inputSchema; + + /* + * Event retention for the namespace topic expressed in days. The property default value is 1 day. + * Min event retention duration value is 1 day and max event retention duration value is 1 day. + */ + @JsonProperty(value = "eventRetentionInDays") + private Integer eventRetentionInDays; + + /** Creates an instance of NamespaceTopicProperties class. */ + public NamespaceTopicProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the namespace topic. + * + * @return the provisioningState value. + */ + public NamespaceTopicProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the publisherType property: Publisher type of the namespace topic. + * + * @return the publisherType value. + */ + public PublisherType publisherType() { + return this.publisherType; + } + + /** + * Set the publisherType property: Publisher type of the namespace topic. + * + * @param publisherType the publisherType value to set. + * @return the NamespaceTopicProperties object itself. + */ + public NamespaceTopicProperties withPublisherType(PublisherType publisherType) { + this.publisherType = publisherType; + return this; + } + + /** + * Get the inputSchema property: This determines the format that is expected for incoming events published to the + * topic. + * + * @return the inputSchema value. + */ + public EventInputSchema inputSchema() { + return this.inputSchema; + } + + /** + * Set the inputSchema property: This determines the format that is expected for incoming events published to the + * topic. + * + * @param inputSchema the inputSchema value to set. + * @return the NamespaceTopicProperties object itself. + */ + public NamespaceTopicProperties withInputSchema(EventInputSchema inputSchema) { + this.inputSchema = inputSchema; + return this; + } + + /** + * Get the eventRetentionInDays property: Event retention for the namespace topic expressed in days. The property + * default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1 + * day. + * + * @return the eventRetentionInDays value. + */ + public Integer eventRetentionInDays() { + return this.eventRetentionInDays; + } + + /** + * Set the eventRetentionInDays property: Event retention for the namespace topic expressed in days. The property + * default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1 + * day. + * + * @param eventRetentionInDays the eventRetentionInDays value to set. + * @return the NamespaceTopicProperties object itself. + */ + public NamespaceTopicProperties withEventRetentionInDays(Integer eventRetentionInDays) { + this.eventRetentionInDays = eventRetentionInDays; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicUpdateParameterProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicUpdateParameterProperties.java new file mode 100644 index 000000000000..a68ead7e048a --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceTopicUpdateParameterProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information of namespace topic update parameter properties. */ +@Fluent +public final class NamespaceTopicUpdateParameterProperties { + /* + * Event retention for the namespace topic expressed in days. The property default value is 1 day. + * Min event retention duration value is 1 day and max event retention duration value is 1 day. + */ + @JsonProperty(value = "eventRetentionInDays") + private Integer eventRetentionInDays; + + /** Creates an instance of NamespaceTopicUpdateParameterProperties class. */ + public NamespaceTopicUpdateParameterProperties() { + } + + /** + * Get the eventRetentionInDays property: Event retention for the namespace topic expressed in days. The property + * default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1 + * day. + * + * @return the eventRetentionInDays value. + */ + public Integer eventRetentionInDays() { + return this.eventRetentionInDays; + } + + /** + * Set the eventRetentionInDays property: Event retention for the namespace topic expressed in days. The property + * default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1 + * day. + * + * @param eventRetentionInDays the eventRetentionInDays value to set. + * @return the NamespaceTopicUpdateParameterProperties object itself. + */ + public NamespaceTopicUpdateParameterProperties withEventRetentionInDays(Integer eventRetentionInDays) { + this.eventRetentionInDays = eventRetentionInDays; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceUpdateParameterProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceUpdateParameterProperties.java new file mode 100644 index 000000000000..b59e7cb85e79 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/NamespaceUpdateParameterProperties.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.InboundIpRule; +import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.UpdateTopicSpacesConfigurationInfo; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Information of namespace update parameter properties. */ +@Fluent +public final class NamespaceUpdateParameterProperties { + /* + * Topic spaces configuration properties that can be updated. + */ + @JsonProperty(value = "topicSpacesConfiguration") + private UpdateTopicSpacesConfigurationInfo topicSpacesConfiguration; + + /* + * This determines if traffic is allowed over public network. By default it is enabled. + * You can further restrict to specific IPs by configuring + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /* + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. + */ + @JsonProperty(value = "inboundIpRules") + private List inboundIpRules; + + /** Creates an instance of NamespaceUpdateParameterProperties class. */ + public NamespaceUpdateParameterProperties() { + } + + /** + * Get the topicSpacesConfiguration property: Topic spaces configuration properties that can be updated. + * + * @return the topicSpacesConfiguration value. + */ + public UpdateTopicSpacesConfigurationInfo topicSpacesConfiguration() { + return this.topicSpacesConfiguration; + } + + /** + * Set the topicSpacesConfiguration property: Topic spaces configuration properties that can be updated. + * + * @param topicSpacesConfiguration the topicSpacesConfiguration value to set. + * @return the NamespaceUpdateParameterProperties object itself. + */ + public NamespaceUpdateParameterProperties withTopicSpacesConfiguration( + UpdateTopicSpacesConfigurationInfo topicSpacesConfiguration) { + this.topicSpacesConfiguration = topicSpacesConfiguration; + return this; + } + + /** + * Get the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is + * enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceUpdateParameterProperties.InboundIpRules" + * />. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is + * enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceUpdateParameterProperties.InboundIpRules" + * />. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the NamespaceUpdateParameterProperties object itself. + */ + public NamespaceUpdateParameterProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of all IPs. Note: + * These are considered only if PublicNetworkAccess is enabled. + * + * @return the inboundIpRules value. + */ + public List inboundIpRules() { + return this.inboundIpRules; + } + + /** + * Set the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of all IPs. Note: + * These are considered only if PublicNetworkAccess is enabled. + * + * @param inboundIpRules the inboundIpRules value to set. + * @return the NamespaceUpdateParameterProperties object itself. + */ + public NamespaceUpdateParameterProperties withInboundIpRules(List inboundIpRules) { + this.inboundIpRules = inboundIpRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (topicSpacesConfiguration() != null) { + topicSpacesConfiguration().validate(); + } + if (inboundIpRules() != null) { + inboundIpRules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/OperationInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/OperationInner.java index aa67541b1482..ff1b546670c7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/OperationInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/OperationInner.java @@ -30,8 +30,7 @@ public final class OperationInner { private String origin; /* - * This Boolean is used to determine if the operation is a data plane - * action or not. + * This Boolean is used to determine if the operation is a data plane action or not. */ @JsonProperty(value = "isDataAction") private Boolean isDataAction; @@ -42,6 +41,10 @@ public final class OperationInner { @JsonProperty(value = "properties") private Object properties; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the name property: Name of the operation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationInner.java index 26d863a12e1a..786a1b72b55e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationInner.java @@ -41,6 +41,10 @@ public final class PartnerConfigurationInner extends ProxyResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of PartnerConfigurationInner class. */ + public PartnerConfigurationInner() { + } + /** * Get the innerProperties property: Properties of the partner configuration. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationProperties.java index cb1e5d56ef57..6171537e18a2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationProperties.java @@ -24,6 +24,10 @@ public final class PartnerConfigurationProperties { @JsonProperty(value = "provisioningState") private PartnerConfigurationProvisioningState provisioningState; + /** Creates an instance of PartnerConfigurationProperties class. */ + public PartnerConfigurationProperties() { + } + /** * Get the partnerAuthorization property: The details of authorized partners. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationUpdateParameterProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationUpdateParameterProperties.java index 7d5ea3409fff..3cfa3df689db 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationUpdateParameterProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerConfigurationUpdateParameterProperties.java @@ -11,12 +11,16 @@ @Fluent public final class PartnerConfigurationUpdateParameterProperties { /* - * The default time used to validate the maximum expiration time for each - * authorized partners in days. Allowed values ar between 1 and 365 days. + * The default time used to validate the maximum expiration time for each authorized partners in days. Allowed + * values ar between 1 and 365 days. */ @JsonProperty(value = "defaultMaximumExpirationTimeInDays") private Integer defaultMaximumExpirationTimeInDays; + /** Creates an instance of PartnerConfigurationUpdateParameterProperties class. */ + public PartnerConfigurationUpdateParameterProperties() { + } + /** * Get the defaultMaximumExpirationTimeInDays property: The default time used to validate the maximum expiration * time for each authorized partners in days. Allowed values ar between 1 and 365 days. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationInner.java new file mode 100644 index 000000000000..232f839f9811 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationInner.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; +import java.util.UUID; + +/** Event Grid Partner Destination. */ +@Fluent +public final class PartnerDestinationInner extends Resource { + /* + * Properties of the Partner Destination. + */ + @JsonProperty(value = "properties") + private PartnerDestinationProperties innerProperties; + + /* + * The system metadata relating to Partner Destination resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of PartnerDestinationInner class. */ + public PartnerDestinationInner() { + } + + /** + * Get the innerProperties property: Properties of the Partner Destination. + * + * @return the innerProperties value. + */ + private PartnerDestinationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: The system metadata relating to Partner Destination resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public PartnerDestinationInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public PartnerDestinationInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner registration. + * + * @return the partnerRegistrationImmutableId value. + */ + public UUID partnerRegistrationImmutableId() { + return this.innerProperties() == null ? null : this.innerProperties().partnerRegistrationImmutableId(); + } + + /** + * Set the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner registration. + * + * @param partnerRegistrationImmutableId the partnerRegistrationImmutableId value to set. + * @return the PartnerDestinationInner object itself. + */ + public PartnerDestinationInner withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { + if (this.innerProperties() == null) { + this.innerProperties = new PartnerDestinationProperties(); + } + this.innerProperties().withPartnerRegistrationImmutableId(partnerRegistrationImmutableId); + return this; + } + + /** + * Get the endpointServiceContext property: Endpoint context associated with this partner destination. + * + * @return the endpointServiceContext value. + */ + public String endpointServiceContext() { + return this.innerProperties() == null ? null : this.innerProperties().endpointServiceContext(); + } + + /** + * Set the endpointServiceContext property: Endpoint context associated with this partner destination. + * + * @param endpointServiceContext the endpointServiceContext value to set. + * @return the PartnerDestinationInner object itself. + */ + public PartnerDestinationInner withEndpointServiceContext(String endpointServiceContext) { + if (this.innerProperties() == null) { + this.innerProperties = new PartnerDestinationProperties(); + } + this.innerProperties().withEndpointServiceContext(endpointServiceContext); + return this; + } + + /** + * Get the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If this timer + * expires and the partner destination was never activated, the partner destination and corresponding channel are + * deleted. + * + * @return the expirationTimeIfNotActivatedUtc value. + */ + public OffsetDateTime expirationTimeIfNotActivatedUtc() { + return this.innerProperties() == null ? null : this.innerProperties().expirationTimeIfNotActivatedUtc(); + } + + /** + * Set the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If this timer + * expires and the partner destination was never activated, the partner destination and corresponding channel are + * deleted. + * + * @param expirationTimeIfNotActivatedUtc the expirationTimeIfNotActivatedUtc value to set. + * @return the PartnerDestinationInner object itself. + */ + public PartnerDestinationInner withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc) { + if (this.innerProperties() == null) { + this.innerProperties = new PartnerDestinationProperties(); + } + this.innerProperties().withExpirationTimeIfNotActivatedUtc(expirationTimeIfNotActivatedUtc); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the partner destination. + * + * @return the provisioningState value. + */ + public PartnerDestinationProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the activationState property: Activation state of the partner destination. + * + * @return the activationState value. + */ + public PartnerDestinationActivationState activationState() { + return this.innerProperties() == null ? null : this.innerProperties().activationState(); + } + + /** + * Set the activationState property: Activation state of the partner destination. + * + * @param activationState the activationState value to set. + * @return the PartnerDestinationInner object itself. + */ + public PartnerDestinationInner withActivationState(PartnerDestinationActivationState activationState) { + if (this.innerProperties() == null) { + this.innerProperties = new PartnerDestinationProperties(); + } + this.innerProperties().withActivationState(activationState); + return this; + } + + /** + * Get the endpointBaseUrl property: Endpoint Base URL of the partner destination. + * + * @return the endpointBaseUrl value. + */ + public String endpointBaseUrl() { + return this.innerProperties() == null ? null : this.innerProperties().endpointBaseUrl(); + } + + /** + * Set the endpointBaseUrl property: Endpoint Base URL of the partner destination. + * + * @param endpointBaseUrl the endpointBaseUrl value to set. + * @return the PartnerDestinationInner object itself. + */ + public PartnerDestinationInner withEndpointBaseUrl(String endpointBaseUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new PartnerDestinationProperties(); + } + this.innerProperties().withEndpointBaseUrl(endpointBaseUrl); + return this; + } + + /** + * Get the messageForActivation property: Context or helpful message that can be used during the approval process. + * + * @return the messageForActivation value. + */ + public String messageForActivation() { + return this.innerProperties() == null ? null : this.innerProperties().messageForActivation(); + } + + /** + * Set the messageForActivation property: Context or helpful message that can be used during the approval process. + * + * @param messageForActivation the messageForActivation value to set. + * @return the PartnerDestinationInner object itself. + */ + public PartnerDestinationInner withMessageForActivation(String messageForActivation) { + if (this.innerProperties() == null) { + this.innerProperties = new PartnerDestinationProperties(); + } + this.innerProperties().withMessageForActivation(messageForActivation); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationProperties.java new file mode 100644 index 000000000000..623dc7da6343 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerDestinationProperties.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.UUID; + +/** Properties of the Partner Destination. */ +@Fluent +public final class PartnerDestinationProperties { + /* + * The immutable Id of the corresponding partner registration. + */ + @JsonProperty(value = "partnerRegistrationImmutableId") + private UUID partnerRegistrationImmutableId; + + /* + * Endpoint context associated with this partner destination. + */ + @JsonProperty(value = "endpointServiceContext") + private String endpointServiceContext; + + /* + * Expiration time of the partner destination. If this timer expires and the partner destination was never + * activated, + * the partner destination and corresponding channel are deleted. + */ + @JsonProperty(value = "expirationTimeIfNotActivatedUtc") + private OffsetDateTime expirationTimeIfNotActivatedUtc; + + /* + * Provisioning state of the partner destination. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PartnerDestinationProvisioningState provisioningState; + + /* + * Activation state of the partner destination. + */ + @JsonProperty(value = "activationState") + private PartnerDestinationActivationState activationState; + + /* + * Endpoint Base URL of the partner destination + */ + @JsonProperty(value = "endpointBaseUrl") + private String endpointBaseUrl; + + /* + * Context or helpful message that can be used during the approval process. + */ + @JsonProperty(value = "messageForActivation") + private String messageForActivation; + + /** Creates an instance of PartnerDestinationProperties class. */ + public PartnerDestinationProperties() { + } + + /** + * Get the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner registration. + * + * @return the partnerRegistrationImmutableId value. + */ + public UUID partnerRegistrationImmutableId() { + return this.partnerRegistrationImmutableId; + } + + /** + * Set the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner registration. + * + * @param partnerRegistrationImmutableId the partnerRegistrationImmutableId value to set. + * @return the PartnerDestinationProperties object itself. + */ + public PartnerDestinationProperties withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { + this.partnerRegistrationImmutableId = partnerRegistrationImmutableId; + return this; + } + + /** + * Get the endpointServiceContext property: Endpoint context associated with this partner destination. + * + * @return the endpointServiceContext value. + */ + public String endpointServiceContext() { + return this.endpointServiceContext; + } + + /** + * Set the endpointServiceContext property: Endpoint context associated with this partner destination. + * + * @param endpointServiceContext the endpointServiceContext value to set. + * @return the PartnerDestinationProperties object itself. + */ + public PartnerDestinationProperties withEndpointServiceContext(String endpointServiceContext) { + this.endpointServiceContext = endpointServiceContext; + return this; + } + + /** + * Get the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If this timer + * expires and the partner destination was never activated, the partner destination and corresponding channel are + * deleted. + * + * @return the expirationTimeIfNotActivatedUtc value. + */ + public OffsetDateTime expirationTimeIfNotActivatedUtc() { + return this.expirationTimeIfNotActivatedUtc; + } + + /** + * Set the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If this timer + * expires and the partner destination was never activated, the partner destination and corresponding channel are + * deleted. + * + * @param expirationTimeIfNotActivatedUtc the expirationTimeIfNotActivatedUtc value to set. + * @return the PartnerDestinationProperties object itself. + */ + public PartnerDestinationProperties withExpirationTimeIfNotActivatedUtc( + OffsetDateTime expirationTimeIfNotActivatedUtc) { + this.expirationTimeIfNotActivatedUtc = expirationTimeIfNotActivatedUtc; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the partner destination. + * + * @return the provisioningState value. + */ + public PartnerDestinationProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the activationState property: Activation state of the partner destination. + * + * @return the activationState value. + */ + public PartnerDestinationActivationState activationState() { + return this.activationState; + } + + /** + * Set the activationState property: Activation state of the partner destination. + * + * @param activationState the activationState value to set. + * @return the PartnerDestinationProperties object itself. + */ + public PartnerDestinationProperties withActivationState(PartnerDestinationActivationState activationState) { + this.activationState = activationState; + return this; + } + + /** + * Get the endpointBaseUrl property: Endpoint Base URL of the partner destination. + * + * @return the endpointBaseUrl value. + */ + public String endpointBaseUrl() { + return this.endpointBaseUrl; + } + + /** + * Set the endpointBaseUrl property: Endpoint Base URL of the partner destination. + * + * @param endpointBaseUrl the endpointBaseUrl value to set. + * @return the PartnerDestinationProperties object itself. + */ + public PartnerDestinationProperties withEndpointBaseUrl(String endpointBaseUrl) { + this.endpointBaseUrl = endpointBaseUrl; + return this; + } + + /** + * Get the messageForActivation property: Context or helpful message that can be used during the approval process. + * + * @return the messageForActivation value. + */ + public String messageForActivation() { + return this.messageForActivation; + } + + /** + * Set the messageForActivation property: Context or helpful message that can be used during the approval process. + * + * @param messageForActivation the messageForActivation value to set. + * @return the PartnerDestinationProperties object itself. + */ + public PartnerDestinationProperties withMessageForActivation(String messageForActivation) { + this.messageForActivation = messageForActivation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerEventSubscriptionDestinationProperties.java new file mode 100644 index 000000000000..857592ab1493 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerEventSubscriptionDestinationProperties.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PartnerEventSubscriptionDestinationProperties model. */ +@Fluent +public final class PartnerEventSubscriptionDestinationProperties { + /* + * The Azure Resource Id that represents the endpoint of a Partner Destination of an event subscription. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** Creates an instance of PartnerEventSubscriptionDestinationProperties class. */ + public PartnerEventSubscriptionDestinationProperties() { + } + + /** + * Get the resourceId property: The Azure Resource Id that represents the endpoint of a Partner Destination of an + * event subscription. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The Azure Resource Id that represents the endpoint of a Partner Destination of an + * event subscription. + * + * @param resourceId the resourceId value to set. + * @return the PartnerEventSubscriptionDestinationProperties object itself. + */ + public PartnerEventSubscriptionDestinationProperties withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceInner.java index ff4e7ce8844d..7c9c0126b940 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceInner.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceProvisioningState; import com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -30,6 +31,10 @@ public final class PartnerNamespaceInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of PartnerNamespaceInner class. */ + public PartnerNamespaceInner() { + } + /** * Get the innerProperties property: Properties of the Partner Namespace. * @@ -107,6 +112,31 @@ public PartnerNamespaceInner withPartnerRegistrationFullyQualifiedId(String part return this; } + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * partner namespace. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.innerProperties() == null ? null : this.innerProperties().minimumTlsVersionAllowed(); + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * partner namespace. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the PartnerNamespaceInner object itself. + */ + public PartnerNamespaceInner withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + if (this.innerProperties() == null) { + this.innerProperties = new PartnerNamespaceProperties(); + } + this.innerProperties().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + /** * Get the endpoint property: Endpoint for the partner namespace. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceProperties.java index 70bac32479db..ccf4209fc547 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceProperties.java @@ -9,6 +9,7 @@ import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceProvisioningState; import com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -28,13 +29,19 @@ public final class PartnerNamespaceProperties { private PartnerNamespaceProvisioningState provisioningState; /* - * The fully qualified ARM Id of the partner registration that should be - * associated with this partner namespace. This takes the following format: + * The fully qualified ARM Id of the partner registration that should be associated with this partner namespace. + * This takes the following format: * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}. */ @JsonProperty(value = "partnerRegistrationFullyQualifiedId") private String partnerRegistrationFullyQualifiedId; + /* + * Minimum TLS version of the publisher allowed to publish to this partner namespace + */ + @JsonProperty(value = "minimumTlsVersionAllowed") + private TlsVersion minimumTlsVersionAllowed; + /* * Endpoint for the partner namespace. */ @@ -42,40 +49,40 @@ public final class PartnerNamespaceProperties { private String endpoint; /* - * This determines if traffic is allowed over public network. By default it - * is enabled. + * This determines if traffic is allowed over public network. By default it is enabled. * You can further restrict to specific IPs by configuring + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceProperties.InboundIpRules" /> */ @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all - * IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* - * This boolean is used to enable or disable local auth. Default value is - * false. When the property is set to true, only AAD token will be used to - * authenticate if user is allowed to publish to the partner namespace. + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the partner namespace. */ @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; /* - * This determines if events published to this partner namespace should use - * the source attribute in the event payload - * or use the channel name in the header when matching to the partner - * topic. If none is specified, source attribute routing will be used to - * match the partner topic. + * This determines if events published to this partner namespace should use the source attribute in the event + * payload + * or use the channel name in the header when matching to the partner topic. If none is specified, source attribute + * routing will be used to match the partner topic. */ @JsonProperty(value = "partnerTopicRoutingMode") private PartnerTopicRoutingMode partnerTopicRoutingMode; + /** Creates an instance of PartnerNamespaceProperties class. */ + public PartnerNamespaceProperties() { + } + /** * Get the privateEndpointConnections property: The privateEndpointConnections property. * @@ -119,6 +126,28 @@ public PartnerNamespaceProperties withPartnerRegistrationFullyQualifiedId( return this; } + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * partner namespace. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.minimumTlsVersionAllowed; + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * partner namespace. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the PartnerNamespaceProperties object itself. + */ + public PartnerNamespaceProperties withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + this.minimumTlsVersionAllowed = minimumTlsVersionAllowed; + return this; + } + /** * Get the endpoint property: Endpoint for the partner namespace. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceSharedAccessKeysInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceSharedAccessKeysInner.java index 55ce8f22127b..d76bf1ac6a30 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceSharedAccessKeysInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceSharedAccessKeysInner.java @@ -22,6 +22,10 @@ public final class PartnerNamespaceSharedAccessKeysInner { @JsonProperty(value = "key2") private String key2; + /** Creates an instance of PartnerNamespaceSharedAccessKeysInner class. */ + public PartnerNamespaceSharedAccessKeysInner() { + } + /** * Get the key1 property: Shared access key1 for the partner namespace. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceUpdateParameterProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceUpdateParameterProperties.java index 44a4184109d6..7361beb20ee7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceUpdateParameterProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/PartnerNamespaceUpdateParameterProperties.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -14,36 +15,42 @@ @Fluent public final class PartnerNamespaceUpdateParameterProperties { /* - * This determines if traffic is allowed over public network. By default it - * is enabled. + * This determines if traffic is allowed over public network. By default it is enabled. * You can further restrict to specific IPs by configuring */ @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all - * IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* - * This boolean is used to enable or disable local auth. Default value is - * false. When the property is set to true, only AAD token will be used to - * authenticate if user is allowed to publish to the partner namespace. + * Minimum TLS version of the publisher allowed to publish to this domain + */ + @JsonProperty(value = "minimumTlsVersionAllowed") + private TlsVersion minimumTlsVersionAllowed; + + /* + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the partner namespace. */ @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; + /** Creates an instance of PartnerNamespaceUpdateParameterProperties class. */ + public PartnerNamespaceUpdateParameterProperties() { + } + /** * Get the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceUpdateParameterProperties" - + ".InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceUpdateParameterProperties.InboundIpRules" * />. * * @return the publicNetworkAccess value. @@ -55,8 +62,7 @@ public PublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceUpdateParameterProperties" - + ".InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceUpdateParameterProperties.InboundIpRules" * />. * * @param publicNetworkAccess the publicNetworkAccess value to set. @@ -89,6 +95,28 @@ public PartnerNamespaceUpdateParameterProperties withInboundIpRules(List requiredZoneNames; + /** Creates an instance of PrivateLinkResourceProperties class. */ + public PrivateLinkResourceProperties() { + } + /** * Get the groupId property: The groupId property. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusQueueEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusQueueEventSubscriptionDestinationProperties.java index 91416e532709..78e6488e42df 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusQueueEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusQueueEventSubscriptionDestinationProperties.java @@ -13,8 +13,7 @@ @Fluent public final class ServiceBusQueueEventSubscriptionDestinationProperties { /* - * The Azure Resource Id that represents the endpoint of the Service Bus - * destination of an event subscription. + * The Azure Resource Id that represents the endpoint of the Service Bus destination of an event subscription. */ @JsonProperty(value = "resourceId") private String resourceId; @@ -25,6 +24,10 @@ public final class ServiceBusQueueEventSubscriptionDestinationProperties { @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; + /** Creates an instance of ServiceBusQueueEventSubscriptionDestinationProperties class. */ + public ServiceBusQueueEventSubscriptionDestinationProperties() { + } + /** * Get the resourceId property: The Azure Resource Id that represents the endpoint of the Service Bus destination of * an event subscription. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusTopicEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusTopicEventSubscriptionDestinationProperties.java index 4a50ec2f42b1..045f0d9f9e9e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusTopicEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/ServiceBusTopicEventSubscriptionDestinationProperties.java @@ -13,8 +13,8 @@ @Fluent public final class ServiceBusTopicEventSubscriptionDestinationProperties { /* - * The Azure Resource Id that represents the endpoint of the Service Bus - * Topic destination of an event subscription. + * The Azure Resource Id that represents the endpoint of the Service Bus Topic destination of an event + * subscription. */ @JsonProperty(value = "resourceId") private String resourceId; @@ -25,6 +25,10 @@ public final class ServiceBusTopicEventSubscriptionDestinationProperties { @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; + /** Creates an instance of ServiceBusTopicEventSubscriptionDestinationProperties class. */ + public ServiceBusTopicEventSubscriptionDestinationProperties() { + } + /** * Get the resourceId property: The Azure Resource Id that represents the endpoint of the Service Bus Topic * destination of an event subscription. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StaticDeliveryAttributeMappingProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StaticDeliveryAttributeMappingProperties.java index 3767cb5b0d04..3a1694e10313 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StaticDeliveryAttributeMappingProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StaticDeliveryAttributeMappingProperties.java @@ -22,6 +22,10 @@ public final class StaticDeliveryAttributeMappingProperties { @JsonProperty(value = "isSecret") private Boolean isSecret; + /** Creates an instance of StaticDeliveryAttributeMappingProperties class. */ + public StaticDeliveryAttributeMappingProperties() { + } + /** * Get the value property: Value of the delivery attribute. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageBlobDeadLetterDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageBlobDeadLetterDestinationProperties.java index a22d00b97f47..12fdaafc06af 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageBlobDeadLetterDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageBlobDeadLetterDestinationProperties.java @@ -11,19 +11,21 @@ @Fluent public final class StorageBlobDeadLetterDestinationProperties { /* - * The Azure Resource ID of the storage account that is the destination of - * the deadletter events + * The Azure Resource ID of the storage account that is the destination of the deadletter events */ @JsonProperty(value = "resourceId") private String resourceId; /* - * The name of the Storage blob container that is the destination of the - * deadletter events + * The name of the Storage blob container that is the destination of the deadletter events */ @JsonProperty(value = "blobContainerName") private String blobContainerName; + /** Creates an instance of StorageBlobDeadLetterDestinationProperties class. */ + public StorageBlobDeadLetterDestinationProperties() { + } + /** * Get the resourceId property: The Azure Resource ID of the storage account that is the destination of the * deadletter events. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageQueueEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageQueueEventSubscriptionDestinationProperties.java index e3bc3f1d582f..4b71be09ce6a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageQueueEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/StorageQueueEventSubscriptionDestinationProperties.java @@ -11,25 +11,29 @@ @Fluent public final class StorageQueueEventSubscriptionDestinationProperties { /* - * The Azure Resource ID of the storage account that contains the queue - * that is the destination of an event subscription. + * The Azure Resource ID of the storage account that contains the queue that is the destination of an event + * subscription. */ @JsonProperty(value = "resourceId") private String resourceId; /* - * The name of the Storage queue under a storage account that is the - * destination of an event subscription. + * The name of the Storage queue under a storage account that is the destination of an event subscription. */ @JsonProperty(value = "queueName") private String queueName; /* - * Storage queue message time to live in seconds. + * Storage queue message time to live in seconds. This value cannot be zero or negative with the exception of using + * -1 to indicate that the Time To Live of the message is Infinite. */ @JsonProperty(value = "queueMessageTimeToLiveInSeconds") private Long queueMessageTimeToLiveInSeconds; + /** Creates an instance of StorageQueueEventSubscriptionDestinationProperties class. */ + public StorageQueueEventSubscriptionDestinationProperties() { + } + /** * Get the resourceId property: The Azure Resource ID of the storage account that contains the queue that is the * destination of an event subscription. @@ -75,7 +79,9 @@ public StorageQueueEventSubscriptionDestinationProperties withQueueName(String q } /** - * Get the queueMessageTimeToLiveInSeconds property: Storage queue message time to live in seconds. + * Get the queueMessageTimeToLiveInSeconds property: Storage queue message time to live in seconds. This value + * cannot be zero or negative with the exception of using -1 to indicate that the Time To Live of the message is + * Infinite. * * @return the queueMessageTimeToLiveInSeconds value. */ @@ -84,7 +90,9 @@ public Long queueMessageTimeToLiveInSeconds() { } /** - * Set the queueMessageTimeToLiveInSeconds property: Storage queue message time to live in seconds. + * Set the queueMessageTimeToLiveInSeconds property: Storage queue message time to live in seconds. This value + * cannot be zero or negative with the exception of using -1 to indicate that the Time To Live of the message is + * Infinite. * * @param queueMessageTimeToLiveInSeconds the queueMessageTimeToLiveInSeconds value to set. * @return the StorageQueueEventSubscriptionDestinationProperties object itself. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionInner.java new file mode 100644 index 000000000000..86ea81730dba --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionInner.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration; +import com.azure.resourcemanager.eventgrid.models.DeliverySchema; +import com.azure.resourcemanager.eventgrid.models.FiltersConfiguration; +import com.azure.resourcemanager.eventgrid.models.SubscriptionProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Event Subscription. */ +@Fluent +public final class SubscriptionInner extends ProxyResource { + /* + * Properties of the event subscription. + */ + @JsonProperty(value = "properties") + private SubscriptionProperties innerProperties; + + /* + * The system metadata relating to Event Subscription resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of SubscriptionInner class. */ + public SubscriptionInner() { + } + + /** + * Get the innerProperties property: Properties of the event subscription. + * + * @return the innerProperties value. + */ + private SubscriptionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: The system metadata relating to Event Subscription resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Provisioning state of the event subscription. + * + * @return the provisioningState value. + */ + public SubscriptionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the deliveryConfiguration property: Information about the delivery configuration of the event subscription. + * + * @return the deliveryConfiguration value. + */ + public DeliveryConfiguration deliveryConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().deliveryConfiguration(); + } + + /** + * Set the deliveryConfiguration property: Information about the delivery configuration of the event subscription. + * + * @param deliveryConfiguration the deliveryConfiguration value to set. + * @return the SubscriptionInner object itself. + */ + public SubscriptionInner withDeliveryConfiguration(DeliveryConfiguration deliveryConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionProperties(); + } + this.innerProperties().withDeliveryConfiguration(deliveryConfiguration); + return this; + } + + /** + * Get the eventDeliverySchema property: The event delivery schema for the event subscription. + * + * @return the eventDeliverySchema value. + */ + public DeliverySchema eventDeliverySchema() { + return this.innerProperties() == null ? null : this.innerProperties().eventDeliverySchema(); + } + + /** + * Set the eventDeliverySchema property: The event delivery schema for the event subscription. + * + * @param eventDeliverySchema the eventDeliverySchema value to set. + * @return the SubscriptionInner object itself. + */ + public SubscriptionInner withEventDeliverySchema(DeliverySchema eventDeliverySchema) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionProperties(); + } + this.innerProperties().withEventDeliverySchema(eventDeliverySchema); + return this; + } + + /** + * Get the filtersConfiguration property: Information about the filter for the event subscription. + * + * @return the filtersConfiguration value. + */ + public FiltersConfiguration filtersConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().filtersConfiguration(); + } + + /** + * Set the filtersConfiguration property: Information about the filter for the event subscription. + * + * @param filtersConfiguration the filtersConfiguration value to set. + * @return the SubscriptionInner object itself. + */ + public SubscriptionInner withFiltersConfiguration(FiltersConfiguration filtersConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionProperties(); + } + this.innerProperties().withFiltersConfiguration(filtersConfiguration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionProperties.java new file mode 100644 index 000000000000..1d1e70bc052c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionProperties.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration; +import com.azure.resourcemanager.eventgrid.models.DeliverySchema; +import com.azure.resourcemanager.eventgrid.models.FiltersConfiguration; +import com.azure.resourcemanager.eventgrid.models.SubscriptionProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of the event subscription. */ +@Fluent +public final class SubscriptionProperties { + /* + * Provisioning state of the event subscription. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private SubscriptionProvisioningState provisioningState; + + /* + * Information about the delivery configuration of the event subscription. + */ + @JsonProperty(value = "deliveryConfiguration") + private DeliveryConfiguration deliveryConfiguration; + + /* + * The event delivery schema for the event subscription. + */ + @JsonProperty(value = "eventDeliverySchema") + private DeliverySchema eventDeliverySchema; + + /* + * Information about the filter for the event subscription. + */ + @JsonProperty(value = "filtersConfiguration") + private FiltersConfiguration filtersConfiguration; + + /** Creates an instance of SubscriptionProperties class. */ + public SubscriptionProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the event subscription. + * + * @return the provisioningState value. + */ + public SubscriptionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the deliveryConfiguration property: Information about the delivery configuration of the event subscription. + * + * @return the deliveryConfiguration value. + */ + public DeliveryConfiguration deliveryConfiguration() { + return this.deliveryConfiguration; + } + + /** + * Set the deliveryConfiguration property: Information about the delivery configuration of the event subscription. + * + * @param deliveryConfiguration the deliveryConfiguration value to set. + * @return the SubscriptionProperties object itself. + */ + public SubscriptionProperties withDeliveryConfiguration(DeliveryConfiguration deliveryConfiguration) { + this.deliveryConfiguration = deliveryConfiguration; + return this; + } + + /** + * Get the eventDeliverySchema property: The event delivery schema for the event subscription. + * + * @return the eventDeliverySchema value. + */ + public DeliverySchema eventDeliverySchema() { + return this.eventDeliverySchema; + } + + /** + * Set the eventDeliverySchema property: The event delivery schema for the event subscription. + * + * @param eventDeliverySchema the eventDeliverySchema value to set. + * @return the SubscriptionProperties object itself. + */ + public SubscriptionProperties withEventDeliverySchema(DeliverySchema eventDeliverySchema) { + this.eventDeliverySchema = eventDeliverySchema; + return this; + } + + /** + * Get the filtersConfiguration property: Information about the filter for the event subscription. + * + * @return the filtersConfiguration value. + */ + public FiltersConfiguration filtersConfiguration() { + return this.filtersConfiguration; + } + + /** + * Set the filtersConfiguration property: Information about the filter for the event subscription. + * + * @param filtersConfiguration the filtersConfiguration value to set. + * @return the SubscriptionProperties object itself. + */ + public SubscriptionProperties withFiltersConfiguration(FiltersConfiguration filtersConfiguration) { + this.filtersConfiguration = filtersConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deliveryConfiguration() != null) { + deliveryConfiguration().validate(); + } + if (filtersConfiguration() != null) { + filtersConfiguration().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionUpdateParametersProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionUpdateParametersProperties.java new file mode 100644 index 000000000000..fa433b4cd8b9 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SubscriptionUpdateParametersProperties.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration; +import com.azure.resourcemanager.eventgrid.models.DeliverySchema; +import com.azure.resourcemanager.eventgrid.models.FiltersConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of the Event Subscription update parameters. */ +@Fluent +public final class SubscriptionUpdateParametersProperties { + /* + * Information about the delivery configuration of the event subscription. + */ + @JsonProperty(value = "deliveryConfiguration") + private DeliveryConfiguration deliveryConfiguration; + + /* + * The event delivery schema for the event subscription. + */ + @JsonProperty(value = "eventDeliverySchema") + private DeliverySchema eventDeliverySchema; + + /* + * Information about the filter for the event subscription. + */ + @JsonProperty(value = "filtersConfiguration") + private FiltersConfiguration filtersConfiguration; + + /** Creates an instance of SubscriptionUpdateParametersProperties class. */ + public SubscriptionUpdateParametersProperties() { + } + + /** + * Get the deliveryConfiguration property: Information about the delivery configuration of the event subscription. + * + * @return the deliveryConfiguration value. + */ + public DeliveryConfiguration deliveryConfiguration() { + return this.deliveryConfiguration; + } + + /** + * Set the deliveryConfiguration property: Information about the delivery configuration of the event subscription. + * + * @param deliveryConfiguration the deliveryConfiguration value to set. + * @return the SubscriptionUpdateParametersProperties object itself. + */ + public SubscriptionUpdateParametersProperties withDeliveryConfiguration( + DeliveryConfiguration deliveryConfiguration) { + this.deliveryConfiguration = deliveryConfiguration; + return this; + } + + /** + * Get the eventDeliverySchema property: The event delivery schema for the event subscription. + * + * @return the eventDeliverySchema value. + */ + public DeliverySchema eventDeliverySchema() { + return this.eventDeliverySchema; + } + + /** + * Set the eventDeliverySchema property: The event delivery schema for the event subscription. + * + * @param eventDeliverySchema the eventDeliverySchema value to set. + * @return the SubscriptionUpdateParametersProperties object itself. + */ + public SubscriptionUpdateParametersProperties withEventDeliverySchema(DeliverySchema eventDeliverySchema) { + this.eventDeliverySchema = eventDeliverySchema; + return this; + } + + /** + * Get the filtersConfiguration property: Information about the filter for the event subscription. + * + * @return the filtersConfiguration value. + */ + public FiltersConfiguration filtersConfiguration() { + return this.filtersConfiguration; + } + + /** + * Set the filtersConfiguration property: Information about the filter for the event subscription. + * + * @param filtersConfiguration the filtersConfiguration value to set. + * @return the SubscriptionUpdateParametersProperties object itself. + */ + public SubscriptionUpdateParametersProperties withFiltersConfiguration(FiltersConfiguration filtersConfiguration) { + this.filtersConfiguration = filtersConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deliveryConfiguration() != null) { + deliveryConfiguration().validate(); + } + if (filtersConfiguration() != null) { + filtersConfiguration().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicInner.java index a365b3a30b51..080d08ce1f1a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicInner.java @@ -21,17 +21,21 @@ public final class SystemTopicInner extends Resource { @JsonProperty(value = "properties") private SystemTopicProperties innerProperties; + /* + * The system metadata relating to System Topic resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * Identity information for the resource. */ @JsonProperty(value = "identity") private IdentityInfo identity; - /* - * The system metadata relating to System Topic resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; + /** Creates an instance of SystemTopicInner class. */ + public SystemTopicInner() { + } /** * Get the innerProperties property: Properties of the system topic. @@ -42,6 +46,15 @@ private SystemTopicProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: The system metadata relating to System Topic resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the identity property: Identity information for the resource. * @@ -62,15 +75,6 @@ public SystemTopicInner withIdentity(IdentityInfo identity) { return this; } - /** - * Get the systemData property: The system metadata relating to System Topic resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - /** {@inheritDoc} */ @Override public SystemTopicInner withLocation(String location) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicProperties.java index 6365187456da..3ee904541f68 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/SystemTopicProperties.java @@ -35,6 +35,10 @@ public final class SystemTopicProperties { @JsonProperty(value = "metricResourceId", access = JsonProperty.Access.WRITE_ONLY) private String metricResourceId; + /** Creates an instance of SystemTopicProperties class. */ + public SystemTopicProperties() { + } + /** * Get the provisioningState property: Provisioning state of the system topic. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicInner.java index ed75a32aa873..a4e21b085b09 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicInner.java @@ -8,11 +8,16 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; +import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; +import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; import com.azure.resourcemanager.eventgrid.models.IdentityInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.ResourceKind; +import com.azure.resourcemanager.eventgrid.models.ResourceSku; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.azure.resourcemanager.eventgrid.models.TopicProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -27,18 +32,40 @@ public final class TopicInner extends Resource { @JsonProperty(value = "properties") private TopicProperties innerProperties; + /* + * The Sku pricing tier for the topic. + */ + @JsonProperty(value = "sku") + private ResourceSku sku; + /* * Identity information for the resource. */ @JsonProperty(value = "identity") private IdentityInfo identity; + /* + * Kind of the resource. + */ + @JsonProperty(value = "kind") + private ResourceKind kind; + + /* + * Extended location of the resource. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + /* * The system metadata relating to Topic resource. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of TopicInner class. */ + public TopicInner() { + } + /** * Get the innerProperties property: Properties of the topic. * @@ -48,6 +75,26 @@ private TopicProperties innerProperties() { return this.innerProperties; } + /** + * Get the sku property: The Sku pricing tier for the topic. + * + * @return the sku value. + */ + public ResourceSku sku() { + return this.sku; + } + + /** + * Set the sku property: The Sku pricing tier for the topic. + * + * @param sku the sku value to set. + * @return the TopicInner object itself. + */ + public TopicInner withSku(ResourceSku sku) { + this.sku = sku; + return this; + } + /** * Get the identity property: Identity information for the resource. * @@ -68,6 +115,46 @@ public TopicInner withIdentity(IdentityInfo identity) { return this; } + /** + * Get the kind property: Kind of the resource. + * + * @return the kind value. + */ + public ResourceKind kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of the resource. + * + * @param kind the kind value to set. + * @return the TopicInner object itself. + */ + public TopicInner withKind(ResourceKind kind) { + this.kind = kind; + return this; + } + + /** + * Get the extendedLocation property: Extended location of the resource. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: Extended location of the resource. + * + * @param extendedLocation the extendedLocation value to set. + * @return the TopicInner object itself. + */ + public TopicInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + /** * Get the systemData property: The system metadata relating to Topic resource. * @@ -118,6 +205,54 @@ public String endpoint() { return this.innerProperties() == null ? null : this.innerProperties().endpoint(); } + /** + * Get the eventTypeInfo property: Event Type Information for the user topic. This information is provided by the + * publisher and can be used by the subscriber to view different types of events that are published. + * + * @return the eventTypeInfo value. + */ + public EventTypeInfo eventTypeInfo() { + return this.innerProperties() == null ? null : this.innerProperties().eventTypeInfo(); + } + + /** + * Set the eventTypeInfo property: Event Type Information for the user topic. This information is provided by the + * publisher and can be used by the subscriber to view different types of events that are published. + * + * @param eventTypeInfo the eventTypeInfo value to set. + * @return the TopicInner object itself. + */ + public TopicInner withEventTypeInfo(EventTypeInfo eventTypeInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new TopicProperties(); + } + this.innerProperties().withEventTypeInfo(eventTypeInfo); + return this; + } + + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this topic. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.innerProperties() == null ? null : this.innerProperties().minimumTlsVersionAllowed(); + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this topic. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the TopicInner object itself. + */ + public TopicInner withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + if (this.innerProperties() == null) { + this.innerProperties = new TopicProperties(); + } + this.innerProperties().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + /** * Get the inputSchema property: This determines the format that Event Grid should expect for incoming events * published to the topic. @@ -290,8 +425,14 @@ public void validate() { if (innerProperties() != null) { innerProperties().validate(); } + if (sku() != null) { + sku().validate(); + } if (identity() != null) { identity().validate(); } + if (extendedLocation() != null) { + extendedLocation().validate(); + } } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicProperties.java index bda404b96a3b..ecb8ca950417 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicProperties.java @@ -6,10 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; +import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.azure.resourcemanager.eventgrid.models.TopicProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -36,17 +38,27 @@ public final class TopicProperties { private String endpoint; /* - * This determines the format that Event Grid should expect for incoming - * events published to the topic. + * Event Type Information for the user topic. This information is provided by the publisher and can be used by the + * subscriber to view different types of events that are published. + */ + @JsonProperty(value = "eventTypeInfo") + private EventTypeInfo eventTypeInfo; + + /* + * Minimum TLS version of the publisher allowed to publish to this topic + */ + @JsonProperty(value = "minimumTlsVersionAllowed") + private TlsVersion minimumTlsVersionAllowed; + + /* + * This determines the format that Event Grid should expect for incoming events published to the topic. */ @JsonProperty(value = "inputSchema") private InputSchema inputSchema; /* - * This enables publishing using custom event schemas. An - * InputSchemaMapping can be specified to map various properties of a - * source schema to various required properties of the EventGridEvent - * schema. + * This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the EventGridEvent schema. */ @JsonProperty(value = "inputSchemaMapping") private InputSchemaMapping inputSchemaMapping; @@ -58,26 +70,23 @@ public final class TopicProperties { private String metricResourceId; /* - * This determines if traffic is allowed over public network. By default it - * is enabled. + * This determines if traffic is allowed over public network. By default it is enabled. * You can further restrict to specific IPs by configuring + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicProperties.InboundIpRules" /> */ @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all - * IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* - * This boolean is used to enable or disable local auth. Default value is - * false. When the property is set to true, only AAD token will be used to - * authenticate if user is allowed to publish to the topic. + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the topic. */ @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; @@ -88,6 +97,10 @@ public final class TopicProperties { @JsonProperty(value = "dataResidencyBoundary") private DataResidencyBoundary dataResidencyBoundary; + /** Creates an instance of TopicProperties class. */ + public TopicProperties() { + } + /** * Get the privateEndpointConnections property: The privateEndpointConnections property. * @@ -115,6 +128,48 @@ public String endpoint() { return this.endpoint; } + /** + * Get the eventTypeInfo property: Event Type Information for the user topic. This information is provided by the + * publisher and can be used by the subscriber to view different types of events that are published. + * + * @return the eventTypeInfo value. + */ + public EventTypeInfo eventTypeInfo() { + return this.eventTypeInfo; + } + + /** + * Set the eventTypeInfo property: Event Type Information for the user topic. This information is provided by the + * publisher and can be used by the subscriber to view different types of events that are published. + * + * @param eventTypeInfo the eventTypeInfo value to set. + * @return the TopicProperties object itself. + */ + public TopicProperties withEventTypeInfo(EventTypeInfo eventTypeInfo) { + this.eventTypeInfo = eventTypeInfo; + return this; + } + + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this topic. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.minimumTlsVersionAllowed; + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this topic. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the TopicProperties object itself. + */ + public TopicProperties withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + this.minimumTlsVersionAllowed = minimumTlsVersionAllowed; + return this; + } + /** * Get the inputSchema property: This determines the format that Event Grid should expect for incoming events * published to the topic. @@ -269,6 +324,9 @@ public void validate() { if (privateEndpointConnections() != null) { privateEndpointConnections().forEach(e -> e.validate()); } + if (eventTypeInfo() != null) { + eventTypeInfo().validate(); + } if (inputSchemaMapping() != null) { inputSchemaMapping().validate(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSharedAccessKeysInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSharedAccessKeysInner.java index fb36d182bd13..994d9d560a8e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSharedAccessKeysInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSharedAccessKeysInner.java @@ -22,6 +22,10 @@ public final class TopicSharedAccessKeysInner { @JsonProperty(value = "key2") private String key2; + /** Creates an instance of TopicSharedAccessKeysInner class. */ + public TopicSharedAccessKeysInner() { + } + /** * Get the key1 property: Shared access key1 for the topic. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceInner.java new file mode 100644 index 000000000000..b9bac4398011 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceInner.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.eventgrid.models.TopicSpaceProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The Topic space resource. */ +@Fluent +public final class TopicSpaceInner extends ProxyResource { + /* + * The properties of topic space. + */ + @JsonProperty(value = "properties") + private TopicSpaceProperties innerProperties; + + /* + * The system metadata relating to the TopicSpace resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of TopicSpaceInner class. */ + public TopicSpaceInner() { + } + + /** + * Get the innerProperties property: The properties of topic space. + * + * @return the innerProperties value. + */ + private TopicSpaceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: The system metadata relating to the TopicSpace resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the description property: Description for the Topic Space resource. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Description for the Topic Space resource. + * + * @param description the description value to set. + * @return the TopicSpaceInner object itself. + */ + public TopicSpaceInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new TopicSpaceProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the topicTemplates property: The topic filters in the topic space. Example: "topicTemplates": [ + * "devices/foo/bar", "devices/topic1/+", "devices/${principal.name}/${principal.attributes.keyName}" ]. + * + * @return the topicTemplates value. + */ + public List topicTemplates() { + return this.innerProperties() == null ? null : this.innerProperties().topicTemplates(); + } + + /** + * Set the topicTemplates property: The topic filters in the topic space. Example: "topicTemplates": [ + * "devices/foo/bar", "devices/topic1/+", "devices/${principal.name}/${principal.attributes.keyName}" ]. + * + * @param topicTemplates the topicTemplates value to set. + * @return the TopicSpaceInner object itself. + */ + public TopicSpaceInner withTopicTemplates(List topicTemplates) { + if (this.innerProperties() == null) { + this.innerProperties = new TopicSpaceProperties(); + } + this.innerProperties().withTopicTemplates(topicTemplates); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the TopicSpace resource. + * + * @return the provisioningState value. + */ + public TopicSpaceProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceProperties.java new file mode 100644 index 000000000000..260e3ae9e132 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicSpaceProperties.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.TopicSpaceProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The properties of topic space. */ +@Fluent +public final class TopicSpaceProperties { + /* + * Description for the Topic Space resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The topic filters in the topic space. + * Example: "topicTemplates": [ + * "devices/foo/bar", + * "devices/topic1/+", + * "devices/${principal.name}/${principal.attributes.keyName}" ]. + */ + @JsonProperty(value = "topicTemplates") + private List topicTemplates; + + /* + * Provisioning state of the TopicSpace resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private TopicSpaceProvisioningState provisioningState; + + /** Creates an instance of TopicSpaceProperties class. */ + public TopicSpaceProperties() { + } + + /** + * Get the description property: Description for the Topic Space resource. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description for the Topic Space resource. + * + * @param description the description value to set. + * @return the TopicSpaceProperties object itself. + */ + public TopicSpaceProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the topicTemplates property: The topic filters in the topic space. Example: "topicTemplates": [ + * "devices/foo/bar", "devices/topic1/+", "devices/${principal.name}/${principal.attributes.keyName}" ]. + * + * @return the topicTemplates value. + */ + public List topicTemplates() { + return this.topicTemplates; + } + + /** + * Set the topicTemplates property: The topic filters in the topic space. Example: "topicTemplates": [ + * "devices/foo/bar", "devices/topic1/+", "devices/${principal.name}/${principal.attributes.keyName}" ]. + * + * @param topicTemplates the topicTemplates value to set. + * @return the TopicSpaceProperties object itself. + */ + public TopicSpaceProperties withTopicTemplates(List topicTemplates) { + this.topicTemplates = topicTemplates; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the TopicSpace resource. + * + * @return the provisioningState value. + */ + public TopicSpaceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeInfoInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeInfoInner.java index f5f7416da430..a83f5bc687da 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeInfoInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/TopicTypeInfoInner.java @@ -21,6 +21,10 @@ public final class TopicTypeInfoInner extends ProxyResource { @JsonProperty(value = "properties") private TopicTypeProperties innerProperties; + /** Creates an instance of TopicTypeInfoInner class. */ + public TopicTypeInfoInner() { + } + /** * Get the innerProperties property: Properties of the topic type info. * @@ -214,6 +218,31 @@ public TopicTypeInfoInner withSupportedScopesForSource(List supportedScopesForSource; + /* + * Flag to indicate that a topic type can support both regional or global system topics + */ + @JsonProperty(value = "areRegionalAndGlobalSourcesSupported") + private Boolean areRegionalAndGlobalSourcesSupported; + + /** Creates an instance of TopicTypeProperties class. */ + public TopicTypeProperties() { + } + /** * Get the provider property: Namespace of the provider of the topic type. * @@ -222,6 +232,28 @@ public TopicTypeProperties withSupportedScopesForSource(List @@ -25,16 +26,21 @@ public final class TopicUpdateParameterProperties { private PublicNetworkAccess publicNetworkAccess; /* - * This can be used to restrict traffic from specific IPs instead of all - * IPs. Note: These are considered only if PublicNetworkAccess is enabled. + * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if + * PublicNetworkAccess is enabled. */ @JsonProperty(value = "inboundIpRules") private List inboundIpRules; /* - * This boolean is used to enable or disable local auth. Default value is - * false. When the property is set to true, only AAD token will be used to - * authenticate if user is allowed to publish to the topic. + * Minimum TLS version of the publisher allowed to publish to this domain + */ + @JsonProperty(value = "minimumTlsVersionAllowed") + private TlsVersion minimumTlsVersionAllowed; + + /* + * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, + * only AAD token will be used to authenticate if user is allowed to publish to the topic. */ @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; @@ -45,6 +51,16 @@ public final class TopicUpdateParameterProperties { @JsonProperty(value = "dataResidencyBoundary") private DataResidencyBoundary dataResidencyBoundary; + /* + * The eventTypeInfo for the topic. + */ + @JsonProperty(value = "eventTypeInfo") + private EventTypeInfo eventTypeInfo; + + /** Creates an instance of TopicUpdateParameterProperties class. */ + public TopicUpdateParameterProperties() { + } + /** * Get the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso @@ -93,6 +109,28 @@ public TopicUpdateParameterProperties withInboundIpRules(List inb return this; } + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.minimumTlsVersionAllowed; + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the TopicUpdateParameterProperties object itself. + */ + public TopicUpdateParameterProperties withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + this.minimumTlsVersionAllowed = minimumTlsVersionAllowed; + return this; + } + /** * Get the disableLocalAuth property: This boolean is used to enable or disable local auth. Default value is false. * When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to @@ -137,6 +175,26 @@ public TopicUpdateParameterProperties withDataResidencyBoundary(DataResidencyBou return this; } + /** + * Get the eventTypeInfo property: The eventTypeInfo for the topic. + * + * @return the eventTypeInfo value. + */ + public EventTypeInfo eventTypeInfo() { + return this.eventTypeInfo; + } + + /** + * Set the eventTypeInfo property: The eventTypeInfo for the topic. + * + * @param eventTypeInfo the eventTypeInfo value to set. + * @return the TopicUpdateParameterProperties object itself. + */ + public TopicUpdateParameterProperties withEventTypeInfo(EventTypeInfo eventTypeInfo) { + this.eventTypeInfo = eventTypeInfo; + return this; + } + /** * Validates the instance. * @@ -146,5 +204,8 @@ public void validate() { if (inboundIpRules() != null) { inboundIpRules().forEach(e -> e.validate()); } + if (eventTypeInfo() != null) { + eventTypeInfo().validate(); + } } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerInner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerInner.java index ce60977f2e05..7156c6e13b43 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerInner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerInner.java @@ -27,6 +27,10 @@ public final class VerifiedPartnerInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of VerifiedPartnerInner class. */ + public VerifiedPartnerInner() { + } + /** * Get the innerProperties property: Properties of the verified partner. * @@ -137,6 +141,29 @@ public VerifiedPartnerInner withPartnerTopicDetails(PartnerDetails partnerTopicD return this; } + /** + * Get the partnerDestinationDetails property: Details of the partner destination scenario. + * + * @return the partnerDestinationDetails value. + */ + public PartnerDetails partnerDestinationDetails() { + return this.innerProperties() == null ? null : this.innerProperties().partnerDestinationDetails(); + } + + /** + * Set the partnerDestinationDetails property: Details of the partner destination scenario. + * + * @param partnerDestinationDetails the partnerDestinationDetails value to set. + * @return the VerifiedPartnerInner object itself. + */ + public VerifiedPartnerInner withPartnerDestinationDetails(PartnerDetails partnerDestinationDetails) { + if (this.innerProperties() == null) { + this.innerProperties = new VerifiedPartnerProperties(); + } + this.innerProperties().withPartnerDestinationDetails(partnerDestinationDetails); + return this; + } + /** * Get the provisioningState property: Provisioning state of the verified partner. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerProperties.java index 78006b1192b3..f85cfa8d557e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/VerifiedPartnerProperties.java @@ -37,12 +37,22 @@ public final class VerifiedPartnerProperties { @JsonProperty(value = "partnerTopicDetails") private PartnerDetails partnerTopicDetails; + /* + * Details of the partner destination scenario. + */ + @JsonProperty(value = "partnerDestinationDetails") + private PartnerDetails partnerDestinationDetails; + /* * Provisioning state of the verified partner. */ @JsonProperty(value = "provisioningState") private VerifiedPartnerProvisioningState provisioningState; + /** Creates an instance of VerifiedPartnerProperties class. */ + public VerifiedPartnerProperties() { + } + /** * Get the partnerRegistrationImmutableId property: ImmutableId of the corresponding partner registration. * @@ -123,6 +133,26 @@ public VerifiedPartnerProperties withPartnerTopicDetails(PartnerDetails partnerT return this; } + /** + * Get the partnerDestinationDetails property: Details of the partner destination scenario. + * + * @return the partnerDestinationDetails value. + */ + public PartnerDetails partnerDestinationDetails() { + return this.partnerDestinationDetails; + } + + /** + * Set the partnerDestinationDetails property: Details of the partner destination scenario. + * + * @param partnerDestinationDetails the partnerDestinationDetails value to set. + * @return the VerifiedPartnerProperties object itself. + */ + public VerifiedPartnerProperties withPartnerDestinationDetails(PartnerDetails partnerDestinationDetails) { + this.partnerDestinationDetails = partnerDestinationDetails; + return this; + } + /** * Get the provisioningState property: Provisioning state of the verified partner. * @@ -152,5 +182,8 @@ public void validate() { if (partnerTopicDetails() != null) { partnerTopicDetails().validate(); } + if (partnerDestinationDetails() != null) { + partnerDestinationDetails().validate(); + } } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookEventSubscriptionDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookEventSubscriptionDestinationProperties.java index 57fdc9572dbf..e0c29323a1b6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookEventSubscriptionDestinationProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookEventSubscriptionDestinationProperties.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeMapping; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -13,15 +14,13 @@ @Fluent public final class WebhookEventSubscriptionDestinationProperties { /* - * The URL that represents the endpoint of the destination of an event - * subscription. + * The URL that represents the endpoint of the destination of an event subscription. */ @JsonProperty(value = "endpointUrl") private String endpointUrl; /* - * The base URL that represents the endpoint of the destination of an event - * subscription. + * The base URL that represents the endpoint of the destination of an event subscription. */ @JsonProperty(value = "endpointBaseUrl", access = JsonProperty.Access.WRITE_ONLY) private String endpointBaseUrl; @@ -39,15 +38,15 @@ public final class WebhookEventSubscriptionDestinationProperties { private Integer preferredBatchSizeInKilobytes; /* - * The Azure Active Directory Tenant ID to get the access token that will - * be included as the bearer token in delivery requests. + * The Azure Active Directory Tenant ID to get the access token that will be included as the bearer token in + * delivery requests. */ @JsonProperty(value = "azureActiveDirectoryTenantId") private String azureActiveDirectoryTenantId; /* - * The Azure Active Directory Application ID or URI to get the access token - * that will be included as the bearer token in delivery requests. + * The Azure Active Directory Application ID or URI to get the access token that will be included as the bearer + * token in delivery requests. */ @JsonProperty(value = "azureActiveDirectoryApplicationIdOrUri") private String azureActiveDirectoryApplicationIdOrUri; @@ -58,6 +57,16 @@ public final class WebhookEventSubscriptionDestinationProperties { @JsonProperty(value = "deliveryAttributeMappings") private List deliveryAttributeMappings; + /* + * Minimum TLS version that should be supported by webhook endpoint + */ + @JsonProperty(value = "minimumTlsVersionAllowed") + private TlsVersion minimumTlsVersionAllowed; + + /** Creates an instance of WebhookEventSubscriptionDestinationProperties class. */ + public WebhookEventSubscriptionDestinationProperties() { + } + /** * Get the endpointUrl property: The URL that represents the endpoint of the destination of an event subscription. * @@ -196,6 +205,27 @@ public WebhookEventSubscriptionDestinationProperties withDeliveryAttributeMappin return this; } + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version that should be supported by webhook endpoint. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.minimumTlsVersionAllowed; + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version that should be supported by webhook endpoint. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the WebhookEventSubscriptionDestinationProperties object itself. + */ + public WebhookEventSubscriptionDestinationProperties withMinimumTlsVersionAllowed( + TlsVersion minimumTlsVersionAllowed) { + this.minimumTlsVersionAllowed = minimumTlsVersionAllowed; + return this; + } + /** * Validates the instance. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookPartnerDestinationProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookPartnerDestinationProperties.java new file mode 100644 index 000000000000..12b552857327 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/fluent/models/WebhookPartnerDestinationProperties.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.models.PartnerClientAuthentication; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a partner destination webhook. */ +@Fluent +public final class WebhookPartnerDestinationProperties { + /* + * The URL that represents the endpoint of the partner destination. + */ + @JsonProperty(value = "endpointUrl") + private String endpointUrl; + + /* + * The base URL that represents the endpoint of the partner destination. + */ + @JsonProperty(value = "endpointBaseUrl") + private String endpointBaseUrl; + + /* + * Partner client authentication + */ + @JsonProperty(value = "clientAuthentication") + private PartnerClientAuthentication clientAuthentication; + + /** Creates an instance of WebhookPartnerDestinationProperties class. */ + public WebhookPartnerDestinationProperties() { + } + + /** + * Get the endpointUrl property: The URL that represents the endpoint of the partner destination. + * + * @return the endpointUrl value. + */ + public String endpointUrl() { + return this.endpointUrl; + } + + /** + * Set the endpointUrl property: The URL that represents the endpoint of the partner destination. + * + * @param endpointUrl the endpointUrl value to set. + * @return the WebhookPartnerDestinationProperties object itself. + */ + public WebhookPartnerDestinationProperties withEndpointUrl(String endpointUrl) { + this.endpointUrl = endpointUrl; + return this; + } + + /** + * Get the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. + * + * @return the endpointBaseUrl value. + */ + public String endpointBaseUrl() { + return this.endpointBaseUrl; + } + + /** + * Set the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. + * + * @param endpointBaseUrl the endpointBaseUrl value to set. + * @return the WebhookPartnerDestinationProperties object itself. + */ + public WebhookPartnerDestinationProperties withEndpointBaseUrl(String endpointBaseUrl) { + this.endpointBaseUrl = endpointBaseUrl; + return this; + } + + /** + * Get the clientAuthentication property: Partner client authentication. + * + * @return the clientAuthentication value. + */ + public PartnerClientAuthentication clientAuthentication() { + return this.clientAuthentication; + } + + /** + * Set the clientAuthentication property: Partner client authentication. + * + * @param clientAuthentication the clientAuthentication value to set. + * @return the WebhookPartnerDestinationProperties object itself. + */ + public WebhookPartnerDestinationProperties withClientAuthentication( + PartnerClientAuthentication clientAuthentication) { + this.clientAuthentication = clientAuthentication; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (clientAuthentication() != null) { + clientAuthentication().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java new file mode 100644 index 000000000000..55ca0d538fd3 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificateImpl.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateInner; +import com.azure.resourcemanager.eventgrid.models.CaCertificate; +import com.azure.resourcemanager.eventgrid.models.CaCertificateProvisioningState; +import java.time.OffsetDateTime; + +public final class CaCertificateImpl implements CaCertificate, CaCertificate.Definition, CaCertificate.Update { + private CaCertificateInner innerObject; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String description() { + return this.innerModel().description(); + } + + public String encodedCertificate() { + return this.innerModel().encodedCertificate(); + } + + public OffsetDateTime issueTimeInUtc() { + return this.innerModel().issueTimeInUtc(); + } + + public OffsetDateTime expiryTimeInUtc() { + return this.innerModel().expiryTimeInUtc(); + } + + public CaCertificateProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public CaCertificateInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String namespaceName; + + private String caCertificateName; + + public CaCertificateImpl withExistingNamespace(String resourceGroupName, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + return this; + } + + public CaCertificate create() { + this.innerObject = + serviceManager + .serviceClient() + .getCaCertificates() + .createOrUpdate(resourceGroupName, namespaceName, caCertificateName, this.innerModel(), Context.NONE); + return this; + } + + public CaCertificate create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCaCertificates() + .createOrUpdate(resourceGroupName, namespaceName, caCertificateName, this.innerModel(), context); + return this; + } + + CaCertificateImpl(String name, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = new CaCertificateInner(); + this.serviceManager = serviceManager; + this.caCertificateName = name; + } + + public CaCertificateImpl update() { + return this; + } + + public CaCertificate apply() { + this.innerObject = + serviceManager + .serviceClient() + .getCaCertificates() + .createOrUpdate(resourceGroupName, namespaceName, caCertificateName, this.innerModel(), Context.NONE); + return this; + } + + public CaCertificate apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCaCertificates() + .createOrUpdate(resourceGroupName, namespaceName, caCertificateName, this.innerModel(), context); + return this; + } + + CaCertificateImpl( + CaCertificateInner innerObject, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.namespaceName = Utils.getValueFromIdByName(innerObject.id(), "namespaces"); + this.caCertificateName = Utils.getValueFromIdByName(innerObject.id(), "caCertificates"); + } + + public CaCertificate refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getCaCertificates() + .getWithResponse(resourceGroupName, namespaceName, caCertificateName, Context.NONE) + .getValue(); + return this; + } + + public CaCertificate refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCaCertificates() + .getWithResponse(resourceGroupName, namespaceName, caCertificateName, context) + .getValue(); + return this; + } + + public CaCertificateImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public CaCertificateImpl withEncodedCertificate(String encodedCertificate) { + this.innerModel().withEncodedCertificate(encodedCertificate); + return this; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesClientImpl.java new file mode 100644 index 000000000000..7f3181d190cf --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesClientImpl.java @@ -0,0 +1,1270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient; +import com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateInner; +import com.azure.resourcemanager.eventgrid.models.CaCertificatesListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CaCertificatesClient. */ +public final class CaCertificatesClientImpl implements CaCertificatesClient { + /** The proxy service used to perform REST calls. */ + private final CaCertificatesService service; + + /** The service client containing this operation class. */ + private final EventGridManagementClientImpl client; + + /** + * Initializes an instance of CaCertificatesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CaCertificatesClientImpl(EventGridManagementClientImpl client) { + this.service = + RestProxy.create(CaCertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventGridManagementClientCaCertificates to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventGridManagementC") + public interface CaCertificatesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("caCertificateName") String caCertificateName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("caCertificateName") String caCertificateName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CaCertificateInner caCertificateInfo, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("caCertificateName") String caCertificateName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespace( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get a CA certificate. + * + *

Get properties of a CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 properties of a CA certificate along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String caCertificateName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (caCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + caCertificateName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a CA certificate. + * + *

Get properties of a CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @param context The context to associate with this operation. + * @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 properties of a CA certificate along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String caCertificateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (caCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + caCertificateName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get a CA certificate. + * + *

Get properties of a CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 properties of a CA certificate on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String namespaceName, String caCertificateName) { + return getWithResponseAsync(resourceGroupName, namespaceName, caCertificateName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a CA certificate. + * + *

Get properties of a CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @param context The context to associate with this operation. + * @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 properties of a CA certificate along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String namespaceName, String caCertificateName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, caCertificateName, context).block(); + } + + /** + * Get a CA certificate. + * + *

Get properties of a CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 properties of a CA certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CaCertificateInner get(String resourceGroupName, String namespaceName, String caCertificateName) { + return getWithResponse(resourceGroupName, namespaceName, caCertificateName, Context.NONE).getValue(); + } + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @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 the CA Certificate resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (caCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); + } + if (caCertificateInfo == null) { + return Mono + .error(new IllegalArgumentException("Parameter caCertificateInfo is required and cannot be null.")); + } else { + caCertificateInfo.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + caCertificateName, + this.client.getApiVersion(), + caCertificateInfo, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @param context The context to associate with this operation. + * @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 the CA Certificate resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (caCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); + } + if (caCertificateInfo == null) { + return Mono + .error(new IllegalArgumentException("Parameter caCertificateInfo is required and cannot be null.")); + } else { + caCertificateInfo.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + caCertificateName, + this.client.getApiVersion(), + caCertificateInfo, + accept, + context); + } + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @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 the {@link PollerFlux} for polling of the CA Certificate resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CaCertificateInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + CaCertificateInner.class, + CaCertificateInner.class, + this.client.getContext()); + } + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of the CA Certificate resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CaCertificateInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, namespaceName, caCertificateName, caCertificateInfo, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CaCertificateInner.class, CaCertificateInner.class, context); + } + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @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 the {@link SyncPoller} for polling of the CA Certificate resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CaCertificateInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo) + .getSyncPoller(); + } + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of the CA Certificate resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CaCertificateInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo, context) + .getSyncPoller(); + } + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @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 the CA Certificate resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @param context The context to associate with this operation. + * @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 the CA Certificate resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @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 the CA Certificate resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CaCertificateInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo) { + return createOrUpdateAsync(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo).block(); + } + + /** + * Create or update a CA certificate. + * + *

Create or update a CA certificate with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName The CA certificate name. + * @param caCertificateInfo CA certificate information. + * @param context The context to associate with this operation. + * @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 the CA Certificate resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CaCertificateInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String caCertificateName, + CaCertificateInner caCertificateInfo, + Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, caCertificateName, caCertificateInfo, context) + .block(); + } + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String caCertificateName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (caCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + caCertificateName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @param context The context to associate with this operation. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String caCertificateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (caCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter caCertificateName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + caCertificateName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String caCertificateName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, caCertificateName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String caCertificateName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, caCertificateName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String caCertificateName) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, caCertificateName).getSyncPoller(); + } + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String caCertificateName, Context context) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, caCertificateName, context).getSyncPoller(); + } + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String namespaceName, String caCertificateName) { + return beginDeleteAsync(resourceGroupName, namespaceName, caCertificateName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @param context The context to associate with this operation. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String namespaceName, String caCertificateName, Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, caCertificateName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String caCertificateName) { + deleteAsync(resourceGroupName, namespaceName, caCertificateName).block(); + } + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @param context The context to associate with this operation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String caCertificateName, Context context) { + deleteAsync(resourceGroupName, namespaceName, caCertificateName, context).block(); + } + + /** + * List all CA certificates under a namespace. + * + *

Get all the CA certificates under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the CA certificates under a namespace along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all CA certificates under a namespace. + * + *

Get all the CA certificates under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the CA certificates under a namespace along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all CA certificates under a namespace. + * + *

Get all the CA certificates under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the CA certificates under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List all CA certificates under a namespace. + * + *

Get all the CA certificates under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the CA certificates under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List all CA certificates under a namespace. + * + *

Get all the CA certificates under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the CA certificates under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top, context), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); + } + + /** + * List all CA certificates under a namespace. + * + *

Get all the CA certificates under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top)); + } + + /** + * List all CA certificates under a namespace. + * + *

Get all the CA certificates under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 result of the List CA Certificate operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @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 result of the List CA Certificate operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java new file mode 100644 index 000000000000..f60d53ddf0f1 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/CaCertificatesImpl.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient; +import com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateInner; +import com.azure.resourcemanager.eventgrid.models.CaCertificate; +import com.azure.resourcemanager.eventgrid.models.CaCertificates; + +public final class CaCertificatesImpl implements CaCertificates { + private static final ClientLogger LOGGER = new ClientLogger(CaCertificatesImpl.class); + + private final CaCertificatesClient innerClient; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public CaCertificatesImpl( + CaCertificatesClient innerClient, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String namespaceName, String caCertificateName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, namespaceName, caCertificateName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CaCertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CaCertificate get(String resourceGroupName, String namespaceName, String caCertificateName) { + CaCertificateInner inner = this.serviceClient().get(resourceGroupName, namespaceName, caCertificateName); + if (inner != null) { + return new CaCertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String namespaceName, String caCertificateName) { + this.serviceClient().delete(resourceGroupName, namespaceName, caCertificateName); + } + + public void delete(String resourceGroupName, String namespaceName, String caCertificateName, Context context) { + this.serviceClient().delete(resourceGroupName, namespaceName, caCertificateName, context); + } + + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + PagedIterable inner = + this.serviceClient().listByNamespace(resourceGroupName, namespaceName); + return Utils.mapPage(inner, inner1 -> new CaCertificateImpl(inner1, this.manager())); + } + + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().listByNamespace(resourceGroupName, namespaceName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new CaCertificateImpl(inner1, this.manager())); + } + + public CaCertificate getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String caCertificateName = Utils.getValueFromIdByName(id, "caCertificates"); + if (caCertificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'caCertificates'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, caCertificateName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String caCertificateName = Utils.getValueFromIdByName(id, "caCertificates"); + if (caCertificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'caCertificates'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, caCertificateName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String caCertificateName = Utils.getValueFromIdByName(id, "caCertificates"); + if (caCertificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'caCertificates'.", id))); + } + this.delete(resourceGroupName, namespaceName, caCertificateName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String caCertificateName = Utils.getValueFromIdByName(id, "caCertificates"); + if (caCertificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'caCertificates'.", id))); + } + this.delete(resourceGroupName, namespaceName, caCertificateName, context); + } + + private CaCertificatesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + public CaCertificateImpl define(String name) { + return new CaCertificateImpl(name, this.manager()); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java index b236d50e28d6..bb91035b937d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.eventgrid.models.ChannelProvisioningState; import com.azure.resourcemanager.eventgrid.models.ChannelType; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationInfo; import com.azure.resourcemanager.eventgrid.models.PartnerTopicInfo; import com.azure.resourcemanager.eventgrid.models.ReadinessState; import java.time.OffsetDateTime; @@ -45,6 +46,10 @@ public PartnerTopicInfo partnerTopicInfo() { return this.innerModel().partnerTopicInfo(); } + public PartnerDestinationInfo partnerDestinationInfo() { + return this.innerModel().partnerDestinationInfo(); + } + public String messageForActivation() { return this.innerModel().messageForActivation(); } @@ -167,16 +172,16 @@ public Channel refresh(Context context) { return this; } - public EventSubscriptionFullUrl getFullUrl() { - return serviceManager.channels().getFullUrl(resourceGroupName, partnerNamespaceName, channelName); - } - public Response getFullUrlWithResponse(Context context) { return serviceManager .channels() .getFullUrlWithResponse(resourceGroupName, partnerNamespaceName, channelName, context); } + public EventSubscriptionFullUrl getFullUrl() { + return serviceManager.channels().getFullUrl(resourceGroupName, partnerNamespaceName, channelName); + } + public ChannelImpl withChannelType(ChannelType channelType) { this.innerModel().withChannelType(channelType); return this; @@ -187,6 +192,11 @@ public ChannelImpl withPartnerTopicInfo(PartnerTopicInfo partnerTopicInfo) { return this; } + public ChannelImpl withPartnerDestinationInfo(PartnerDestinationInfo partnerDestinationInfo) { + this.innerModel().withPartnerDestinationInfo(partnerDestinationInfo); + return this; + } + public ChannelImpl withMessageForActivation(String messageForActivation) { this.innerModel().withMessageForActivation(messageForActivation); return this; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsClientImpl.java index 1e2584301766..b19ecb03a04c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsClientImpl.java @@ -66,11 +66,10 @@ public final class ChannelsClientImpl implements ChannelsClient { */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface ChannelsService { + public interface ChannelsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -85,8 +84,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -102,8 +100,7 @@ Mono> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -117,8 +114,7 @@ Mono>> delete( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -133,8 +129,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}/channels") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPartnerNamespace( @@ -150,8 +145,7 @@ Mono> listByPartnerNamespace( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}/getFullUrl") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/channels/{channelName}/getFullUrl") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getFullUrl( @@ -176,7 +170,9 @@ Mono> listByPartnerNamespaceNext( } /** - * Get properties of a channel. + * Get a channel. + * + *

Get properties of a channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -230,7 +226,9 @@ private Mono> getWithResponseAsync( } /** - * Get properties of a channel. + * Get a channel. + * + *

Get properties of a channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -282,7 +280,9 @@ private Mono> getWithResponseAsync( } /** - * Get properties of a channel. + * Get a channel. + * + *

Get properties of a channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -299,41 +299,47 @@ private Mono getAsync(String resourceGroupName, String partnerName } /** - * Get properties of a channel. + * Get a channel. + * + *

Get properties of a channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. + * @param context The context to associate with this operation. * @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 properties of a channel. + * @return properties of a channel along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ChannelInner get(String resourceGroupName, String partnerNamespaceName, String channelName) { - return getAsync(resourceGroupName, partnerNamespaceName, channelName).block(); + public Response getWithResponse( + String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { + return getWithResponseAsync(resourceGroupName, partnerNamespaceName, channelName, context).block(); } /** - * Get properties of a channel. + * Get a channel. + * + *

Get properties of a channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. - * @param context The context to associate with this operation. * @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 properties of a channel along with {@link Response}. + * @return properties of a channel. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { - return getWithResponseAsync(resourceGroupName, partnerNamespaceName, channelName, context).block(); + public ChannelInner get(String resourceGroupName, String partnerNamespaceName, String channelName) { + return getWithResponse(resourceGroupName, partnerNamespaceName, channelName, Context.NONE).getValue(); } /** - * Synchronously creates or updates a new channel with the specified parameters. + * Create or update a channel. + * + *

Synchronously creates or updates a new channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -394,7 +400,9 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Synchronously creates or updates a new channel with the specified parameters. + * Create or update a channel. + * + *

Synchronously creates or updates a new channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -457,7 +465,9 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Synchronously creates or updates a new channel with the specified parameters. + * Create or update a channel. + * + *

Synchronously creates or updates a new channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -476,50 +486,58 @@ private Mono createOrUpdateAsync( } /** - * Synchronously creates or updates a new channel with the specified parameters. + * Create or update a channel. + * + *

Synchronously creates or updates a new channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelInfo Channel information. + * @param context The context to associate with this operation. * @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 channel info. + * @return channel info along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ChannelInner createOrUpdate( - String resourceGroupName, String partnerNamespaceName, String channelName, ChannelInner channelInfo) { - return createOrUpdateAsync(resourceGroupName, partnerNamespaceName, channelName, channelInfo).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String partnerNamespaceName, + String channelName, + ChannelInner channelInfo, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, partnerNamespaceName, channelName, channelInfo, context) + .block(); } /** - * Synchronously creates or updates a new channel with the specified parameters. + * Create or update a channel. + * + *

Synchronously creates or updates a new channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelInfo Channel information. - * @param context The context to associate with this operation. * @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 channel info along with {@link Response}. + * @return channel info. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String partnerNamespaceName, - String channelName, - ChannelInner channelInfo, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, partnerNamespaceName, channelName, channelInfo, context) - .block(); + public ChannelInner createOrUpdate( + String resourceGroupName, String partnerNamespaceName, String channelName, ChannelInner channelInfo) { + return createOrUpdateWithResponse( + resourceGroupName, partnerNamespaceName, channelName, channelInfo, Context.NONE) + .getValue(); } /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -571,7 +589,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -621,7 +641,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -643,7 +665,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -666,7 +690,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -679,11 +705,13 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String partnerNamespaceName, String channelName) { - return beginDeleteAsync(resourceGroupName, partnerNamespaceName, channelName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, partnerNamespaceName, channelName).getSyncPoller(); } /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -697,11 +725,13 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { - return beginDeleteAsync(resourceGroupName, partnerNamespaceName, channelName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, partnerNamespaceName, channelName, context).getSyncPoller(); } /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -719,7 +749,9 @@ private Mono deleteAsync(String resourceGroupName, String partnerNamespace } /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -739,7 +771,9 @@ private Mono deleteAsync( } /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -754,7 +788,9 @@ public void delete(String resourceGroupName, String partnerNamespaceName, String } /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -770,7 +806,9 @@ public void delete(String resourceGroupName, String partnerNamespaceName, String } /** - * Synchronously updates a channel with the specified parameters. + * Update a Channel. + * + *

Synchronously updates a channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -834,7 +872,9 @@ private Mono> updateWithResponseAsync( } /** - * Synchronously updates a channel with the specified parameters. + * Update a Channel. + * + *

Synchronously updates a channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -897,7 +937,9 @@ private Mono> updateWithResponseAsync( } /** - * Synchronously updates a channel with the specified parameters. + * Update a Channel. + * + *

Synchronously updates a channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -919,52 +961,58 @@ private Mono updateAsync( } /** - * Synchronously updates a channel with the specified parameters. + * Update a Channel. + * + *

Synchronously updates a channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelUpdateParameters Channel update information. + * @param context The context to associate with this operation. * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update( + public Response updateWithResponse( String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters) { - updateAsync(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters).block(); + ChannelUpdateParameters channelUpdateParameters, + Context context) { + return updateWithResponseAsync( + resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters, context) + .block(); } /** - * Synchronously updates a channel with the specified parameters. + * Update a Channel. + * + *

Synchronously updates a channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelUpdateParameters Channel update information. - * @param context The context to associate with this operation. * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + public void update( String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters, - Context context) { - return updateWithResponseAsync( - resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters, context) - .block(); + ChannelUpdateParameters channelUpdateParameters) { + updateWithResponse(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters, Context.NONE); } /** - * List all the channels in a partner namespace. + * List channels. + * + *

List all the channels in a partner namespace. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1033,7 +1081,9 @@ private Mono> listByPartnerNamespaceSinglePageAsync( } /** - * List all the channels in a partner namespace. + * List channels. + * + *

List all the channels in a partner namespace. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1100,7 +1150,9 @@ private Mono> listByPartnerNamespaceSinglePageAsync( } /** - * List all the channels in a partner namespace. + * List channels. + * + *

List all the channels in a partner namespace. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1126,7 +1178,9 @@ private PagedFlux listByPartnerNamespaceAsync( } /** - * List all the channels in a partner namespace. + * List channels. + * + *

List all the channels in a partner namespace. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1145,7 +1199,9 @@ private PagedFlux listByPartnerNamespaceAsync(String resourceGroup } /** - * List all the channels in a partner namespace. + * List channels. + * + *

List all the channels in a partner namespace. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1172,7 +1228,9 @@ private PagedFlux listByPartnerNamespaceAsync( } /** - * List all the channels in a partner namespace. + * List channels. + * + *

List all the channels in a partner namespace. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1189,7 +1247,9 @@ public PagedIterable listByPartnerNamespace(String resourceGroupNa } /** - * List all the channels in a partner namespace. + * List channels. + * + *

List all the channels in a partner namespace. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1215,7 +1275,9 @@ public PagedIterable listByPartnerNamespace( } /** - * Get the full endpoint URL of a partner destination channel. + * Get full URL of partner destination channel. + * + *

Get the full endpoint URL of a partner destination channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1270,7 +1332,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL of a partner destination channel. + * Get full URL of partner destination channel. + * + *

Get the full endpoint URL of a partner destination channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1323,7 +1387,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL of a partner destination channel. + * Get full URL of partner destination channel. + * + *

Get the full endpoint URL of a partner destination channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1341,44 +1407,49 @@ private Mono getFullUrlAsync( } /** - * Get the full endpoint URL of a partner destination channel. + * Get full URL of partner destination channel. + * + *

Get the full endpoint URL of a partner destination channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the Channel. + * @param context The context to associate with this operation. * @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 the full endpoint URL of a partner destination channel. + * @return the full endpoint URL of a partner destination channel along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl( - String resourceGroupName, String partnerNamespaceName, String channelName) { - return getFullUrlAsync(resourceGroupName, partnerNamespaceName, channelName).block(); + public Response getFullUrlWithResponse( + String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { + return getFullUrlWithResponseAsync(resourceGroupName, partnerNamespaceName, channelName, context).block(); } /** - * Get the full endpoint URL of a partner destination channel. + * Get full URL of partner destination channel. + * + *

Get the full endpoint URL of a partner destination channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the Channel. - * @param context The context to associate with this operation. * @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 the full endpoint URL of a partner destination channel along with {@link Response}. + * @return the full endpoint URL of a partner destination channel. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse( - String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { - return getFullUrlWithResponseAsync(resourceGroupName, partnerNamespaceName, channelName, context).block(); + public EventSubscriptionFullUrlInner getFullUrl( + String resourceGroupName, String partnerNamespaceName, String channelName) { + return getFullUrlWithResponse(resourceGroupName, partnerNamespaceName, channelName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1415,7 +1486,8 @@ private Mono> listByPartnerNamespaceNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsImpl.java index 5ed1dea9992a..bf4af91a1669 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ChannelsImpl.java @@ -30,15 +30,6 @@ public ChannelsImpl( this.serviceManager = serviceManager; } - public Channel get(String resourceGroupName, String partnerNamespaceName, String channelName) { - ChannelInner inner = this.serviceClient().get(resourceGroupName, partnerNamespaceName, channelName); - if (inner != null) { - return new ChannelImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { Response inner = @@ -54,6 +45,15 @@ public Response getWithResponse( } } + public Channel get(String resourceGroupName, String partnerNamespaceName, String channelName) { + ChannelInner inner = this.serviceClient().get(resourceGroupName, partnerNamespaceName, channelName); + if (inner != null) { + return new ChannelImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String partnerNamespaceName, String channelName) { this.serviceClient().delete(resourceGroupName, partnerNamespaceName, channelName); } @@ -62,14 +62,6 @@ public void delete(String resourceGroupName, String partnerNamespaceName, String this.serviceClient().delete(resourceGroupName, partnerNamespaceName, channelName, context); } - public void update( - String resourceGroupName, - String partnerNamespaceName, - String channelName, - ChannelUpdateParameters channelUpdateParameters) { - this.serviceClient().update(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters); - } - public Response updateWithResponse( String resourceGroupName, String partnerNamespaceName, @@ -81,6 +73,14 @@ public Response updateWithResponse( .updateWithResponse(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters, context); } + public void update( + String resourceGroupName, + String partnerNamespaceName, + String channelName, + ChannelUpdateParameters channelUpdateParameters) { + this.serviceClient().update(resourceGroupName, partnerNamespaceName, channelName, channelUpdateParameters); + } + public PagedIterable listByPartnerNamespace(String resourceGroupName, String partnerNamespaceName) { PagedIterable inner = this.serviceClient().listByPartnerNamespace(resourceGroupName, partnerNamespaceName); @@ -94,17 +94,6 @@ public PagedIterable listByPartnerNamespace( return Utils.mapPage(inner, inner1 -> new ChannelImpl(inner1, this.manager())); } - public EventSubscriptionFullUrl getFullUrl( - String resourceGroupName, String partnerNamespaceName, String channelName) { - EventSubscriptionFullUrlInner inner = - this.serviceClient().getFullUrl(resourceGroupName, partnerNamespaceName, channelName); - if (inner != null) { - return new EventSubscriptionFullUrlImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getFullUrlWithResponse( String resourceGroupName, String partnerNamespaceName, String channelName, Context context) { Response inner = @@ -120,6 +109,17 @@ public Response getFullUrlWithResponse( } } + public EventSubscriptionFullUrl getFullUrl( + String resourceGroupName, String partnerNamespaceName, String channelName) { + EventSubscriptionFullUrlInner inner = + this.serviceClient().getFullUrl(resourceGroupName, partnerNamespaceName, channelName); + if (inner != null) { + return new EventSubscriptionFullUrlImpl(inner, this.manager()); + } else { + return null; + } + } + public Channel getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java new file mode 100644 index 000000000000..3a0fcb07b13b --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupImpl.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner; +import com.azure.resourcemanager.eventgrid.models.ClientGroup; +import com.azure.resourcemanager.eventgrid.models.ClientGroupProvisioningState; + +public final class ClientGroupImpl implements ClientGroup, ClientGroup.Definition, ClientGroup.Update { + private ClientGroupInner innerObject; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String description() { + return this.innerModel().description(); + } + + public String query() { + return this.innerModel().query(); + } + + public ClientGroupProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ClientGroupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String namespaceName; + + private String clientGroupName; + + public ClientGroupImpl withExistingNamespace(String resourceGroupName, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + return this; + } + + public ClientGroup create() { + this.innerObject = + serviceManager + .serviceClient() + .getClientGroups() + .createOrUpdate(resourceGroupName, namespaceName, clientGroupName, this.innerModel(), Context.NONE); + return this; + } + + public ClientGroup create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getClientGroups() + .createOrUpdate(resourceGroupName, namespaceName, clientGroupName, this.innerModel(), context); + return this; + } + + ClientGroupImpl(String name, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = new ClientGroupInner(); + this.serviceManager = serviceManager; + this.clientGroupName = name; + } + + public ClientGroupImpl update() { + return this; + } + + public ClientGroup apply() { + this.innerObject = + serviceManager + .serviceClient() + .getClientGroups() + .createOrUpdate(resourceGroupName, namespaceName, clientGroupName, this.innerModel(), Context.NONE); + return this; + } + + public ClientGroup apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getClientGroups() + .createOrUpdate(resourceGroupName, namespaceName, clientGroupName, this.innerModel(), context); + return this; + } + + ClientGroupImpl(ClientGroupInner innerObject, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.namespaceName = Utils.getValueFromIdByName(innerObject.id(), "namespaces"); + this.clientGroupName = Utils.getValueFromIdByName(innerObject.id(), "clientGroups"); + } + + public ClientGroup refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getClientGroups() + .getWithResponse(resourceGroupName, namespaceName, clientGroupName, Context.NONE) + .getValue(); + return this; + } + + public ClientGroup refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getClientGroups() + .getWithResponse(resourceGroupName, namespaceName, clientGroupName, context) + .getValue(); + return this; + } + + public ClientGroupImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public ClientGroupImpl withQuery(String query) { + this.innerModel().withQuery(query); + return this; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsClientImpl.java new file mode 100644 index 000000000000..a2b20f25edd9 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsClientImpl.java @@ -0,0 +1,1252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner; +import com.azure.resourcemanager.eventgrid.models.ClientGroupsListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ClientGroupsClient. */ +public final class ClientGroupsClientImpl implements ClientGroupsClient { + /** The proxy service used to perform REST calls. */ + private final ClientGroupsService service; + + /** The service client containing this operation class. */ + private final EventGridManagementClientImpl client; + + /** + * Initializes an instance of ClientGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ClientGroupsClientImpl(EventGridManagementClientImpl client) { + this.service = + RestProxy.create(ClientGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventGridManagementClientClientGroups to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventGridManagementC") + public interface ClientGroupsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("clientGroupName") String clientGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("clientGroupName") String clientGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ClientGroupInner clientGroupInfo, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("clientGroupName") String clientGroupName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespace( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get a client group. + * + *

Get properties of a client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 properties of a client group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String clientGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientGroupName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a client group. + * + *

Get properties of a client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @param context The context to associate with this operation. + * @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 properties of a client group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String clientGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientGroupName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get a client group. + * + *

Get properties of a client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 properties of a client group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String namespaceName, String clientGroupName) { + return getWithResponseAsync(resourceGroupName, namespaceName, clientGroupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a client group. + * + *

Get properties of a client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @param context The context to associate with this operation. + * @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 properties of a client group along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String namespaceName, String clientGroupName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, clientGroupName, context).block(); + } + + /** + * Get a client group. + * + *

Get properties of a client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 properties of a client group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClientGroupInner get(String resourceGroupName, String namespaceName, String clientGroupName) { + return getWithResponse(resourceGroupName, namespaceName, clientGroupName, Context.NONE).getValue(); + } + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @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 the Client group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); + } + if (clientGroupInfo == null) { + return Mono + .error(new IllegalArgumentException("Parameter clientGroupInfo is required and cannot be null.")); + } else { + clientGroupInfo.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientGroupName, + this.client.getApiVersion(), + clientGroupInfo, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @param context The context to associate with this operation. + * @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 the Client group resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String clientGroupName, + ClientGroupInner clientGroupInfo, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); + } + if (clientGroupInfo == null) { + return Mono + .error(new IllegalArgumentException("Parameter clientGroupInfo is required and cannot be null.")); + } else { + clientGroupInfo.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientGroupName, + this.client.getApiVersion(), + clientGroupInfo, + accept, + context); + } + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @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 the {@link PollerFlux} for polling of the Client group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClientGroupInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ClientGroupInner.class, + ClientGroupInner.class, + this.client.getContext()); + } + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of the Client group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClientGroupInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String clientGroupName, + ClientGroupInner clientGroupInfo, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, namespaceName, clientGroupName, clientGroupInfo, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ClientGroupInner.class, ClientGroupInner.class, context); + } + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @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 the {@link SyncPoller} for polling of the Client group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClientGroupInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo) + .getSyncPoller(); + } + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of the Client group resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClientGroupInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String clientGroupName, + ClientGroupInner clientGroupInfo, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo, context) + .getSyncPoller(); + } + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @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 the Client group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @param context The context to associate with this operation. + * @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 the Client group resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String clientGroupName, + ClientGroupInner clientGroupInfo, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @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 the Client group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClientGroupInner createOrUpdate( + String resourceGroupName, String namespaceName, String clientGroupName, ClientGroupInner clientGroupInfo) { + return createOrUpdateAsync(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo).block(); + } + + /** + * Create or update a client group. + * + *

Create or update a client group with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName The client group name. + * @param clientGroupInfo Client group information. + * @param context The context to associate with this operation. + * @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 the Client group resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClientGroupInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String clientGroupName, + ClientGroupInner clientGroupInfo, + Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, clientGroupName, clientGroupInfo, context).block(); + } + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String clientGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientGroupName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @param context The context to associate with this operation. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String clientGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clientGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientGroupName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String clientGroupName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, clientGroupName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String clientGroupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, clientGroupName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String clientGroupName) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, clientGroupName).getSyncPoller(); + } + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String clientGroupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, clientGroupName, context).getSyncPoller(); + } + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String namespaceName, String clientGroupName) { + return beginDeleteAsync(resourceGroupName, namespaceName, clientGroupName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @param context The context to associate with this operation. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String namespaceName, String clientGroupName, Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, clientGroupName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String clientGroupName) { + deleteAsync(resourceGroupName, namespaceName, clientGroupName).block(); + } + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @param context The context to associate with this operation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String clientGroupName, Context context) { + deleteAsync(resourceGroupName, namespaceName, clientGroupName, context).block(); + } + + /** + * List all client groups under a namespace. + * + *

Get all the client groups under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the client groups under a namespace along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all client groups under a namespace. + * + *

Get all the client groups under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the client groups under a namespace along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all client groups under a namespace. + * + *

Get all the client groups under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the client groups under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List all client groups under a namespace. + * + *

Get all the client groups under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the client groups under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List all client groups under a namespace. + * + *

Get all the client groups under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the client groups under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top, context), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); + } + + /** + * List all client groups under a namespace. + * + *

Get all the client groups under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the client groups under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top)); + } + + /** + * List all client groups under a namespace. + * + *

Get all the client groups under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the client groups under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 result of the List Client Group operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @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 result of the List Client Group operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java new file mode 100644 index 000000000000..0c034c789b8c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientGroupsImpl.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner; +import com.azure.resourcemanager.eventgrid.models.ClientGroup; +import com.azure.resourcemanager.eventgrid.models.ClientGroups; + +public final class ClientGroupsImpl implements ClientGroups { + private static final ClientLogger LOGGER = new ClientLogger(ClientGroupsImpl.class); + + private final ClientGroupsClient innerClient; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public ClientGroupsImpl( + ClientGroupsClient innerClient, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String namespaceName, String clientGroupName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, namespaceName, clientGroupName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ClientGroupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ClientGroup get(String resourceGroupName, String namespaceName, String clientGroupName) { + ClientGroupInner inner = this.serviceClient().get(resourceGroupName, namespaceName, clientGroupName); + if (inner != null) { + return new ClientGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String namespaceName, String clientGroupName) { + this.serviceClient().delete(resourceGroupName, namespaceName, clientGroupName); + } + + public void delete(String resourceGroupName, String namespaceName, String clientGroupName, Context context) { + this.serviceClient().delete(resourceGroupName, namespaceName, clientGroupName, context); + } + + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + PagedIterable inner = this.serviceClient().listByNamespace(resourceGroupName, namespaceName); + return Utils.mapPage(inner, inner1 -> new ClientGroupImpl(inner1, this.manager())); + } + + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().listByNamespace(resourceGroupName, namespaceName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new ClientGroupImpl(inner1, this.manager())); + } + + public ClientGroup getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String clientGroupName = Utils.getValueFromIdByName(id, "clientGroups"); + if (clientGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clientGroups'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, clientGroupName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String clientGroupName = Utils.getValueFromIdByName(id, "clientGroups"); + if (clientGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clientGroups'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, clientGroupName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String clientGroupName = Utils.getValueFromIdByName(id, "clientGroups"); + if (clientGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clientGroups'.", id))); + } + this.delete(resourceGroupName, namespaceName, clientGroupName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String clientGroupName = Utils.getValueFromIdByName(id, "clientGroups"); + if (clientGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clientGroups'.", id))); + } + this.delete(resourceGroupName, namespaceName, clientGroupName, context); + } + + private ClientGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + public ClientGroupImpl define(String name) { + return new ClientGroupImpl(name, this.manager()); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java new file mode 100644 index 000000000000..09a85febbccd --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientImpl.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientInner; +import com.azure.resourcemanager.eventgrid.models.Client; +import com.azure.resourcemanager.eventgrid.models.ClientAuthentication; +import com.azure.resourcemanager.eventgrid.models.ClientCertificateAuthentication; +import com.azure.resourcemanager.eventgrid.models.ClientProvisioningState; +import com.azure.resourcemanager.eventgrid.models.ClientState; +import java.util.Collections; +import java.util.Map; + +public final class ClientImpl implements Client, Client.Definition, Client.Update { + private ClientInner innerObject; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String description() { + return this.innerModel().description(); + } + + public String authenticationName() { + return this.innerModel().authenticationName(); + } + + public ClientAuthentication authentication() { + return this.innerModel().authentication(); + } + + public ClientCertificateAuthentication clientCertificateAuthentication() { + return this.innerModel().clientCertificateAuthentication(); + } + + public ClientState state() { + return this.innerModel().state(); + } + + public Map attributes() { + Map inner = this.innerModel().attributes(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ClientProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ClientInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String namespaceName; + + private String clientName; + + public ClientImpl withExistingNamespace(String resourceGroupName, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + return this; + } + + public Client create() { + this.innerObject = + serviceManager + .serviceClient() + .getClients() + .createOrUpdate(resourceGroupName, namespaceName, clientName, this.innerModel(), Context.NONE); + return this; + } + + public Client create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getClients() + .createOrUpdate(resourceGroupName, namespaceName, clientName, this.innerModel(), context); + return this; + } + + ClientImpl(String name, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = new ClientInner(); + this.serviceManager = serviceManager; + this.clientName = name; + } + + public ClientImpl update() { + return this; + } + + public Client apply() { + this.innerObject = + serviceManager + .serviceClient() + .getClients() + .createOrUpdate(resourceGroupName, namespaceName, clientName, this.innerModel(), Context.NONE); + return this; + } + + public Client apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getClients() + .createOrUpdate(resourceGroupName, namespaceName, clientName, this.innerModel(), context); + return this; + } + + ClientImpl(ClientInner innerObject, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.namespaceName = Utils.getValueFromIdByName(innerObject.id(), "namespaces"); + this.clientName = Utils.getValueFromIdByName(innerObject.id(), "clients"); + } + + public Client refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getClients() + .getWithResponse(resourceGroupName, namespaceName, clientName, Context.NONE) + .getValue(); + return this; + } + + public Client refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getClients() + .getWithResponse(resourceGroupName, namespaceName, clientName, context) + .getValue(); + return this; + } + + public ClientImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public ClientImpl withAuthenticationName(String authenticationName) { + this.innerModel().withAuthenticationName(authenticationName); + return this; + } + + public ClientImpl withAuthentication(ClientAuthentication authentication) { + this.innerModel().withAuthentication(authentication); + return this; + } + + public ClientImpl withClientCertificateAuthentication( + ClientCertificateAuthentication clientCertificateAuthentication) { + this.innerModel().withClientCertificateAuthentication(clientCertificateAuthentication); + return this; + } + + public ClientImpl withState(ClientState state) { + this.innerModel().withState(state); + return this; + } + + public ClientImpl withAttributes(Map attributes) { + this.innerModel().withAttributes(attributes); + return this; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsClientImpl.java new file mode 100644 index 000000000000..50c633e64f40 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsClientImpl.java @@ -0,0 +1,1214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.ClientsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientInner; +import com.azure.resourcemanager.eventgrid.models.ClientsListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ClientsClient. */ +public final class ClientsClientImpl implements ClientsClient { + /** The proxy service used to perform REST calls. */ + private final ClientsService service; + + /** The service client containing this operation class. */ + private final EventGridManagementClientImpl client; + + /** + * Initializes an instance of ClientsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ClientsClientImpl(EventGridManagementClientImpl client) { + this.service = RestProxy.create(ClientsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventGridManagementClientClients to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventGridManagementC") + public interface ClientsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("clientName") String clientName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("clientName") String clientName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ClientInner clientInfo, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("clientName") String clientName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespace( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get a client. + * + *

Get properties of a client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 properties of a client along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String clientName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientName == null) { + return Mono.error(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a client. + * + *

Get properties of a client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @param context The context to associate with this operation. + * @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 properties of a client along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String clientName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientName == null) { + return Mono.error(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get a client. + * + *

Get properties of a client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 properties of a client on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String namespaceName, String clientName) { + return getWithResponseAsync(resourceGroupName, namespaceName, clientName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a client. + * + *

Get properties of a client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @param context The context to associate with this operation. + * @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 properties of a client along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String namespaceName, String clientName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, clientName, context).block(); + } + + /** + * Get a client. + * + *

Get properties of a client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 properties of a client. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClientInner get(String resourceGroupName, String namespaceName, String clientName) { + return getWithResponse(resourceGroupName, namespaceName, clientName, Context.NONE).getValue(); + } + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @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 the Client resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientName == null) { + return Mono.error(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); + } + if (clientInfo == null) { + return Mono.error(new IllegalArgumentException("Parameter clientInfo is required and cannot be null.")); + } else { + clientInfo.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientName, + this.client.getApiVersion(), + clientInfo, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @param context The context to associate with this operation. + * @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 the Client resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientName == null) { + return Mono.error(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); + } + if (clientInfo == null) { + return Mono.error(new IllegalArgumentException("Parameter clientInfo is required and cannot be null.")); + } else { + clientInfo.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientName, + this.client.getApiVersion(), + clientInfo, + accept, + context); + } + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @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 the {@link PollerFlux} for polling of the Client resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClientInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, clientName, clientInfo); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ClientInner.class, ClientInner.class, this.client.getContext()); + } + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of the Client resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClientInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, clientName, clientInfo, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ClientInner.class, ClientInner.class, context); + } + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @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 the {@link SyncPoller} for polling of the Client resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClientInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo) { + return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, clientName, clientInfo).getSyncPoller(); + } + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of the Client resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClientInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, namespaceName, clientName, clientInfo, context) + .getSyncPoller(); + } + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @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 the Client resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, clientName, clientInfo) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @param context The context to associate with this operation. + * @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 the Client resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, clientName, clientInfo, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @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 the Client resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClientInner createOrUpdate( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo) { + return createOrUpdateAsync(resourceGroupName, namespaceName, clientName, clientInfo).block(); + } + + /** + * Create or update a client. + * + *

Create or update a client with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName The client name. + * @param clientInfo Client information. + * @param context The context to associate with this operation. + * @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 the Client resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClientInner createOrUpdate( + String resourceGroupName, String namespaceName, String clientName, ClientInner clientInfo, Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, clientName, clientInfo, context).block(); + } + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String clientName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientName == null) { + return Mono.error(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @param context The context to associate with this operation. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String clientName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (clientName == null) { + return Mono.error(new IllegalArgumentException("Parameter clientName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + clientName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String clientName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName, clientName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String clientName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, clientName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String clientName) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, clientName).getSyncPoller(); + } + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String clientName, Context context) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, clientName, context).getSyncPoller(); + } + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String namespaceName, String clientName) { + return beginDeleteAsync(resourceGroupName, namespaceName, clientName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @param context The context to associate with this operation. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String namespaceName, String clientName, Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, clientName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String clientName) { + deleteAsync(resourceGroupName, namespaceName, clientName).block(); + } + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @param context The context to associate with this operation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String clientName, Context context) { + deleteAsync(resourceGroupName, namespaceName, clientName, context).block(); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the permission bindings under a namespace along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the permission bindings under a namespace along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top, context), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top)); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 result of the List Client operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @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 result of the List Client operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java new file mode 100644 index 000000000000..f6419e5eb21a --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ClientsImpl.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventgrid.fluent.ClientsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientInner; +import com.azure.resourcemanager.eventgrid.models.Client; +import com.azure.resourcemanager.eventgrid.models.Clients; + +public final class ClientsImpl implements Clients { + private static final ClientLogger LOGGER = new ClientLogger(ClientsImpl.class); + + private final ClientsClient innerClient; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public ClientsImpl(ClientsClient innerClient, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String namespaceName, String clientName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, namespaceName, clientName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ClientImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Client get(String resourceGroupName, String namespaceName, String clientName) { + ClientInner inner = this.serviceClient().get(resourceGroupName, namespaceName, clientName); + if (inner != null) { + return new ClientImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String namespaceName, String clientName) { + this.serviceClient().delete(resourceGroupName, namespaceName, clientName); + } + + public void delete(String resourceGroupName, String namespaceName, String clientName, Context context) { + this.serviceClient().delete(resourceGroupName, namespaceName, clientName, context); + } + + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + PagedIterable inner = this.serviceClient().listByNamespace(resourceGroupName, namespaceName); + return Utils.mapPage(inner, inner1 -> new ClientImpl(inner1, this.manager())); + } + + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().listByNamespace(resourceGroupName, namespaceName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new ClientImpl(inner1, this.manager())); + } + + public Client getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String clientName = Utils.getValueFromIdByName(id, "clients"); + if (clientName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clients'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, clientName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String clientName = Utils.getValueFromIdByName(id, "clients"); + if (clientName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clients'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, clientName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String clientName = Utils.getValueFromIdByName(id, "clients"); + if (clientName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clients'.", id))); + } + this.delete(resourceGroupName, namespaceName, clientName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String clientName = Utils.getValueFromIdByName(id, "clients"); + if (clientName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clients'.", id))); + } + this.delete(resourceGroupName, namespaceName, clientName, context); + } + + private ClientsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + public ClientImpl define(String name) { + return new ClientImpl(name, this.manager()); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsClientImpl.java index 7a0b41e6c79a..464b8a7130fd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsClientImpl.java @@ -69,11 +69,10 @@ public final class DomainEventSubscriptionsClientImpl implements DomainEventSubs */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface DomainEventSubscriptionsService { + public interface DomainEventSubscriptionsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDeliveryAttributes( @@ -88,8 +87,7 @@ Mono> getDeliveryAttributes( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -104,8 +102,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -121,8 +118,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -136,8 +132,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -153,8 +148,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getFullUrl( @@ -169,8 +163,7 @@ Mono> getFullUrl( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/eventSubscriptions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -196,10 +189,12 @@ Mono> listNext( } /** - * Get all delivery attributes for an event subscription for domain. + * Get delivery attributes for an event subscription for domain. + * + *

Get all delivery attributes for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -251,10 +246,12 @@ private Mono> getDeliveryAttributesWi } /** - * Get all delivery attributes for an event subscription for domain. + * Get delivery attributes for an event subscription for domain. + * + *

Get all delivery attributes for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -304,10 +301,12 @@ private Mono> getDeliveryAttributesWi } /** - * Get all delivery attributes for an event subscription for domain. + * Get delivery attributes for an event subscription for domain. + * + *

Get all delivery attributes for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -322,46 +321,53 @@ private Mono getDeliveryAttributesAsync( } /** - * Get all delivery attributes for an event subscription for domain. + * Get delivery attributes for an event subscription for domain. + * + *

Get all delivery attributes for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. * @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 all delivery attributes for an event subscription for domain. + * @return all delivery attributes for an event subscription for domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes( - String resourceGroupName, String domainName, String eventSubscriptionName) { - return getDeliveryAttributesAsync(resourceGroupName, domainName, eventSubscriptionName).block(); + public Response getDeliveryAttributesWithResponse( + String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName, context) + .block(); } /** - * Get all delivery attributes for an event subscription for domain. + * Get delivery attributes for an event subscription for domain. + * + *

Get all delivery attributes for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. * @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 all delivery attributes for an event subscription for domain along with {@link Response}. + * @return all delivery attributes for an event subscription for domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse( - String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName, context) - .block(); + public DeliveryAttributeListResultInner getDeliveryAttributes( + String resourceGroupName, String domainName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponse(resourceGroupName, domainName, eventSubscriptionName, Context.NONE) + .getValue(); } /** - * Get properties of an event subscription of a domain. + * Get an event subscription of a domain. + * + *

Get properties of an event subscription of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the partner topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -414,10 +420,12 @@ private Mono> getWithResponseAsync( } /** - * Get properties of an event subscription of a domain. + * Get an event subscription of a domain. + * + *

Get properties of an event subscription of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the partner topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. * @param context The context to associate with this operation. @@ -468,10 +476,12 @@ private Mono> getWithResponseAsync( } /** - * Get properties of an event subscription of a domain. + * Get an event subscription of a domain. + * + *

Get properties of an event subscription of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the partner topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -487,43 +497,49 @@ private Mono getAsync( } /** - * Get properties of an event subscription of a domain. + * Get an event subscription of a domain. + * + *

Get properties of an event subscription of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the partner topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. * @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 properties of an event subscription of a domain. + * @return properties of an event subscription of a domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner get(String resourceGroupName, String domainName, String eventSubscriptionName) { - return getAsync(resourceGroupName, domainName, eventSubscriptionName).block(); + public Response getWithResponse( + String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { + return getWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName, context).block(); } /** - * Get properties of an event subscription of a domain. + * Get an event subscription of a domain. + * + *

Get properties of an event subscription of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the partner topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. - * @param context The context to associate with this operation. * @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 properties of an event subscription of a domain along with {@link Response}. + * @return properties of an event subscription of a domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { - return getWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName, context).block(); + public EventSubscriptionInner get(String resourceGroupName, String domainName, String eventSubscriptionName) { + return getWithResponse(resourceGroupName, domainName, eventSubscriptionName, Context.NONE).getValue(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -589,7 +605,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -654,7 +672,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -686,7 +706,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -721,7 +743,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -739,12 +763,15 @@ public SyncPoller, EventSubscriptionInner> be String domainName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdateAsync(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo) + return this + .beginCreateOrUpdateAsync(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo) .getSyncPoller(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -764,13 +791,16 @@ public SyncPoller, EventSubscriptionInner> be String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo, context) .getSyncPoller(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -794,7 +824,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -821,7 +853,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -843,7 +877,9 @@ public EventSubscriptionInner createOrUpdate( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -868,7 +904,9 @@ public EventSubscriptionInner createOrUpdate( } /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -921,7 +959,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -972,7 +1012,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -995,7 +1037,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1019,7 +1063,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1033,11 +1079,13 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, String eventSubscriptionName) { - return beginDeleteAsync(resourceGroupName, domainName, eventSubscriptionName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, domainName, eventSubscriptionName).getSyncPoller(); } /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1052,11 +1100,13 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { - return beginDeleteAsync(resourceGroupName, domainName, eventSubscriptionName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, domainName, eventSubscriptionName, context).getSyncPoller(); } /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1075,7 +1125,9 @@ private Mono deleteAsync(String resourceGroupName, String domainName, Stri } /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1096,7 +1148,9 @@ private Mono deleteAsync( } /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1112,7 +1166,9 @@ public void delete(String resourceGroupName, String domainName, String eventSubs } /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1129,7 +1185,9 @@ public void delete(String resourceGroupName, String domainName, String eventSubs } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1196,7 +1254,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1262,7 +1322,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1293,7 +1355,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1327,7 +1391,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1344,12 +1410,15 @@ public SyncPoller, EventSubscriptionInner> be String domainName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdateAsync(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters) + return this + .beginUpdateAsync(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters) .getSyncPoller(); } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1368,13 +1437,16 @@ public SyncPoller, EventSubscriptionInner> be String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters, context) .getSyncPoller(); } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1397,7 +1469,9 @@ private Mono updateAsync( } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1423,7 +1497,9 @@ private Mono updateAsync( } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1445,7 +1521,9 @@ public EventSubscriptionInner update( } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1470,7 +1548,9 @@ public EventSubscriptionInner update( } /** - * Get the full endpoint URL for an event subscription for domain. + * Get full URL of an event subscription for domain. + * + *

Get the full endpoint URL for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -1525,7 +1605,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for an event subscription for domain. + * Get full URL of an event subscription for domain. + * + *

Get the full endpoint URL for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -1578,7 +1660,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for an event subscription for domain. + * Get full URL of an event subscription for domain. + * + *

Get the full endpoint URL for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -1596,42 +1680,48 @@ private Mono getFullUrlAsync( } /** - * Get the full endpoint URL for an event subscription for domain. + * Get full URL of an event subscription for domain. + * + *

Get the full endpoint URL for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. * @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 the full endpoint URL for an event subscription for domain. + * @return the full endpoint URL for an event subscription for domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl( - String resourceGroupName, String domainName, String eventSubscriptionName) { - return getFullUrlAsync(resourceGroupName, domainName, eventSubscriptionName).block(); + public Response getFullUrlWithResponse( + String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { + return getFullUrlWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName, context).block(); } /** - * Get the full endpoint URL for an event subscription for domain. + * Get full URL of an event subscription for domain. + * + *

Get the full endpoint URL for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. * @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 the full endpoint URL for an event subscription for domain along with {@link Response}. + * @return the full endpoint URL for an event subscription for domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse( - String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { - return getFullUrlWithResponseAsync(resourceGroupName, domainName, eventSubscriptionName, context).block(); + public EventSubscriptionFullUrlInner getFullUrl( + String resourceGroupName, String domainName, String eventSubscriptionName) { + return getFullUrlWithResponse(resourceGroupName, domainName, eventSubscriptionName, Context.NONE).getValue(); } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific domain. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1699,7 +1789,9 @@ private Mono> listSinglePageAsync( } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific domain. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1765,7 +1857,9 @@ private Mono> listSinglePageAsync( } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific domain. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1791,7 +1885,9 @@ private PagedFlux listAsync( } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific domain. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1810,7 +1906,9 @@ private PagedFlux listAsync(String resourceGroupName, St } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific domain. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1837,7 +1935,9 @@ private PagedFlux listAsync( } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific domain. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1854,7 +1954,9 @@ public PagedIterable list(String resourceGroupName, Stri } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific domain. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1881,7 +1983,8 @@ public PagedIterable list( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1917,7 +2020,8 @@ private Mono> listNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java index 36e7815569c0..4c6d81e77a35 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainEventSubscriptionsImpl.java @@ -33,17 +33,6 @@ public DomainEventSubscriptionsImpl( this.serviceManager = serviceManager; } - public DeliveryAttributeListResult getDeliveryAttributes( - String resourceGroupName, String domainName, String eventSubscriptionName) { - DeliveryAttributeListResultInner inner = - this.serviceClient().getDeliveryAttributes(resourceGroupName, domainName, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getDeliveryAttributesWithResponse( String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { Response inner = @@ -61,10 +50,12 @@ public Response getDeliveryAttributesWithResponse( } } - public EventSubscription get(String resourceGroupName, String domainName, String eventSubscriptionName) { - EventSubscriptionInner inner = this.serviceClient().get(resourceGroupName, domainName, eventSubscriptionName); + public DeliveryAttributeListResult getDeliveryAttributes( + String resourceGroupName, String domainName, String eventSubscriptionName) { + DeliveryAttributeListResultInner inner = + this.serviceClient().getDeliveryAttributes(resourceGroupName, domainName, eventSubscriptionName); if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); + return new DeliveryAttributeListResultImpl(inner, this.manager()); } else { return null; } @@ -85,6 +76,15 @@ public Response getWithResponse( } } + public EventSubscription get(String resourceGroupName, String domainName, String eventSubscriptionName) { + EventSubscriptionInner inner = this.serviceClient().get(resourceGroupName, domainName, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + public EventSubscription createOrUpdate( String resourceGroupName, String domainName, @@ -160,17 +160,6 @@ public EventSubscription update( } } - public EventSubscriptionFullUrl getFullUrl( - String resourceGroupName, String domainName, String eventSubscriptionName) { - EventSubscriptionFullUrlInner inner = - this.serviceClient().getFullUrl(resourceGroupName, domainName, eventSubscriptionName); - if (inner != null) { - return new EventSubscriptionFullUrlImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getFullUrlWithResponse( String resourceGroupName, String domainName, String eventSubscriptionName, Context context) { Response inner = @@ -186,6 +175,17 @@ public Response getFullUrlWithResponse( } } + public EventSubscriptionFullUrl getFullUrl( + String resourceGroupName, String domainName, String eventSubscriptionName) { + EventSubscriptionFullUrlInner inner = + this.serviceClient().getFullUrl(resourceGroupName, domainName, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionFullUrlImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list(String resourceGroupName, String domainName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, domainName); return Utils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java index 7eff0b3e65f6..3f75e297b4a1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainImpl.java @@ -16,12 +16,15 @@ import com.azure.resourcemanager.eventgrid.models.DomainRegenerateKeyRequest; import com.azure.resourcemanager.eventgrid.models.DomainSharedAccessKeys; import com.azure.resourcemanager.eventgrid.models.DomainUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; import com.azure.resourcemanager.eventgrid.models.IdentityInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnection; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.ResourceSku; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import java.util.Collections; import java.util.List; import java.util.Map; @@ -57,14 +60,18 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); + public ResourceSku sku() { + return this.innerModel().sku(); } public IdentityInfo identity() { return this.innerModel().identity(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public List privateEndpointConnections() { List inner = this.innerModel().privateEndpointConnections(); if (inner != null) { @@ -83,6 +90,10 @@ public DomainProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public TlsVersion minimumTlsVersionAllowed() { + return this.innerModel().minimumTlsVersionAllowed(); + } + public String endpoint() { return this.innerModel().endpoint(); } @@ -91,6 +102,10 @@ public InputSchema inputSchema() { return this.innerModel().inputSchema(); } + public EventTypeInfo eventTypeInfo() { + return this.innerModel().eventTypeInfo(); + } + public InputSchemaMapping inputSchemaMapping() { return this.innerModel().inputSchemaMapping(); } @@ -233,16 +248,12 @@ public Domain refresh(Context context) { return this; } - public DomainSharedAccessKeys listSharedAccessKeys() { - return serviceManager.domains().listSharedAccessKeys(resourceGroupName, domainName); - } - public Response listSharedAccessKeysWithResponse(Context context) { return serviceManager.domains().listSharedAccessKeysWithResponse(resourceGroupName, domainName, context); } - public DomainSharedAccessKeys regenerateKey(DomainRegenerateKeyRequest regenerateKeyRequest) { - return serviceManager.domains().regenerateKey(resourceGroupName, domainName, regenerateKeyRequest); + public DomainSharedAccessKeys listSharedAccessKeys() { + return serviceManager.domains().listSharedAccessKeys(resourceGroupName, domainName); } public Response regenerateKeyWithResponse( @@ -252,6 +263,10 @@ public Response regenerateKeyWithResponse( .regenerateKeyWithResponse(resourceGroupName, domainName, regenerateKeyRequest, context); } + public DomainSharedAccessKeys regenerateKey(DomainRegenerateKeyRequest regenerateKeyRequest) { + return serviceManager.domains().regenerateKey(resourceGroupName, domainName, regenerateKeyRequest); + } + public DomainImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -272,6 +287,16 @@ public DomainImpl withTags(Map tags) { } } + public DomainImpl withSku(ResourceSku sku) { + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updateDomainUpdateParameters.withSku(sku); + return this; + } + } + public DomainImpl withIdentity(IdentityInfo identity) { if (isInCreateMode()) { this.innerModel().withIdentity(identity); @@ -282,11 +307,31 @@ public DomainImpl withIdentity(IdentityInfo identity) { } } + public DomainImpl withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + if (isInCreateMode()) { + this.innerModel().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } else { + this.updateDomainUpdateParameters.withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + } + public DomainImpl withInputSchema(InputSchema inputSchema) { this.innerModel().withInputSchema(inputSchema); return this; } + public DomainImpl withEventTypeInfo(EventTypeInfo eventTypeInfo) { + if (isInCreateMode()) { + this.innerModel().withEventTypeInfo(eventTypeInfo); + return this; + } else { + this.updateDomainUpdateParameters.withEventTypeInfo(eventTypeInfo); + return this; + } + } + public DomainImpl withInputSchemaMapping(InputSchemaMapping inputSchemaMapping) { this.innerModel().withInputSchemaMapping(inputSchemaMapping); return this; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsClientImpl.java index c69446db44d7..7734ea7ef9b4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsClientImpl.java @@ -72,11 +72,26 @@ public final class DomainTopicEventSubscriptionsClientImpl implements DomainTopi */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface DomainTopicEventSubscriptionsService { + public interface DomainTopicEventSubscriptionsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeliveryAttributes( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @PathParam("topicName") String topicName, + @PathParam("eventSubscriptionName") String eventSubscriptionName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -92,8 +107,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -110,8 +124,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -126,8 +139,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -144,8 +156,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getFullUrl( @@ -161,8 +172,7 @@ Mono> getFullUrl( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics/{topicName}/eventSubscriptions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -177,23 +187,6 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("domainName") String domainName, - @PathParam("topicName") String topicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -206,7 +199,198 @@ Mono> listNext( } /** - * Get properties of a nested event subscription for a domain topic. + * Get delivery attributes for an event subscription for domain topic. + * + *

Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription for domain topic along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getDeliveryAttributes( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + domainName, + topicName, + eventSubscriptionName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get delivery attributes for an event subscription for domain topic. + * + *

Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @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 all delivery attributes for an event subscription for domain topic along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getDeliveryAttributes( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + domainName, + topicName, + eventSubscriptionName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get delivery attributes for an event subscription for domain topic. + * + *

Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription for domain topic on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeliveryAttributesAsync( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get delivery attributes for an event subscription for domain topic. + * + *

Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @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 all delivery attributes for an event subscription for domain topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeliveryAttributesWithResponse( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { + return getDeliveryAttributesWithResponseAsync( + resourceGroupName, domainName, topicName, eventSubscriptionName, context) + .block(); + } + + /** + * Get delivery attributes for an event subscription for domain topic. + * + *

Get all delivery attributes for an event subscription for domain topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription for domain topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeliveryAttributeListResultInner getDeliveryAttributes( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponse( + resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE) + .getValue(); + } + + /** + * Get a nested event subscription for domain topic. + * + *

Get properties of a nested event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -266,7 +450,9 @@ private Mono> getWithResponseAsync( } /** - * Get properties of a nested event subscription for a domain topic. + * Get a nested event subscription for domain topic. + * + *

Get properties of a nested event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -324,7 +510,9 @@ private Mono> getWithResponseAsync( } /** - * Get properties of a nested event subscription for a domain topic. + * Get a nested event subscription for domain topic. + * + *

Get properties of a nested event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -343,44 +531,51 @@ private Mono getAsync( } /** - * Get properties of a nested event subscription for a domain topic. + * Get a nested event subscription for domain topic. + * + *

Get properties of a nested event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. * @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 properties of a nested event subscription for a domain topic. + * @return properties of a nested event subscription for a domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner get( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - return getAsync(resourceGroupName, domainName, topicName, eventSubscriptionName).block(); + public Response getWithResponse( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { + return getWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName, context).block(); } /** - * Get properties of a nested event subscription for a domain topic. + * Get a nested event subscription for domain topic. + * + *

Get properties of a nested event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. * @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 properties of a nested event subscription for a domain topic along with {@link Response}. + * @return properties of a nested event subscription for a domain topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { - return getWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName, context).block(); + public EventSubscriptionInner get( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { + return getWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE) + .getValue(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -452,7 +647,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -523,7 +720,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -557,7 +756,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -594,7 +795,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -614,13 +817,16 @@ public SyncPoller, EventSubscriptionInner> be String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, domainName, topicName, eventSubscriptionName, eventSubscriptionInfo) .getSyncPoller(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -642,13 +848,16 @@ public SyncPoller, EventSubscriptionInner> be String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, domainName, topicName, eventSubscriptionName, eventSubscriptionInfo, context) .getSyncPoller(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -675,7 +884,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -704,7 +915,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -730,7 +943,9 @@ public EventSubscriptionInner createOrUpdate( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update a nested event subscription to a domain topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -758,7 +973,9 @@ public EventSubscriptionInner createOrUpdate( } /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -816,7 +1033,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -872,7 +1091,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -896,7 +1117,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -921,7 +1144,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -936,11 +1161,13 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - return beginDeleteAsync(resourceGroupName, domainName, topicName, eventSubscriptionName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, domainName, topicName, eventSubscriptionName).getSyncPoller(); } /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -956,12 +1183,15 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { - return beginDeleteAsync(resourceGroupName, domainName, topicName, eventSubscriptionName, context) + return this + .beginDeleteAsync(resourceGroupName, domainName, topicName, eventSubscriptionName, context) .getSyncPoller(); } /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -982,7 +1212,9 @@ private Mono deleteAsync( } /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1004,7 +1236,9 @@ private Mono deleteAsync( } /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1021,7 +1255,9 @@ public void delete(String resourceGroupName, String domainName, String topicName } /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1040,7 +1276,9 @@ public void delete( } /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1113,7 +1351,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1185,7 +1425,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1218,7 +1460,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1259,7 +1503,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1278,13 +1524,16 @@ public SyncPoller, EventSubscriptionInner> be String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, domainName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters) .getSyncPoller(); } /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1305,7 +1554,8 @@ public SyncPoller, EventSubscriptionInner> be String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, domainName, topicName, @@ -1316,7 +1566,9 @@ public SyncPoller, EventSubscriptionInner> be } /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1342,7 +1594,9 @@ private Mono updateAsync( } /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1375,7 +1629,9 @@ private Mono updateAsync( } /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1400,7 +1656,9 @@ public EventSubscriptionInner update( } /** - * Update an existing event subscription for a domain topic. + * Update a nested event subscription for a domain topic. + * + *

Update an existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1432,7 +1690,9 @@ public EventSubscriptionInner update( } /** - * Get the full endpoint URL for a nested event subscription for domain topic. + * Get full URL of a nested event subscription for domain topic. + * + *

Get the full endpoint URL for a nested event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1492,7 +1752,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for a nested event subscription for domain topic. + * Get full URL of a nested event subscription for domain topic. + * + *

Get the full endpoint URL for a nested event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1550,7 +1812,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for a nested event subscription for domain topic. + * Get full URL of a nested event subscription for domain topic. + * + *

Get the full endpoint URL for a nested event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1570,45 +1834,52 @@ private Mono getFullUrlAsync( } /** - * Get the full endpoint URL for a nested event subscription for domain topic. + * Get full URL of a nested event subscription for domain topic. + * + *

Get the full endpoint URL for a nested event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. * @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 the full endpoint URL for a nested event subscription for domain topic. + * @return the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - return getFullUrlAsync(resourceGroupName, domainName, topicName, eventSubscriptionName).block(); + public Response getFullUrlWithResponse( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { + return getFullUrlWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName, context) + .block(); } /** - * Get the full endpoint URL for a nested event subscription for domain topic. + * Get full URL of a nested event subscription for domain topic. + * + *

Get the full endpoint URL for a nested event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. * @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 the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. + * @return the full endpoint URL for a nested event subscription for domain topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { - return getFullUrlWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName, context) - .block(); + public EventSubscriptionFullUrlInner getFullUrl( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { + return getFullUrlWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE) + .getValue(); } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all nested event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1681,7 +1952,9 @@ private Mono> listSinglePageAsync( } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all nested event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1752,7 +2025,9 @@ private Mono> listSinglePageAsync( } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all nested event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1779,7 +2054,9 @@ private PagedFlux listAsync( } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all nested event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1799,7 +2076,9 @@ private PagedFlux listAsync(String resourceGroupName, St } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all nested event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1827,7 +2106,9 @@ private PagedFlux listAsync( } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all nested event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1845,7 +2126,9 @@ public PagedIterable list(String resourceGroupName, Stri } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all nested event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -1870,187 +2153,11 @@ public PagedIterable list( return new PagedIterable<>(listAsync(resourceGroupName, domainName, topicName, filter, top, context)); } - /** - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription for domain topic along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getDeliveryAttributes( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - domainName, - topicName, - eventSubscriptionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @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 all delivery attributes for an event subscription for domain topic along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (domainName == null) { - return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); - } - if (topicName == null) { - return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getDeliveryAttributes( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - domainName, - topicName, - eventSubscriptionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription for domain topic on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDeliveryAttributesAsync( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, domainName, topicName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription for domain topic. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - return getDeliveryAttributesAsync(resourceGroupName, domainName, topicName, eventSubscriptionName).block(); - } - - /** - * Get all delivery attributes for an event subscription for domain topic. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @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 all delivery attributes for an event subscription for domain topic along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { - return getDeliveryAttributesWithResponseAsync( - resourceGroupName, domainName, topicName, eventSubscriptionName, context) - .block(); - } - /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -2086,7 +2193,8 @@ private Mono> listNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java index dad50b101e7d..631dfdc03fcd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicEventSubscriptionsImpl.java @@ -17,7 +17,6 @@ import com.azure.resourcemanager.eventgrid.models.DomainTopicEventSubscriptions; import com.azure.resourcemanager.eventgrid.models.EventSubscription; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; public final class DomainTopicEventSubscriptionsImpl implements DomainTopicEventSubscriptions { private static final ClientLogger LOGGER = new ClientLogger(DomainTopicEventSubscriptionsImpl.class); @@ -33,12 +32,30 @@ public DomainTopicEventSubscriptionsImpl( this.serviceManager = serviceManager; } - public EventSubscription get( + public Response getDeliveryAttributesWithResponse( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { + Response inner = + this + .serviceClient() + .getDeliveryAttributesWithResponse( + resourceGroupName, domainName, topicName, eventSubscriptionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeliveryAttributeListResult getDeliveryAttributes( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - EventSubscriptionInner inner = - this.serviceClient().get(resourceGroupName, domainName, topicName, eventSubscriptionName); + DeliveryAttributeListResultInner inner = + this.serviceClient().getDeliveryAttributes(resourceGroupName, domainName, topicName, eventSubscriptionName); if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); + return new DeliveryAttributeListResultImpl(inner, this.manager()); } else { return null; } @@ -61,35 +78,10 @@ public Response getWithResponse( } } - public EventSubscription createOrUpdate( - String resourceGroupName, - String domainName, - String topicName, - String eventSubscriptionName, - EventSubscriptionInner eventSubscriptionInfo) { - EventSubscriptionInner inner = - this - .serviceClient() - .createOrUpdate(resourceGroupName, domainName, topicName, eventSubscriptionName, eventSubscriptionInfo); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } - } - - public EventSubscription createOrUpdate( - String resourceGroupName, - String domainName, - String topicName, - String eventSubscriptionName, - EventSubscriptionInner eventSubscriptionInfo, - Context context) { + public EventSubscription get( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { EventSubscriptionInner inner = - this - .serviceClient() - .createOrUpdate( - resourceGroupName, domainName, topicName, eventSubscriptionName, eventSubscriptionInfo, context); + this.serviceClient().get(resourceGroupName, domainName, topicName, eventSubscriptionName); if (inner != null) { return new EventSubscriptionImpl(inner, this.manager()); } else { @@ -106,43 +98,18 @@ public void delete( this.serviceClient().delete(resourceGroupName, domainName, topicName, eventSubscriptionName, context); } - public EventSubscription update( - String resourceGroupName, - String domainName, - String topicName, - String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - EventSubscriptionInner inner = - this - .serviceClient() - .update( - resourceGroupName, domainName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } - } - - public EventSubscription update( - String resourceGroupName, - String domainName, - String topicName, - String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - Context context) { - EventSubscriptionInner inner = + public Response getFullUrlWithResponse( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { + Response inner = this .serviceClient() - .update( - resourceGroupName, - domainName, - topicName, - eventSubscriptionName, - eventSubscriptionUpdateParameters, - context); + .getFullUrlWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, context); if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); } else { return null; } @@ -159,23 +126,6 @@ public EventSubscriptionFullUrl getFullUrl( } } - public Response getFullUrlWithResponse( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { - Response inner = - this - .serviceClient() - .getFullUrlWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EventSubscriptionFullUrlImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - public PagedIterable list(String resourceGroupName, String domainName, String topicName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, domainName, topicName); @@ -189,33 +139,146 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } - public DeliveryAttributeListResult getDeliveryAttributes( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName) { - DeliveryAttributeListResultInner inner = - this.serviceClient().getDeliveryAttributes(resourceGroupName, domainName, topicName, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; + public EventSubscription getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); } + String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); + if (eventSubscriptionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); + } + return this + .getWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE) + .getValue(); } - public Response getDeliveryAttributesWithResponse( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context) { - Response inner = - this - .serviceClient() - .getDeliveryAttributesWithResponse( - resourceGroupName, domainName, topicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); } + String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); + if (eventSubscriptionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); + } + return this.getWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); + } + String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); + if (eventSubscriptionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); + } + this.delete(resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); + } + String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); + if (eventSubscriptionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); + } + this.delete(resourceGroupName, domainName, topicName, eventSubscriptionName, context); } private DomainTopicEventSubscriptionsClient serviceClient() { @@ -225,4 +288,8 @@ private DomainTopicEventSubscriptionsClient serviceClient() { private com.azure.resourcemanager.eventgrid.EventGridManager manager() { return this.serviceManager; } + + public EventSubscriptionImpl define(String name) { + return new EventSubscriptionImpl(name, this.manager()); + } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsClientImpl.java index d96f9596c1be..7ebae4fad9e8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsClientImpl.java @@ -62,11 +62,10 @@ public final class DomainTopicsClientImpl implements DomainTopicsClient { */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface DomainTopicsService { + public interface DomainTopicsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics/{domainTopicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -81,8 +80,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics/{domainTopicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -97,8 +95,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics/{domainTopicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -112,8 +109,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDomain( @@ -139,7 +135,9 @@ Mono> listByDomainNext( } /** - * Get properties of a domain topic. + * Get a domain topic. + * + *

Get properties of a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -193,7 +191,9 @@ private Mono> getWithResponseAsync( } /** - * Get properties of a domain topic. + * Get a domain topic. + * + *

Get properties of a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -245,7 +245,9 @@ private Mono> getWithResponseAsync( } /** - * Get properties of a domain topic. + * Get a domain topic. + * + *

Get properties of a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -262,41 +264,47 @@ private Mono getAsync(String resourceGroupName, String domainN } /** - * Get properties of a domain topic. + * Get a domain topic. + * + *

Get properties of a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. + * @param context The context to associate with this operation. * @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 properties of a domain topic. + * @return properties of a domain topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DomainTopicInner get(String resourceGroupName, String domainName, String domainTopicName) { - return getAsync(resourceGroupName, domainName, domainTopicName).block(); + public Response getWithResponse( + String resourceGroupName, String domainName, String domainTopicName, Context context) { + return getWithResponseAsync(resourceGroupName, domainName, domainTopicName, context).block(); } /** - * Get properties of a domain topic. + * Get a domain topic. + * + *

Get properties of a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. - * @param context The context to associate with this operation. * @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 properties of a domain topic along with {@link Response}. + * @return properties of a domain topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String domainName, String domainTopicName, Context context) { - return getWithResponseAsync(resourceGroupName, domainName, domainTopicName, context).block(); + public DomainTopicInner get(String resourceGroupName, String domainName, String domainTopicName) { + return getWithResponse(resourceGroupName, domainName, domainTopicName, Context.NONE).getValue(); } /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -350,7 +358,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -402,7 +412,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -428,7 +440,9 @@ private PollerFlux, DomainTopicInner> beginCreateOr } /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -452,7 +466,9 @@ private PollerFlux, DomainTopicInner> beginCreateOr } /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -465,11 +481,13 @@ private PollerFlux, DomainTopicInner> beginCreateOr @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainTopicInner> beginCreateOrUpdate( String resourceGroupName, String domainName, String domainTopicName) { - return beginCreateOrUpdateAsync(resourceGroupName, domainName, domainTopicName).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, domainName, domainTopicName).getSyncPoller(); } /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -483,11 +501,13 @@ public SyncPoller, DomainTopicInner> beginCreateOrU @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainTopicInner> beginCreateOrUpdate( String resourceGroupName, String domainName, String domainTopicName, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, domainName, domainTopicName, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, domainName, domainTopicName, context).getSyncPoller(); } /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -506,7 +526,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -526,7 +548,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -542,7 +566,9 @@ public DomainTopicInner createOrUpdate(String resourceGroupName, String domainNa } /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -560,7 +586,9 @@ public DomainTopicInner createOrUpdate( } /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -612,7 +640,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -662,7 +692,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -683,7 +715,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -706,7 +740,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -719,11 +755,13 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, String domainTopicName) { - return beginDeleteAsync(resourceGroupName, domainName, domainTopicName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, domainName, domainTopicName).getSyncPoller(); } /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -737,11 +775,13 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, String domainTopicName, Context context) { - return beginDeleteAsync(resourceGroupName, domainName, domainTopicName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, domainName, domainTopicName, context).getSyncPoller(); } /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -759,7 +799,9 @@ private Mono deleteAsync(String resourceGroupName, String domainName, Stri } /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -779,7 +821,9 @@ private Mono deleteAsync( } /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -794,7 +838,9 @@ public void delete(String resourceGroupName, String domainName, String domainTop } /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -810,7 +856,9 @@ public void delete(String resourceGroupName, String domainName, String domainTop } /** - * List all the topics in a domain. + * List domain topics. + * + *

List all the topics in a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Domain name. @@ -878,7 +926,9 @@ private Mono> listByDomainSinglePageAsync( } /** - * List all the topics in a domain. + * List domain topics. + * + *

List all the topics in a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Domain name. @@ -944,7 +994,9 @@ private Mono> listByDomainSinglePageAsync( } /** - * List all the topics in a domain. + * List domain topics. + * + *

List all the topics in a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Domain name. @@ -970,7 +1022,9 @@ private PagedFlux listByDomainAsync( } /** - * List all the topics in a domain. + * List domain topics. + * + *

List all the topics in a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Domain name. @@ -989,7 +1043,9 @@ private PagedFlux listByDomainAsync(String resourceGroupName, } /** - * List all the topics in a domain. + * List domain topics. + * + *

List all the topics in a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Domain name. @@ -1016,7 +1072,9 @@ private PagedFlux listByDomainAsync( } /** - * List all the topics in a domain. + * List domain topics. + * + *

List all the topics in a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Domain name. @@ -1033,7 +1091,9 @@ public PagedIterable listByDomain(String resourceGroupName, St } /** - * List all the topics in a domain. + * List domain topics. + * + *

List all the topics in a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Domain name. @@ -1060,7 +1120,8 @@ public PagedIterable listByDomain( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1096,7 +1157,8 @@ private Mono> listByDomainNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java index eb9dc68631e0..ca8f32c78e69 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainTopicsImpl.java @@ -27,15 +27,6 @@ public DomainTopicsImpl( this.serviceManager = serviceManager; } - public DomainTopic get(String resourceGroupName, String domainName, String domainTopicName) { - DomainTopicInner inner = this.serviceClient().get(resourceGroupName, domainName, domainTopicName); - if (inner != null) { - return new DomainTopicImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String domainName, String domainTopicName, Context context) { Response inner = @@ -51,6 +42,15 @@ public Response getWithResponse( } } + public DomainTopic get(String resourceGroupName, String domainName, String domainTopicName) { + DomainTopicInner inner = this.serviceClient().get(resourceGroupName, domainName, domainTopicName); + if (inner != null) { + return new DomainTopicImpl(inner, this.manager()); + } else { + return null; + } + } + public DomainTopic createOrUpdate(String resourceGroupName, String domainName, String domainTopicName) { DomainTopicInner inner = this.serviceClient().createOrUpdate(resourceGroupName, domainName, domainTopicName); if (inner != null) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsClientImpl.java index 1eea8c7a5282..b1c5e28a7033 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsClientImpl.java @@ -67,11 +67,10 @@ public final class DomainsClientImpl implements DomainsClient { */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface DomainsService { + public interface DomainsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -85,8 +84,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -101,8 +99,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -115,8 +112,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -158,8 +154,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/listKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/listKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSharedAccessKeys( @@ -173,8 +168,7 @@ Mono> listSharedAccessKeys( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/regenerateKey") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/regenerateKey") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> regenerateKey( @@ -209,7 +203,9 @@ Mono> listByResourceGroupNext( } /** - * Get properties of a domain. + * Get a domain. + * + *

Get properties of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -257,7 +253,9 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Get properties of a domain. + * Get a domain. + * + *

Get properties of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -303,7 +301,9 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Get properties of a domain. + * Get a domain. + * + *

Get properties of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -319,39 +319,45 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Stri } /** - * Get properties of a domain. + * Get a domain. + * + *

Get properties of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. + * @param context The context to associate with this operation. * @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 properties of a domain. + * @return properties of a domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DomainInner getByResourceGroup(String resourceGroupName, String domainName) { - return getByResourceGroupAsync(resourceGroupName, domainName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String domainName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, domainName, context).block(); } /** - * Get properties of a domain. + * Get a domain. + * + *

Get properties of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. - * @param context The context to associate with this operation. * @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 properties of a domain along with {@link Response}. + * @return properties of a domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String domainName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, domainName, context).block(); + public DomainInner getByResourceGroup(String resourceGroupName, String domainName) { + return getByResourceGroupWithResponse(resourceGroupName, domainName, Context.NONE).getValue(); } /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -406,7 +412,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -459,7 +467,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -481,7 +491,9 @@ private PollerFlux, DomainInner> beginCreateOrUpdateAsyn } /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -505,7 +517,9 @@ private PollerFlux, DomainInner> beginCreateOrUpdateAsyn } /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -518,11 +532,13 @@ private PollerFlux, DomainInner> beginCreateOrUpdateAsyn @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainInner> beginCreateOrUpdate( String resourceGroupName, String domainName, DomainInner domainInfo) { - return beginCreateOrUpdateAsync(resourceGroupName, domainName, domainInfo).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, domainName, domainInfo).getSyncPoller(); } /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -536,11 +552,13 @@ public SyncPoller, DomainInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainInner> beginCreateOrUpdate( String resourceGroupName, String domainName, DomainInner domainInfo, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, domainName, domainInfo, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, domainName, domainInfo, context).getSyncPoller(); } /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -558,7 +576,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, String d } /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -578,7 +598,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -594,7 +616,9 @@ public DomainInner createOrUpdate(String resourceGroupName, String domainName, D } /** - * Asynchronously creates or updates a new domain with the specified parameters. + * Create or update a domain. + * + *

Asynchronously creates or updates a new domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -612,7 +636,9 @@ public DomainInner createOrUpdate( } /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -657,7 +683,9 @@ private Mono>> deleteWithResponseAsync(String resource } /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -701,7 +729,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -720,7 +750,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -741,7 +773,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -752,11 +786,13 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String domainName) { - return beginDeleteAsync(resourceGroupName, domainName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, domainName).getSyncPoller(); } /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -769,11 +805,13 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String domainName, Context context) { - return beginDeleteAsync(resourceGroupName, domainName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, domainName, context).getSyncPoller(); } /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -788,7 +826,9 @@ private Mono deleteAsync(String resourceGroupName, String domainName) { } /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -806,7 +846,9 @@ private Mono deleteAsync(String resourceGroupName, String domainName, Cont } /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -820,7 +862,9 @@ public void delete(String resourceGroupName, String domainName) { } /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -835,7 +879,9 @@ public void delete(String resourceGroupName, String domainName, Context context) } /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -892,7 +938,9 @@ private Mono>> updateWithResponseAsync( } /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -947,7 +995,9 @@ private Mono>> updateWithResponseAsync( } /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -969,7 +1019,9 @@ private PollerFlux, DomainInner> beginUpdateAsync( } /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -993,7 +1045,9 @@ private PollerFlux, DomainInner> beginUpdateAsync( } /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1006,11 +1060,13 @@ private PollerFlux, DomainInner> beginUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainInner> beginUpdate( String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters) { - return beginUpdateAsync(resourceGroupName, domainName, domainUpdateParameters).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, domainName, domainUpdateParameters).getSyncPoller(); } /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1024,11 +1080,13 @@ public SyncPoller, DomainInner> beginUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DomainInner> beginUpdate( String resourceGroupName, String domainName, DomainUpdateParameters domainUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, domainName, domainUpdateParameters, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, domainName, domainUpdateParameters, context).getSyncPoller(); } /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1047,7 +1105,9 @@ private Mono updateAsync( } /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1067,7 +1127,9 @@ private Mono updateAsync( } /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1084,7 +1146,9 @@ public DomainInner update( } /** - * Asynchronously updates a domain with the specified parameters. + * Update a domain. + * + *

Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1102,7 +1166,9 @@ public DomainInner update( } /** - * List all the domains under an Azure subscription. + * List domains under an Azure subscription. + * + *

List all the domains under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1158,7 +1224,9 @@ private Mono> listSinglePageAsync(String filter, Inte } /** - * List all the domains under an Azure subscription. + * List domains under an Azure subscription. + * + *

List all the domains under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1212,7 +1280,9 @@ private Mono> listSinglePageAsync(String filter, Inte } /** - * List all the domains under an Azure subscription. + * List domains under an Azure subscription. + * + *

List all the domains under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1234,7 +1304,9 @@ private PagedFlux listAsync(String filter, Integer top) { } /** - * List all the domains under an Azure subscription. + * List domains under an Azure subscription. + * + *

List all the domains under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1249,7 +1321,9 @@ private PagedFlux listAsync() { } /** - * List all the domains under an Azure subscription. + * List domains under an Azure subscription. + * + *

List all the domains under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1273,7 +1347,9 @@ private PagedFlux listAsync(String filter, Integer top, Context con } /** - * List all the domains under an Azure subscription. + * List domains under an Azure subscription. + * + *

List all the domains under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1287,7 +1363,9 @@ public PagedIterable list() { } /** - * List all the domains under an Azure subscription. + * List domains under an Azure subscription. + * + *

List all the domains under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1309,7 +1387,9 @@ public PagedIterable list(String filter, Integer top, Context conte } /** - * List all the domains under a resource group. + * List domains under a resource group. + * + *

List all the domains under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1372,7 +1452,9 @@ private Mono> listByResourceGroupSinglePageAsync( } /** - * List all the domains under a resource group. + * List domains under a resource group. + * + *

List all the domains under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1433,7 +1515,9 @@ private Mono> listByResourceGroupSinglePageAsync( } /** - * List all the domains under a resource group. + * List domains under a resource group. + * + *

List all the domains under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1457,7 +1541,9 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName } /** - * List all the domains under a resource group. + * List domains under a resource group. + * + *

List all the domains under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1475,7 +1561,9 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName } /** - * List all the domains under a resource group. + * List domains under a resource group. + * + *

List all the domains under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1501,7 +1589,9 @@ private PagedFlux listByResourceGroupAsync( } /** - * List all the domains under a resource group. + * List domains under a resource group. + * + *

List all the domains under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1517,7 +1607,9 @@ public PagedIterable listByResourceGroup(String resourceGroupName) } /** - * List all the domains under a resource group. + * List domains under a resource group. + * + *

List all the domains under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1541,7 +1633,9 @@ public PagedIterable listByResourceGroup( } /** - * List the two keys used to publish to a domain. + * List keys for a domain. + * + *

List the two keys used to publish to a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1589,7 +1683,9 @@ private Mono> listSharedAccessKeysWithResp } /** - * List the two keys used to publish to a domain. + * List keys for a domain. + * + *

List the two keys used to publish to a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1635,7 +1731,9 @@ private Mono> listSharedAccessKeysWithResp } /** - * List the two keys used to publish to a domain. + * List keys for a domain. + * + *

List the two keys used to publish to a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1651,39 +1749,45 @@ private Mono listSharedAccessKeysAsync(String resou } /** - * List the two keys used to publish to a domain. + * List keys for a domain. + * + *

List the two keys used to publish to a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. + * @param context The context to associate with this operation. * @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 shared access keys of the Domain. + * @return shared access keys of the Domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DomainSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String domainName) { - return listSharedAccessKeysAsync(resourceGroupName, domainName).block(); + public Response listSharedAccessKeysWithResponse( + String resourceGroupName, String domainName, Context context) { + return listSharedAccessKeysWithResponseAsync(resourceGroupName, domainName, context).block(); } /** - * List the two keys used to publish to a domain. + * List keys for a domain. + * + *

List the two keys used to publish to a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. - * @param context The context to associate with this operation. * @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 shared access keys of the Domain along with {@link Response}. + * @return shared access keys of the Domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSharedAccessKeysWithResponse( - String resourceGroupName, String domainName, Context context) { - return listSharedAccessKeysWithResponseAsync(resourceGroupName, domainName, context).block(); + public DomainSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String domainName) { + return listSharedAccessKeysWithResponse(resourceGroupName, domainName, Context.NONE).getValue(); } /** - * Regenerate a shared access key for a domain. + * Regenerate key for a domain. + * + *

Regenerate a shared access key for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1739,7 +1843,9 @@ private Mono> regenerateKeyWithResponseAsy } /** - * Regenerate a shared access key for a domain. + * Regenerate key for a domain. + * + *

Regenerate a shared access key for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1793,7 +1899,9 @@ private Mono> regenerateKeyWithResponseAsy } /** - * Regenerate a shared access key for a domain. + * Regenerate key for a domain. + * + *

Regenerate a shared access key for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -1811,44 +1919,49 @@ private Mono regenerateKeyAsync( } /** - * Regenerate a shared access key for a domain. + * Regenerate key for a domain. + * + *

Regenerate a shared access key for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. * @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 shared access keys of the Domain. + * @return shared access keys of the Domain along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DomainSharedAccessKeysInner regenerateKey( - String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest) { - return regenerateKeyAsync(resourceGroupName, domainName, regenerateKeyRequest).block(); + public Response regenerateKeyWithResponse( + String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest, Context context) { + return regenerateKeyWithResponseAsync(resourceGroupName, domainName, regenerateKeyRequest, context).block(); } /** - * Regenerate a shared access key for a domain. + * Regenerate key for a domain. + * + *

Regenerate a shared access key for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. * @param regenerateKeyRequest Request body to regenerate key. - * @param context The context to associate with this operation. * @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 shared access keys of the Domain along with {@link Response}. + * @return shared access keys of the Domain. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response regenerateKeyWithResponse( - String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest, Context context) { - return regenerateKeyWithResponseAsync(resourceGroupName, domainName, regenerateKeyRequest, context).block(); + public DomainSharedAccessKeysInner regenerateKey( + String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest) { + return regenerateKeyWithResponse(resourceGroupName, domainName, regenerateKeyRequest, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1885,7 +1998,8 @@ private Mono> listBySubscriptionNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1922,7 +2036,8 @@ private Mono> listBySubscriptionNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1959,7 +2074,8 @@ private Mono> listByResourceGroupNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsImpl.java index a76bc6fe93a0..3b1d4e54c4ca 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/DomainsImpl.java @@ -29,15 +29,6 @@ public DomainsImpl(DomainsClient innerClient, com.azure.resourcemanager.eventgri this.serviceManager = serviceManager; } - public Domain getByResourceGroup(String resourceGroupName, String domainName) { - DomainInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, domainName); - if (inner != null) { - return new DomainImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String domainName, Context context) { Response inner = @@ -53,6 +44,15 @@ public Response getByResourceGroupWithResponse( } } + public Domain getByResourceGroup(String resourceGroupName, String domainName) { + DomainInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, domainName); + if (inner != null) { + return new DomainImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String domainName) { this.serviceClient().delete(resourceGroupName, domainName); } @@ -83,15 +83,6 @@ public PagedIterable listByResourceGroup( return Utils.mapPage(inner, inner1 -> new DomainImpl(inner1, this.manager())); } - public DomainSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String domainName) { - DomainSharedAccessKeysInner inner = this.serviceClient().listSharedAccessKeys(resourceGroupName, domainName); - if (inner != null) { - return new DomainSharedAccessKeysImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listSharedAccessKeysWithResponse( String resourceGroupName, String domainName, Context context) { Response inner = @@ -107,10 +98,8 @@ public Response listSharedAccessKeysWithResponse( } } - public DomainSharedAccessKeys regenerateKey( - String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest) { - DomainSharedAccessKeysInner inner = - this.serviceClient().regenerateKey(resourceGroupName, domainName, regenerateKeyRequest); + public DomainSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String domainName) { + DomainSharedAccessKeysInner inner = this.serviceClient().listSharedAccessKeys(resourceGroupName, domainName); if (inner != null) { return new DomainSharedAccessKeysImpl(inner, this.manager()); } else { @@ -135,6 +124,17 @@ public Response regenerateKeyWithResponse( } } + public DomainSharedAccessKeys regenerateKey( + String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest) { + DomainSharedAccessKeysInner inner = + this.serviceClient().regenerateKey(resourceGroupName, domainName, regenerateKeyRequest); + if (inner != null) { + return new DomainSharedAccessKeysImpl(inner, this.manager()); + } else { + return null; + } + } + public Domain getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientBuilder.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientBuilder.java index 6168736725f6..e7b9b8cd4d9d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientBuilder.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientBuilder.java @@ -18,9 +18,8 @@ @ServiceClientBuilder(serviceClients = {EventGridManagementClientImpl.class}) public final class EventGridManagementClientBuilder { /* - * Subscription credentials that uniquely identify a Microsoft Azure - * subscription. The subscription ID forms part of the URI for every - * service call. + * Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part + * of the URI for every service call. */ private String subscriptionId; @@ -122,24 +121,26 @@ public EventGridManagementClientBuilder serializerAdapter(SerializerAdapter seri * @return an instance of EventGridManagementClientImpl. */ public EventGridManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - 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 (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); EventGridManagementClientImpl client = new EventGridManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java index 7adc39a85e01..a89dae018482 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventGridManagementClientImpl.java @@ -22,7 +22,10 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.eventgrid.fluent.CaCertificatesClient; import com.azure.resourcemanager.eventgrid.fluent.ChannelsClient; +import com.azure.resourcemanager.eventgrid.fluent.ClientGroupsClient; +import com.azure.resourcemanager.eventgrid.fluent.ClientsClient; import com.azure.resourcemanager.eventgrid.fluent.DomainEventSubscriptionsClient; import com.azure.resourcemanager.eventgrid.fluent.DomainTopicEventSubscriptionsClient; import com.azure.resourcemanager.eventgrid.fluent.DomainTopicsClient; @@ -30,17 +33,23 @@ import com.azure.resourcemanager.eventgrid.fluent.EventGridManagementClient; import com.azure.resourcemanager.eventgrid.fluent.EventSubscriptionsClient; import com.azure.resourcemanager.eventgrid.fluent.ExtensionTopicsClient; +import com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient; +import com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient; +import com.azure.resourcemanager.eventgrid.fluent.NamespacesClient; import com.azure.resourcemanager.eventgrid.fluent.OperationsClient; import com.azure.resourcemanager.eventgrid.fluent.PartnerConfigurationsClient; +import com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient; import com.azure.resourcemanager.eventgrid.fluent.PartnerNamespacesClient; import com.azure.resourcemanager.eventgrid.fluent.PartnerRegistrationsClient; import com.azure.resourcemanager.eventgrid.fluent.PartnerTopicEventSubscriptionsClient; import com.azure.resourcemanager.eventgrid.fluent.PartnerTopicsClient; +import com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient; import com.azure.resourcemanager.eventgrid.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.eventgrid.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.eventgrid.fluent.SystemTopicEventSubscriptionsClient; import com.azure.resourcemanager.eventgrid.fluent.SystemTopicsClient; import com.azure.resourcemanager.eventgrid.fluent.TopicEventSubscriptionsClient; +import com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient; import com.azure.resourcemanager.eventgrid.fluent.TopicTypesClient; import com.azure.resourcemanager.eventgrid.fluent.TopicsClient; import com.azure.resourcemanager.eventgrid.fluent.VerifiedPartnersClient; @@ -132,6 +141,18 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** The CaCertificatesClient object to access its operations. */ + private final CaCertificatesClient caCertificates; + + /** + * Gets the CaCertificatesClient object to access its operations. + * + * @return the CaCertificatesClient object. + */ + public CaCertificatesClient getCaCertificates() { + return this.caCertificates; + } + /** The ChannelsClient object to access its operations. */ private final ChannelsClient channels; @@ -144,6 +165,30 @@ public ChannelsClient getChannels() { return this.channels; } + /** The ClientGroupsClient object to access its operations. */ + private final ClientGroupsClient clientGroups; + + /** + * Gets the ClientGroupsClient object to access its operations. + * + * @return the ClientGroupsClient object. + */ + public ClientGroupsClient getClientGroups() { + return this.clientGroups; + } + + /** The ClientsClient object to access its operations. */ + private final ClientsClient clients; + + /** + * Gets the ClientsClient object to access its operations. + * + * @return the ClientsClient object. + */ + public ClientsClient getClients() { + return this.clients; + } + /** The DomainsClient object to access its operations. */ private final DomainsClient domains; @@ -168,6 +213,18 @@ public DomainTopicsClient getDomainTopics() { return this.domainTopics; } + /** The DomainTopicEventSubscriptionsClient object to access its operations. */ + private final DomainTopicEventSubscriptionsClient domainTopicEventSubscriptions; + + /** + * Gets the DomainTopicEventSubscriptionsClient object to access its operations. + * + * @return the DomainTopicEventSubscriptionsClient object. + */ + public DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions() { + return this.domainTopicEventSubscriptions; + } + /** The TopicEventSubscriptionsClient object to access its operations. */ private final TopicEventSubscriptionsClient topicEventSubscriptions; @@ -204,18 +261,6 @@ public EventSubscriptionsClient getEventSubscriptions() { return this.eventSubscriptions; } - /** The DomainTopicEventSubscriptionsClient object to access its operations. */ - private final DomainTopicEventSubscriptionsClient domainTopicEventSubscriptions; - - /** - * Gets the DomainTopicEventSubscriptionsClient object to access its operations. - * - * @return the DomainTopicEventSubscriptionsClient object. - */ - public DomainTopicEventSubscriptionsClient getDomainTopicEventSubscriptions() { - return this.domainTopicEventSubscriptions; - } - /** The SystemTopicEventSubscriptionsClient object to access its operations. */ private final SystemTopicEventSubscriptionsClient systemTopicEventSubscriptions; @@ -228,6 +273,18 @@ public SystemTopicEventSubscriptionsClient getSystemTopicEventSubscriptions() { return this.systemTopicEventSubscriptions; } + /** The NamespaceTopicEventSubscriptionsClient object to access its operations. */ + private final NamespaceTopicEventSubscriptionsClient namespaceTopicEventSubscriptions; + + /** + * Gets the NamespaceTopicEventSubscriptionsClient object to access its operations. + * + * @return the NamespaceTopicEventSubscriptionsClient object. + */ + public NamespaceTopicEventSubscriptionsClient getNamespaceTopicEventSubscriptions() { + return this.namespaceTopicEventSubscriptions; + } + /** The PartnerTopicEventSubscriptionsClient object to access its operations. */ private final PartnerTopicEventSubscriptionsClient partnerTopicEventSubscriptions; @@ -240,28 +297,40 @@ public PartnerTopicEventSubscriptionsClient getPartnerTopicEventSubscriptions() return this.partnerTopicEventSubscriptions; } - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; + /** The NamespacesClient object to access its operations. */ + private final NamespacesClient namespaces; /** - * Gets the OperationsClient object to access its operations. + * Gets the NamespacesClient object to access its operations. * - * @return the OperationsClient object. + * @return the NamespacesClient object. */ - public OperationsClient getOperations() { - return this.operations; + public NamespacesClient getNamespaces() { + return this.namespaces; } - /** The TopicsClient object to access its operations. */ - private final TopicsClient topics; + /** The NamespaceTopicsClient object to access its operations. */ + private final NamespaceTopicsClient namespaceTopics; /** - * Gets the TopicsClient object to access its operations. + * Gets the NamespaceTopicsClient object to access its operations. * - * @return the TopicsClient object. + * @return the NamespaceTopicsClient object. */ - public TopicsClient getTopics() { - return this.topics; + public NamespaceTopicsClient getNamespaceTopics() { + return this.namespaceTopics; + } + + /** The OperationsClient object to access its operations. */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; } /** The PartnerConfigurationsClient object to access its operations. */ @@ -276,6 +345,18 @@ public PartnerConfigurationsClient getPartnerConfigurations() { return this.partnerConfigurations; } + /** The PartnerDestinationsClient object to access its operations. */ + private final PartnerDestinationsClient partnerDestinations; + + /** + * Gets the PartnerDestinationsClient object to access its operations. + * + * @return the PartnerDestinationsClient object. + */ + public PartnerDestinationsClient getPartnerDestinations() { + return this.partnerDestinations; + } + /** The PartnerNamespacesClient object to access its operations. */ private final PartnerNamespacesClient partnerNamespaces; @@ -312,6 +393,18 @@ public PartnerTopicsClient getPartnerTopics() { return this.partnerTopics; } + /** The PermissionBindingsClient object to access its operations. */ + private final PermissionBindingsClient permissionBindings; + + /** + * Gets the PermissionBindingsClient object to access its operations. + * + * @return the PermissionBindingsClient object. + */ + public PermissionBindingsClient getPermissionBindings() { + return this.permissionBindings; + } + /** The PrivateEndpointConnectionsClient object to access its operations. */ private final PrivateEndpointConnectionsClient privateEndpointConnections; @@ -348,6 +441,18 @@ public SystemTopicsClient getSystemTopics() { return this.systemTopics; } + /** The TopicsClient object to access its operations. */ + private final TopicsClient topics; + + /** + * Gets the TopicsClient object to access its operations. + * + * @return the TopicsClient object. + */ + public TopicsClient getTopics() { + return this.topics; + } + /** The ExtensionTopicsClient object to access its operations. */ private final ExtensionTopicsClient extensionTopics; @@ -360,6 +465,18 @@ public ExtensionTopicsClient getExtensionTopics() { return this.extensionTopics; } + /** The TopicSpacesClient object to access its operations. */ + private final TopicSpacesClient topicSpaces; + + /** + * Gets the TopicSpacesClient object to access its operations. + * + * @return the TopicSpacesClient object. + */ + public TopicSpacesClient getTopicSpaces() { + return this.topicSpaces; + } + /** The TopicTypesClient object to access its operations. */ private final TopicTypesClient topicTypes; @@ -407,26 +524,35 @@ public VerifiedPartnersClient getVerifiedPartners() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-06-15"; + this.apiVersion = "2023-06-01-preview"; + this.caCertificates = new CaCertificatesClientImpl(this); this.channels = new ChannelsClientImpl(this); + this.clientGroups = new ClientGroupsClientImpl(this); + this.clients = new ClientsClientImpl(this); this.domains = new DomainsClientImpl(this); this.domainTopics = new DomainTopicsClientImpl(this); + this.domainTopicEventSubscriptions = new DomainTopicEventSubscriptionsClientImpl(this); this.topicEventSubscriptions = new TopicEventSubscriptionsClientImpl(this); this.domainEventSubscriptions = new DomainEventSubscriptionsClientImpl(this); this.eventSubscriptions = new EventSubscriptionsClientImpl(this); - this.domainTopicEventSubscriptions = new DomainTopicEventSubscriptionsClientImpl(this); this.systemTopicEventSubscriptions = new SystemTopicEventSubscriptionsClientImpl(this); + this.namespaceTopicEventSubscriptions = new NamespaceTopicEventSubscriptionsClientImpl(this); this.partnerTopicEventSubscriptions = new PartnerTopicEventSubscriptionsClientImpl(this); + this.namespaces = new NamespacesClientImpl(this); + this.namespaceTopics = new NamespaceTopicsClientImpl(this); this.operations = new OperationsClientImpl(this); - this.topics = new TopicsClientImpl(this); this.partnerConfigurations = new PartnerConfigurationsClientImpl(this); + this.partnerDestinations = new PartnerDestinationsClientImpl(this); this.partnerNamespaces = new PartnerNamespacesClientImpl(this); this.partnerRegistrations = new PartnerRegistrationsClientImpl(this); this.partnerTopics = new PartnerTopicsClientImpl(this); + this.permissionBindings = new PermissionBindingsClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.systemTopics = new SystemTopicsClientImpl(this); + this.topics = new TopicsClientImpl(this); this.extensionTopics = new ExtensionTopicsClientImpl(this); + this.topicSpaces = new TopicSpacesClientImpl(this); this.topicTypes = new TopicTypesClientImpl(this); this.verifiedPartners = new VerifiedPartnersClientImpl(this); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java index 7da4960c208a..798570eddbd6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionImpl.java @@ -109,14 +109,17 @@ private com.azure.resourcemanager.eventgrid.EventGridManager manager() { private String resourceGroupName; + private String domainName; + private String topicName; private String eventSubscriptionName; private EventSubscriptionUpdateParameters updateEventSubscriptionUpdateParameters; - public EventSubscriptionImpl withExistingTopic(String resourceGroupName, String topicName) { + public EventSubscriptionImpl withExistingTopic(String resourceGroupName, String domainName, String topicName) { this.resourceGroupName = resourceGroupName; + this.domainName = domainName; this.topicName = topicName; return this; } @@ -125,8 +128,9 @@ public EventSubscription create() { this.innerObject = serviceManager .serviceClient() - .getTopicEventSubscriptions() - .createOrUpdate(resourceGroupName, topicName, eventSubscriptionName, this.innerModel(), Context.NONE); + .getDomainTopicEventSubscriptions() + .createOrUpdate( + resourceGroupName, domainName, topicName, eventSubscriptionName, this.innerModel(), Context.NONE); return this; } @@ -134,8 +138,9 @@ public EventSubscription create(Context context) { this.innerObject = serviceManager .serviceClient() - .getTopicEventSubscriptions() - .createOrUpdate(resourceGroupName, topicName, eventSubscriptionName, this.innerModel(), context); + .getDomainTopicEventSubscriptions() + .createOrUpdate( + resourceGroupName, domainName, topicName, eventSubscriptionName, this.innerModel(), context); return this; } @@ -154,9 +159,10 @@ public EventSubscription apply() { this.innerObject = serviceManager .serviceClient() - .getTopicEventSubscriptions() + .getDomainTopicEventSubscriptions() .update( resourceGroupName, + domainName, topicName, eventSubscriptionName, updateEventSubscriptionUpdateParameters, @@ -168,9 +174,10 @@ public EventSubscription apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getTopicEventSubscriptions() + .getDomainTopicEventSubscriptions() .update( resourceGroupName, + domainName, topicName, eventSubscriptionName, updateEventSubscriptionUpdateParameters, @@ -183,6 +190,7 @@ public EventSubscription apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.domainName = Utils.getValueFromIdByName(innerObject.id(), "domains"); this.topicName = Utils.getValueFromIdByName(innerObject.id(), "topics"); this.eventSubscriptionName = Utils.getValueFromIdByName(innerObject.id(), "eventSubscriptions"); } @@ -191,8 +199,8 @@ public EventSubscription refresh() { this.innerObject = serviceManager .serviceClient() - .getTopicEventSubscriptions() - .getWithResponse(resourceGroupName, topicName, eventSubscriptionName, Context.NONE) + .getDomainTopicEventSubscriptions() + .getWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, Context.NONE) .getValue(); return this; } @@ -201,32 +209,35 @@ public EventSubscription refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getTopicEventSubscriptions() - .getWithResponse(resourceGroupName, topicName, eventSubscriptionName, context) + .getDomainTopicEventSubscriptions() + .getWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, context) .getValue(); return this; } - public DeliveryAttributeListResult getDeliveryAttributes() { + public Response getDeliveryAttributesWithResponse(Context context) { return serviceManager - .topicEventSubscriptions() - .getDeliveryAttributes(resourceGroupName, topicName, eventSubscriptionName); + .domainTopicEventSubscriptions() + .getDeliveryAttributesWithResponse( + resourceGroupName, domainName, topicName, eventSubscriptionName, context); } - public Response getDeliveryAttributesWithResponse(Context context) { + public DeliveryAttributeListResult getDeliveryAttributes() { return serviceManager - .topicEventSubscriptions() - .getDeliveryAttributesWithResponse(resourceGroupName, topicName, eventSubscriptionName, context); + .domainTopicEventSubscriptions() + .getDeliveryAttributes(resourceGroupName, domainName, topicName, eventSubscriptionName); } - public EventSubscriptionFullUrl getFullUrl() { - return serviceManager.topicEventSubscriptions().getFullUrl(resourceGroupName, topicName, eventSubscriptionName); + public Response getFullUrlWithResponse(Context context) { + return serviceManager + .domainTopicEventSubscriptions() + .getFullUrlWithResponse(resourceGroupName, domainName, topicName, eventSubscriptionName, context); } - public Response getFullUrlWithResponse(Context context) { + public EventSubscriptionFullUrl getFullUrl() { return serviceManager - .topicEventSubscriptions() - .getFullUrlWithResponse(resourceGroupName, topicName, eventSubscriptionName, context); + .domainTopicEventSubscriptions() + .getFullUrl(resourceGroupName, domainName, topicName, eventSubscriptionName); } public EventSubscriptionImpl withDestination(EventSubscriptionDestination destination) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsClientImpl.java index b33aa6a14d57..7218de09a13b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsClientImpl.java @@ -68,7 +68,19 @@ public final class EventSubscriptionsClientImpl implements EventSubscriptionsCli */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface EventSubscriptionsService { + public interface EventSubscriptionsService { + @Headers({"Content-Type: application/json"}) + @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeliveryAttributes( + @HostParam("$host") String endpoint, + @PathParam(value = "scope", encoded = true) String scope, + @PathParam("eventSubscriptionName") String eventSubscriptionName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200}) @@ -145,8 +157,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}" - + "/eventSubscriptions") + "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listGlobalBySubscriptionForTopicType( @@ -161,8 +172,7 @@ Mono> listGlobalBySubscriptionForTopicTyp @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/eventSubscriptions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -177,8 +187,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/topicTypes/{topicTypeName}/eventSubscriptions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listGlobalByResourceGroupForTopicType( @@ -208,8 +217,7 @@ Mono> listRegionalBySubscription( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations" - + "/{location}/eventSubscriptions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRegionalByResourceGroup( @@ -225,8 +233,7 @@ Mono> listRegionalByResourceGroup( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes" - + "/{topicTypeName}/eventSubscriptions") + "/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRegionalBySubscriptionForTopicType( @@ -242,8 +249,7 @@ Mono> listRegionalBySubscriptionForTopicT @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations" - + "/{location}/topicTypes/{topicTypeName}/eventSubscriptions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRegionalByResourceGroupForTopicType( @@ -260,8 +266,7 @@ Mono> listRegionalByResourceGroupForTopic @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}" - + "/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResource( @@ -279,8 +284,7 @@ Mono> listByResource( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains" - + "/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDomainTopic( @@ -295,18 +299,6 @@ Mono> listByDomainTopic( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post("/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes( - @HostParam("$host") String endpoint, - @PathParam(value = "scope", encoded = true) String scope, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -409,7 +401,180 @@ Mono> listByDomainTopicNext( } /** - * Get properties of an event subscription. + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String scope, String eventSubscriptionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scope == null) { + return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getDeliveryAttributes( + this.client.getEndpoint(), + scope, + eventSubscriptionName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @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 all delivery attributes for an event subscription along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String scope, String eventSubscriptionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (scope == null) { + return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getDeliveryAttributes( + this.client.getEndpoint(), scope, eventSubscriptionName, this.client.getApiVersion(), accept, context); + } + + /** + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeliveryAttributesAsync( + String scope, String eventSubscriptionName) { + return getDeliveryAttributesWithResponseAsync(scope, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. + * @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 all delivery attributes for an event subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeliveryAttributesWithResponse( + String scope, String eventSubscriptionName, Context context) { + return getDeliveryAttributesWithResponseAsync(scope, eventSubscriptionName, context).block(); + } + + /** + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName) { + return getDeliveryAttributesWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); + } + + /** + * Get an event subscription. + * + *

Get properties of an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -456,7 +621,9 @@ private Mono> getWithResponseAsync(String scope } /** - * Get properties of an event subscription. + * Get an event subscription. + * + *

Get properties of an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -496,7 +663,9 @@ private Mono> getWithResponseAsync( } /** - * Get properties of an event subscription. + * Get an event subscription. + * + *

Get properties of an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -518,7 +687,9 @@ private Mono getAsync(String scope, String eventSubscrip } /** - * Get properties of an event subscription. + * Get an event subscription. + * + *

Get properties of an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -529,18 +700,22 @@ private Mono getAsync(String scope, String eventSubscrip * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. * @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 properties of an event subscription. + * @return properties of an event subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner get(String scope, String eventSubscriptionName) { - return getAsync(scope, eventSubscriptionName).block(); + public Response getWithResponse( + String scope, String eventSubscriptionName, Context context) { + return getWithResponseAsync(scope, eventSubscriptionName, context).block(); } /** - * Get properties of an event subscription. + * Get an event subscription. + * + *

Get properties of an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -551,21 +726,21 @@ public EventSubscriptionInner get(String scope, String eventSubscriptionName) { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. * @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 properties of an event subscription along with {@link Response}. + * @return properties of an event subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String scope, String eventSubscriptionName, Context context) { - return getWithResponseAsync(scope, eventSubscriptionName, context).block(); + public EventSubscriptionInner get(String scope, String eventSubscriptionName) { + return getWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -622,8 +797,10 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -678,8 +855,10 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -713,8 +892,10 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -750,8 +931,10 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -772,12 +955,14 @@ private PollerFlux, EventSubscriptionInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdateAsync(scope, eventSubscriptionName, eventSubscriptionInfo).getSyncPoller(); + return this.beginCreateOrUpdateAsync(scope, eventSubscriptionName, eventSubscriptionInfo).getSyncPoller(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -799,12 +984,16 @@ public SyncPoller, EventSubscriptionInner> be @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EventSubscriptionInner> beginCreateOrUpdate( String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdateAsync(scope, eventSubscriptionName, eventSubscriptionInfo, context).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(scope, eventSubscriptionName, eventSubscriptionInfo, context) + .getSyncPoller(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -831,8 +1020,10 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -860,8 +1051,10 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -886,8 +1079,10 @@ public EventSubscriptionInner createOrUpdate( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -913,7 +1108,9 @@ public EventSubscriptionInner createOrUpdate( } /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -958,7 +1155,9 @@ private Mono>> deleteWithResponseAsync(String scope, S } /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -997,7 +1196,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1023,7 +1224,9 @@ private PollerFlux, Void> beginDeleteAsync(String scope, String } /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1051,7 +1254,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1069,11 +1274,13 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName) { - return beginDeleteAsync(scope, eventSubscriptionName).getSyncPoller(); + return this.beginDeleteAsync(scope, eventSubscriptionName).getSyncPoller(); } /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1092,11 +1299,13 @@ public SyncPoller, Void> beginDelete(String scope, String event */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String scope, String eventSubscriptionName, Context context) { - return beginDeleteAsync(scope, eventSubscriptionName, context).getSyncPoller(); + return this.beginDeleteAsync(scope, eventSubscriptionName, context).getSyncPoller(); } /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1118,7 +1327,9 @@ private Mono deleteAsync(String scope, String eventSubscriptionName) { } /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1143,7 +1354,9 @@ private Mono deleteAsync(String scope, String eventSubscriptionName, Conte } /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1164,7 +1377,9 @@ public void delete(String scope, String eventSubscriptionName) { } /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1186,7 +1401,9 @@ public void delete(String scope, String eventSubscriptionName, Context context) } /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1246,7 +1463,9 @@ private Mono>> updateWithResponseAsync( } /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1305,7 +1524,9 @@ private Mono>> updateWithResponseAsync( } /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1340,7 +1561,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1378,7 +1601,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1400,11 +1625,13 @@ public SyncPoller, EventSubscriptionInner> be String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdateAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).getSyncPoller(); + return this.beginUpdateAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).getSyncPoller(); } /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1428,12 +1655,15 @@ public SyncPoller, EventSubscriptionInner> be String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdateAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, context) + return this + .beginUpdateAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, context) .getSyncPoller(); } /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1461,7 +1691,9 @@ private Mono updateAsync( } /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1491,7 +1723,9 @@ private Mono updateAsync( } /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1517,7 +1751,9 @@ public EventSubscriptionInner update( } /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1545,7 +1781,9 @@ public EventSubscriptionInner update( } /** - * Get the full endpoint URL for an event subscription. + * Get full URL of an event subscription. + * + *

Get the full endpoint URL for an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1594,7 +1832,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for an event subscription. + * Get full URL of an event subscription. + * + *

Get the full endpoint URL for an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1636,7 +1876,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for an event subscription. + * Get full URL of an event subscription. + * + *

Get the full endpoint URL for an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1659,7 +1901,9 @@ private Mono getFullUrlAsync(String scope, String } /** - * Get the full endpoint URL for an event subscription. + * Get full URL of an event subscription. + * + *

Get the full endpoint URL for an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1670,18 +1914,22 @@ private Mono getFullUrlAsync(String scope, String * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. * @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 the full endpoint URL for an event subscription. + * @return the full endpoint URL for an event subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName) { - return getFullUrlAsync(scope, eventSubscriptionName).block(); + public Response getFullUrlWithResponse( + String scope, String eventSubscriptionName, Context context) { + return getFullUrlWithResponseAsync(scope, eventSubscriptionName, context).block(); } /** - * Get the full endpoint URL for an event subscription. + * Get full URL of an event subscription. + * + *

Get the full endpoint URL for an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -1692,20 +1940,20 @@ public EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscr * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. * @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 the full endpoint URL for an event subscription along with {@link Response}. + * @return the full endpoint URL for an event subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse( - String scope, String eventSubscriptionName, Context context) { - return getFullUrlWithResponseAsync(scope, eventSubscriptionName, context).block(); + public EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName) { + return getFullUrlWithResponse(scope, eventSubscriptionName, Context.NONE).getValue(); } /** - * List all aggregated global event subscriptions under a specific Azure subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * + *

List all aggregated global event subscriptions under a specific Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1761,7 +2009,9 @@ private Mono> listSinglePageAsync(String f } /** - * List all aggregated global event subscriptions under a specific Azure subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * + *

List all aggregated global event subscriptions under a specific Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1816,7 +2066,9 @@ private Mono> listSinglePageAsync( } /** - * List all aggregated global event subscriptions under a specific Azure subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * + *

List all aggregated global event subscriptions under a specific Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1838,7 +2090,9 @@ private PagedFlux listAsync(String filter, Integer top) } /** - * List all aggregated global event subscriptions under a specific Azure subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * + *

List all aggregated global event subscriptions under a specific Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1853,7 +2107,9 @@ private PagedFlux listAsync() { } /** - * List all aggregated global event subscriptions under a specific Azure subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * + *

List all aggregated global event subscriptions under a specific Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1877,7 +2133,9 @@ private PagedFlux listAsync(String filter, Integer top, } /** - * List all aggregated global event subscriptions under a specific Azure subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * + *

List all aggregated global event subscriptions under a specific Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1891,7 +2149,9 @@ public PagedIterable list() { } /** - * List all aggregated global event subscriptions under a specific Azure subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * + *

List all aggregated global event subscriptions under a specific Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1913,7 +2173,9 @@ public PagedIterable list(String filter, Integer top, Co } /** - * List all global event subscriptions under an Azure subscription for a topic type. + * List all global event subscriptions for a topic type. + * + *

List all global event subscriptions under an Azure subscription for a topic type. * * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1975,7 +2237,9 @@ private Mono> listGlobalBySubscriptionForT } /** - * List all global event subscriptions under an Azure subscription for a topic type. + * List all global event subscriptions for a topic type. + * + *

List all global event subscriptions under an Azure subscription for a topic type. * * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2035,7 +2299,9 @@ private Mono> listGlobalBySubscriptionForT } /** - * List all global event subscriptions under an Azure subscription for a topic type. + * List all global event subscriptions for a topic type. + * + *

List all global event subscriptions under an Azure subscription for a topic type. * * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2060,7 +2326,9 @@ private PagedFlux listGlobalBySubscriptionForTopicTypeAs } /** - * List all global event subscriptions under an Azure subscription for a topic type. + * List all global event subscriptions for a topic type. + * + *

List all global event subscriptions under an Azure subscription for a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2078,7 +2346,9 @@ private PagedFlux listGlobalBySubscriptionForTopicTypeAs } /** - * List all global event subscriptions under an Azure subscription for a topic type. + * List all global event subscriptions for a topic type. + * + *

List all global event subscriptions under an Azure subscription for a topic type. * * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2104,7 +2374,9 @@ private PagedFlux listGlobalBySubscriptionForTopicTypeAs } /** - * List all global event subscriptions under an Azure subscription for a topic type. + * List all global event subscriptions for a topic type. + * + *

List all global event subscriptions under an Azure subscription for a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2120,7 +2392,9 @@ public PagedIterable listGlobalBySubscriptionForTopicTyp } /** - * List all global event subscriptions under an Azure subscription for a topic type. + * List all global event subscriptions for a topic type. + * + *

List all global event subscriptions under an Azure subscription for a topic type. * * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2144,7 +2418,9 @@ public PagedIterable listGlobalBySubscriptionForTopicTyp } /** - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription and resource group. + * + *

List all global event subscriptions under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2207,7 +2483,9 @@ private Mono> listByResourceGroupSinglePag } /** - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription and resource group. + * + *

List all global event subscriptions under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2268,7 +2546,9 @@ private Mono> listByResourceGroupSinglePag } /** - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription and resource group. + * + *

List all global event subscriptions under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2293,7 +2573,9 @@ private PagedFlux listByResourceGroupAsync( } /** - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription and resource group. + * + *

List all global event subscriptions under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2311,7 +2593,9 @@ private PagedFlux listByResourceGroupAsync(String resour } /** - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription and resource group. + * + *

List all global event subscriptions under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2337,7 +2621,9 @@ private PagedFlux listByResourceGroupAsync( } /** - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription and resource group. + * + *

List all global event subscriptions under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2353,7 +2639,9 @@ public PagedIterable listByResourceGroup(String resource } /** - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription and resource group. + * + *

List all global event subscriptions under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2377,7 +2665,9 @@ public PagedIterable listByResourceGroup( } /** - * List all global event subscriptions under a resource group for a specific topic type. + * List all global event subscriptions under a resource group for a topic type. + * + *

List all global event subscriptions under a resource group for a specific topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicTypeName Name of the topic type. @@ -2445,7 +2735,9 @@ private Mono> listGlobalByResourceGroupFor } /** - * List all global event subscriptions under a resource group for a specific topic type. + * List all global event subscriptions under a resource group for a topic type. + * + *

List all global event subscriptions under a resource group for a specific topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicTypeName Name of the topic type. @@ -2511,7 +2803,9 @@ private Mono> listGlobalByResourceGroupFor } /** - * List all global event subscriptions under a resource group for a specific topic type. + * List all global event subscriptions under a resource group for a topic type. + * + *

List all global event subscriptions under a resource group for a specific topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicTypeName Name of the topic type. @@ -2537,7 +2831,9 @@ private PagedFlux listGlobalByResourceGroupForTopicTypeA } /** - * List all global event subscriptions under a resource group for a specific topic type. + * List all global event subscriptions under a resource group for a topic type. + * + *

List all global event subscriptions under a resource group for a specific topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicTypeName Name of the topic type. @@ -2557,7 +2853,9 @@ private PagedFlux listGlobalByResourceGroupForTopicTypeA } /** - * List all global event subscriptions under a resource group for a specific topic type. + * List all global event subscriptions under a resource group for a topic type. + * + *

List all global event subscriptions under a resource group for a specific topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicTypeName Name of the topic type. @@ -2586,7 +2884,9 @@ private PagedFlux listGlobalByResourceGroupForTopicTypeA } /** - * List all global event subscriptions under a resource group for a specific topic type. + * List all global event subscriptions under a resource group for a topic type. + * + *

List all global event subscriptions under a resource group for a specific topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicTypeName Name of the topic type. @@ -2605,7 +2905,9 @@ public PagedIterable listGlobalByResourceGroupForTopicTy } /** - * List all global event subscriptions under a resource group for a specific topic type. + * List all global event subscriptions under a resource group for a topic type. + * + *

List all global event subscriptions under a resource group for a specific topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicTypeName Name of the topic type. @@ -2631,7 +2933,9 @@ public PagedIterable listGlobalByResourceGroupForTopicTy } /** - * List all event subscriptions from the given location under a specific Azure subscription. + * List all regional event subscriptions under an Azure subscription. + * + *

List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2693,7 +2997,9 @@ private Mono> listRegionalBySubscriptionSi } /** - * List all event subscriptions from the given location under a specific Azure subscription. + * List all regional event subscriptions under an Azure subscription. + * + *

List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2753,7 +3059,9 @@ private Mono> listRegionalBySubscriptionSi } /** - * List all event subscriptions from the given location under a specific Azure subscription. + * List all regional event subscriptions under an Azure subscription. + * + *

List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2778,7 +3086,9 @@ private PagedFlux listRegionalBySubscriptionAsync( } /** - * List all event subscriptions from the given location under a specific Azure subscription. + * List all regional event subscriptions under an Azure subscription. + * + *

List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2796,7 +3106,9 @@ private PagedFlux listRegionalBySubscriptionAsync(String } /** - * List all event subscriptions from the given location under a specific Azure subscription. + * List all regional event subscriptions under an Azure subscription. + * + *

List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2822,7 +3134,9 @@ private PagedFlux listRegionalBySubscriptionAsync( } /** - * List all event subscriptions from the given location under a specific Azure subscription. + * List all regional event subscriptions under an Azure subscription. + * + *

List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2838,7 +3152,9 @@ public PagedIterable listRegionalBySubscription(String l } /** - * List all event subscriptions from the given location under a specific Azure subscription. + * List all regional event subscriptions under an Azure subscription. + * + *

List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -2862,7 +3178,9 @@ public PagedIterable listRegionalBySubscription( } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all regional event subscriptions under an Azure subscription and resource group. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -2930,7 +3248,9 @@ private Mono> listRegionalByResourceGroupS } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all regional event subscriptions under an Azure subscription and resource group. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -2996,7 +3316,9 @@ private Mono> listRegionalByResourceGroupS } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all regional event subscriptions under an Azure subscription and resource group. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3022,7 +3344,9 @@ private PagedFlux listRegionalByResourceGroupAsync( } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all regional event subscriptions under an Azure subscription and resource group. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3042,7 +3366,9 @@ private PagedFlux listRegionalByResourceGroupAsync( } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all regional event subscriptions under an Azure subscription and resource group. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3069,7 +3395,9 @@ private PagedFlux listRegionalByResourceGroupAsync( } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all regional event subscriptions under an Azure subscription and resource group. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3087,7 +3415,9 @@ public PagedIterable listRegionalByResourceGroup( } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all regional event subscriptions under an Azure subscription and resource group. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3112,7 +3442,9 @@ public PagedIterable listRegionalByResourceGroup( } /** - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all regional event subscriptions under an Azure subscription for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and topic type. * * @param location Name of the location. * @param topicTypeName Name of the topic type. @@ -3179,7 +3511,9 @@ private Mono> listRegionalBySubscriptionFo } /** - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all regional event subscriptions under an Azure subscription for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and topic type. * * @param location Name of the location. * @param topicTypeName Name of the topic type. @@ -3244,7 +3578,9 @@ private Mono> listRegionalBySubscriptionFo } /** - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all regional event subscriptions under an Azure subscription for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and topic type. * * @param location Name of the location. * @param topicTypeName Name of the topic type. @@ -3270,7 +3606,9 @@ private PagedFlux listRegionalBySubscriptionForTopicType } /** - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all regional event subscriptions under an Azure subscription for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and topic type. * * @param location Name of the location. * @param topicTypeName Name of the topic type. @@ -3290,7 +3628,9 @@ private PagedFlux listRegionalBySubscriptionForTopicType } /** - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all regional event subscriptions under an Azure subscription for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and topic type. * * @param location Name of the location. * @param topicTypeName Name of the topic type. @@ -3317,7 +3657,9 @@ private PagedFlux listRegionalBySubscriptionForTopicType } /** - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all regional event subscriptions under an Azure subscription for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and topic type. * * @param location Name of the location. * @param topicTypeName Name of the topic type. @@ -3335,7 +3677,9 @@ public PagedIterable listRegionalBySubscriptionForTopicT } /** - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all regional event subscriptions under an Azure subscription for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and topic type. * * @param location Name of the location. * @param topicTypeName Name of the topic type. @@ -3361,8 +3705,10 @@ public PagedIterable listRegionalBySubscriptionForTopicT } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group + * and topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3435,8 +3781,10 @@ private Mono> listRegionalByResourceGroupF } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group + * and topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3507,8 +3855,10 @@ private Mono> listRegionalByResourceGroupF } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group + * and topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3537,8 +3887,10 @@ private PagedFlux listRegionalByResourceGroupForTopicTyp } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group + * and topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3561,8 +3913,10 @@ private PagedFlux listRegionalByResourceGroupForTopicTyp } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group + * and topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3592,8 +3946,10 @@ private PagedFlux listRegionalByResourceGroupForTopicTyp } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group + * and topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3613,8 +3969,10 @@ public PagedIterable listRegionalByResourceGroupForTopic } /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group + * and topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -3642,7 +4000,9 @@ public PagedIterable listRegionalByResourceGroupForTopic } /** - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions. + * + *

List all event subscriptions that have been created for a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -3727,7 +4087,9 @@ private Mono> listByResourceSinglePageAsyn } /** - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions. + * + *

List all event subscriptions that have been created for a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -3811,7 +4173,9 @@ private Mono> listByResourceSinglePageAsyn } /** - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions. + * + *

List all event subscriptions that have been created for a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -3846,7 +4210,9 @@ private PagedFlux listByResourceAsync( } /** - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions. + * + *

List all event subscriptions that have been created for a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -3870,7 +4236,9 @@ private PagedFlux listByResourceAsync( } /** - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions. + * + *

List all event subscriptions that have been created for a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -3907,7 +4275,9 @@ private PagedFlux listByResourceAsync( } /** - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions. + * + *

List all event subscriptions that have been created for a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -3928,7 +4298,9 @@ public PagedIterable listByResource( } /** - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions. + * + *

List all event subscriptions that have been created for a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -3963,7 +4335,9 @@ public PagedIterable listByResource( } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -4036,7 +4410,9 @@ private Mono> listByDomainTopicSinglePageA } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -4107,7 +4483,9 @@ private Mono> listByDomainTopicSinglePageA } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -4134,7 +4512,9 @@ private PagedFlux listByDomainTopicAsync( } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -4155,7 +4535,9 @@ private PagedFlux listByDomainTopicAsync( } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -4183,7 +4565,9 @@ private PagedFlux listByDomainTopicAsync( } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -4202,7 +4586,9 @@ public PagedIterable listByDomainTopic( } /** - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -4228,171 +4614,11 @@ public PagedIterable listByDomainTopic( listByDomainTopicAsync(resourceGroupName, domainName, topicName, filter, top, context)); } - /** - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String scope, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getDeliveryAttributes( - this.client.getEndpoint(), - scope, - eventSubscriptionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @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 all delivery attributes for an event subscription along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String scope, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (scope == null) { - return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getDeliveryAttributes( - this.client.getEndpoint(), scope, eventSubscriptionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDeliveryAttributesAsync( - String scope, String eventSubscriptionName) { - return getDeliveryAttributesWithResponseAsync(scope, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes(String scope, String eventSubscriptionName) { - return getDeliveryAttributesAsync(scope, eventSubscriptionName).block(); - } - - /** - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. - * @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 all delivery attributes for an event subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse( - String scope, String eventSubscriptionName, Context context) { - return getDeliveryAttributesWithResponseAsync(scope, eventSubscriptionName, context).block(); - } - /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -4429,7 +4655,8 @@ private Mono> listGlobalBySubscriptionNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4467,7 +4694,8 @@ private Mono> listGlobalBySubscriptionNext /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -4507,7 +4735,8 @@ private Mono> listGlobalBySubscriptionForT /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4545,7 +4774,8 @@ private Mono> listGlobalBySubscriptionForT /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -4582,7 +4812,8 @@ private Mono> listGlobalByResourceGroupNex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4620,7 +4851,8 @@ private Mono> listGlobalByResourceGroupNex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -4661,7 +4893,8 @@ private Mono> listGlobalByResourceGroupFor /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4699,7 +4932,8 @@ private Mono> listGlobalByResourceGroupFor /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -4736,7 +4970,8 @@ private Mono> listRegionalBySubscriptionNe /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4774,7 +5009,8 @@ private Mono> listRegionalBySubscriptionNe /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -4813,7 +5049,8 @@ private Mono> listRegionalByResourceGroupN /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4851,7 +5088,8 @@ private Mono> listRegionalByResourceGroupN /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -4892,7 +5130,8 @@ private Mono> listRegionalBySubscriptionFo /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4930,7 +5169,8 @@ private Mono> listRegionalBySubscriptionFo /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -4971,7 +5211,8 @@ private Mono> listRegionalByResourceGroupF /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5009,7 +5250,8 @@ private Mono> listRegionalByResourceGroupF /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -5045,7 +5287,8 @@ private Mono> listByResourceNextSinglePage /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5083,7 +5326,8 @@ private Mono> listByResourceNextSinglePage /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -5119,7 +5363,8 @@ private Mono> listByDomainTopicNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsImpl.java index 9a52b2e25867..824ccf8786cb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/EventSubscriptionsImpl.java @@ -32,10 +32,26 @@ public EventSubscriptionsImpl( this.serviceManager = serviceManager; } - public EventSubscription get(String scope, String eventSubscriptionName) { - EventSubscriptionInner inner = this.serviceClient().get(scope, eventSubscriptionName); + public Response getDeliveryAttributesWithResponse( + String scope, String eventSubscriptionName, Context context) { + Response inner = + this.serviceClient().getDeliveryAttributesWithResponse(scope, eventSubscriptionName, context); if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName) { + DeliveryAttributeListResultInner inner = + this.serviceClient().getDeliveryAttributes(scope, eventSubscriptionName); + if (inner != null) { + return new DeliveryAttributeListResultImpl(inner, this.manager()); } else { return null; } @@ -55,6 +71,15 @@ public Response getWithResponse(String scope, String eventSub } } + public EventSubscription get(String scope, String eventSubscriptionName) { + EventSubscriptionInner inner = this.serviceClient().get(scope, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + public EventSubscription createOrUpdate( String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { EventSubscriptionInner inner = @@ -112,15 +137,6 @@ public EventSubscription update( } } - public EventSubscriptionFullUrl getFullUrl(String scope, String eventSubscriptionName) { - EventSubscriptionFullUrlInner inner = this.serviceClient().getFullUrl(scope, eventSubscriptionName); - if (inner != null) { - return new EventSubscriptionFullUrlImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getFullUrlWithResponse( String scope, String eventSubscriptionName, Context context) { Response inner = @@ -136,6 +152,15 @@ public Response getFullUrlWithResponse( } } + public EventSubscriptionFullUrl getFullUrl(String scope, String eventSubscriptionName) { + EventSubscriptionFullUrlInner inner = this.serviceClient().getFullUrl(scope, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionFullUrlImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); return Utils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); @@ -280,31 +305,6 @@ public PagedIterable listByDomainTopic( return Utils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } - public DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName) { - DeliveryAttributeListResultInner inner = - this.serviceClient().getDeliveryAttributes(scope, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getDeliveryAttributesWithResponse( - String scope, String eventSubscriptionName, Context context) { - Response inner = - this.serviceClient().getDeliveryAttributesWithResponse(scope, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - private EventSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java index c1877c9cc5ea..dcbcbad042fb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsClientImpl.java @@ -50,7 +50,7 @@ public final class ExtensionTopicsClientImpl implements ExtensionTopicsClient { */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface ExtensionTopicsService { + public interface ExtensionTopicsService { @Headers({"Content-Type: application/json"}) @Get("/{scope}/providers/Microsoft.EventGrid/extensionTopics/default") @ExpectedResponses({200}) @@ -64,7 +64,9 @@ Mono> get( } /** - * Get the properties of an extension topic. + * Get properties of an extension topic. + * + *

Get the properties of an extension topic. * * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use @@ -97,7 +99,9 @@ private Mono> getWithResponseAsync(String scope) { } /** - * Get the properties of an extension topic. + * Get properties of an extension topic. + * + *

Get the properties of an extension topic. * * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use @@ -129,7 +133,9 @@ private Mono> getWithResponseAsync(String scope, C } /** - * Get the properties of an extension topic. + * Get properties of an extension topic. + * + *

Get the properties of an extension topic. * * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use @@ -148,7 +154,9 @@ private Mono getAsync(String scope) { } /** - * Get the properties of an extension topic. + * Get properties of an extension topic. + * + *

Get the properties of an extension topic. * * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use @@ -156,18 +164,21 @@ private Mono getAsync(String scope) { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' * for Azure resource. + * @param context The context to associate with this operation. * @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 the properties of an extension topic. + * @return the properties of an extension topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExtensionTopicInner get(String scope) { - return getAsync(scope).block(); + public Response getWithResponse(String scope, Context context) { + return getWithResponseAsync(scope, context).block(); } /** - * Get the properties of an extension topic. + * Get properties of an extension topic. + * + *

Get the properties of an extension topic. * * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use @@ -175,14 +186,13 @@ public ExtensionTopicInner get(String scope) { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' * for Azure resource. - * @param context The context to associate with this operation. * @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 the properties of an extension topic along with {@link Response}. + * @return the properties of an extension topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String scope, Context context) { - return getWithResponseAsync(scope, context).block(); + public ExtensionTopicInner get(String scope) { + return getWithResponse(scope, Context.NONE).getValue(); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsImpl.java index b702f31be8c3..9c9d1b068df0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/ExtensionTopicsImpl.java @@ -26,15 +26,6 @@ public ExtensionTopicsImpl( this.serviceManager = serviceManager; } - public ExtensionTopic get(String scope) { - ExtensionTopicInner inner = this.serviceClient().get(scope); - if (inner != null) { - return new ExtensionTopicImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String scope, Context context) { Response inner = this.serviceClient().getWithResponse(scope, context); if (inner != null) { @@ -48,6 +39,15 @@ public Response getWithResponse(String scope, Context context) { } } + public ExtensionTopic get(String scope) { + ExtensionTopicInner inner = this.serviceClient().get(scope); + if (inner != null) { + return new ExtensionTopicImpl(inner, this.manager()); + } else { + return null; + } + } + private ExtensionTopicsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceImpl.java new file mode 100644 index 000000000000..a2c6db5e8cf5 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceImpl.java @@ -0,0 +1,339 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner; +import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.eventgrid.models.IdentityInfo; +import com.azure.resourcemanager.eventgrid.models.InboundIpRule; +import com.azure.resourcemanager.eventgrid.models.Namespace; +import com.azure.resourcemanager.eventgrid.models.NamespaceProvisioningState; +import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; +import com.azure.resourcemanager.eventgrid.models.NamespaceSharedAccessKeys; +import com.azure.resourcemanager.eventgrid.models.NamespaceSku; +import com.azure.resourcemanager.eventgrid.models.NamespaceUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnection; +import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; +import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; +import com.azure.resourcemanager.eventgrid.models.TopicsConfiguration; +import com.azure.resourcemanager.eventgrid.models.UpdateTopicSpacesConfigurationInfo; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public final class NamespaceImpl implements Namespace, Namespace.Definition, Namespace.Update { + private NamespaceInner innerObject; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public NamespaceSku sku() { + return this.innerModel().sku(); + } + + public IdentityInfo identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public NamespaceProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public TopicsConfiguration topicsConfiguration() { + return this.innerModel().topicsConfiguration(); + } + + public TopicSpacesConfiguration topicSpacesConfiguration() { + return this.innerModel().topicSpacesConfiguration(); + } + + public Boolean isZoneRedundant() { + return this.innerModel().isZoneRedundant(); + } + + public PublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public List inboundIpRules() { + List inner = this.innerModel().inboundIpRules(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public TlsVersion minimumTlsVersionAllowed() { + return this.innerModel().minimumTlsVersionAllowed(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NamespaceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String namespaceName; + + private NamespaceUpdateParameters updateNamespaceUpdateParameters; + + public NamespaceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Namespace create() { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaces() + .createOrUpdate(resourceGroupName, namespaceName, this.innerModel(), Context.NONE); + return this; + } + + public Namespace create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaces() + .createOrUpdate(resourceGroupName, namespaceName, this.innerModel(), context); + return this; + } + + NamespaceImpl(String name, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = new NamespaceInner(); + this.serviceManager = serviceManager; + this.namespaceName = name; + } + + public NamespaceImpl update() { + this.updateNamespaceUpdateParameters = new NamespaceUpdateParameters(); + return this; + } + + public Namespace apply() { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaces() + .update(resourceGroupName, namespaceName, updateNamespaceUpdateParameters, Context.NONE); + return this; + } + + public Namespace apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaces() + .update(resourceGroupName, namespaceName, updateNamespaceUpdateParameters, context); + return this; + } + + NamespaceImpl(NamespaceInner innerObject, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.namespaceName = Utils.getValueFromIdByName(innerObject.id(), "namespaces"); + } + + public Namespace refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaces() + .getByResourceGroupWithResponse(resourceGroupName, namespaceName, Context.NONE) + .getValue(); + return this; + } + + public Namespace refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaces() + .getByResourceGroupWithResponse(resourceGroupName, namespaceName, context) + .getValue(); + return this; + } + + public Response listSharedAccessKeysWithResponse(Context context) { + return serviceManager.namespaces().listSharedAccessKeysWithResponse(resourceGroupName, namespaceName, context); + } + + public NamespaceSharedAccessKeys listSharedAccessKeys() { + return serviceManager.namespaces().listSharedAccessKeys(resourceGroupName, namespaceName); + } + + public NamespaceSharedAccessKeys regenerateKey(NamespaceRegenerateKeyRequest regenerateKeyRequest) { + return serviceManager.namespaces().regenerateKey(resourceGroupName, namespaceName, regenerateKeyRequest); + } + + public NamespaceSharedAccessKeys regenerateKey( + NamespaceRegenerateKeyRequest regenerateKeyRequest, Context context) { + return serviceManager + .namespaces() + .regenerateKey(resourceGroupName, namespaceName, regenerateKeyRequest, context); + } + + public NamespaceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public NamespaceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public NamespaceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateNamespaceUpdateParameters.withTags(tags); + return this; + } + } + + public NamespaceImpl withSku(NamespaceSku sku) { + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updateNamespaceUpdateParameters.withSku(sku); + return this; + } + } + + public NamespaceImpl withIdentity(IdentityInfo identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateNamespaceUpdateParameters.withIdentity(identity); + return this; + } + } + + public NamespaceImpl withPrivateEndpointConnections( + List privateEndpointConnections) { + this.innerModel().withPrivateEndpointConnections(privateEndpointConnections); + return this; + } + + public NamespaceImpl withTopicsConfiguration(TopicsConfiguration topicsConfiguration) { + this.innerModel().withTopicsConfiguration(topicsConfiguration); + return this; + } + + public NamespaceImpl withTopicSpacesConfiguration(TopicSpacesConfiguration topicSpacesConfiguration) { + this.innerModel().withTopicSpacesConfiguration(topicSpacesConfiguration); + return this; + } + + public NamespaceImpl withIsZoneRedundant(Boolean isZoneRedundant) { + this.innerModel().withIsZoneRedundant(isZoneRedundant); + return this; + } + + public NamespaceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (isInCreateMode()) { + this.innerModel().withPublicNetworkAccess(publicNetworkAccess); + return this; + } else { + this.updateNamespaceUpdateParameters.withPublicNetworkAccess(publicNetworkAccess); + return this; + } + } + + public NamespaceImpl withInboundIpRules(List inboundIpRules) { + if (isInCreateMode()) { + this.innerModel().withInboundIpRules(inboundIpRules); + return this; + } else { + this.updateNamespaceUpdateParameters.withInboundIpRules(inboundIpRules); + return this; + } + } + + public NamespaceImpl withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + this.innerModel().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + + public NamespaceImpl withTopicSpacesConfiguration(UpdateTopicSpacesConfigurationInfo topicSpacesConfiguration) { + this.updateNamespaceUpdateParameters.withTopicSpacesConfiguration(topicSpacesConfiguration); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceSharedAccessKeysImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceSharedAccessKeysImpl.java new file mode 100644 index 000000000000..e69ac903774f --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceSharedAccessKeysImpl.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceSharedAccessKeysInner; +import com.azure.resourcemanager.eventgrid.models.NamespaceSharedAccessKeys; + +public final class NamespaceSharedAccessKeysImpl implements NamespaceSharedAccessKeys { + private NamespaceSharedAccessKeysInner innerObject; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + NamespaceSharedAccessKeysImpl( + NamespaceSharedAccessKeysInner innerObject, + com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String key1() { + return this.innerModel().key1(); + } + + public String key2() { + return this.innerModel().key2(); + } + + public NamespaceSharedAccessKeysInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsClientImpl.java new file mode 100644 index 000000000000..172d89f1bc99 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsClientImpl.java @@ -0,0 +1,1890 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner; +import com.azure.resourcemanager.eventgrid.models.SubscriptionUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.SubscriptionsListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in NamespaceTopicEventSubscriptionsClient. + */ +public final class NamespaceTopicEventSubscriptionsClientImpl implements NamespaceTopicEventSubscriptionsClient { + /** The proxy service used to perform REST calls. */ + private final NamespaceTopicEventSubscriptionsService service; + + /** The service client containing this operation class. */ + private final EventGridManagementClientImpl client; + + /** + * Initializes an instance of NamespaceTopicEventSubscriptionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NamespaceTopicEventSubscriptionsClientImpl(EventGridManagementClientImpl client) { + this.service = + RestProxy + .create( + NamespaceTopicEventSubscriptionsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventGridManagementClientNamespaceTopicEventSubscriptions to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventGridManagementC") + public interface NamespaceTopicEventSubscriptionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("eventSubscriptionName") String eventSubscriptionName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("eventSubscriptionName") String eventSubscriptionName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SubscriptionInner eventSubscriptionInfo, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("eventSubscriptionName") String eventSubscriptionName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @PathParam("eventSubscriptionName") String eventSubscriptionName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SubscriptionUpdateParameters eventSubscriptionUpdateParameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/eventSubscriptions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespaceTopic( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespaceTopicNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get an event subscription of a namespace topic. + * + *

Get properties of an event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a namespace topic along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get an event subscription of a namespace topic. + * + *

Get properties of an event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. + * @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 properties of an event subscription of a namespace topic along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get an event subscription of a namespace topic. + * + *

Get properties of an event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a namespace topic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { + return getWithResponseAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get an event subscription of a namespace topic. + * + *

Get properties of an event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. + * @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 properties of an event subscription of a namespace topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context) + .block(); + } + + /** + * Get an event subscription of a namespace topic. + * + *

Get properties of an event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a namespace topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SubscriptionInner get( + String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { + return getWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, Context.NONE) + .getValue(); + } + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @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 event Subscription along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + if (eventSubscriptionInfo == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); + } else { + eventSubscriptionInfo.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + this.client.getApiVersion(), + eventSubscriptionInfo, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @param context The context to associate with this operation. + * @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 event Subscription along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + if (eventSubscriptionInfo == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionInfo is required and cannot be null.")); + } else { + eventSubscriptionInfo.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + this.client.getApiVersion(), + eventSubscriptionInfo, + accept, + context); + } + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @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 the {@link PollerFlux} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SubscriptionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo) { + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionInfo); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SubscriptionInner.class, + SubscriptionInner.class, + this.client.getContext()); + } + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SubscriptionInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionInfo, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), SubscriptionInner.class, SubscriptionInner.class, context); + } + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @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 the {@link SyncPoller} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo) { + return this + .beginCreateOrUpdateAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionInfo) + .getSyncPoller(); + } + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo, + Context context) { + return this + .beginCreateOrUpdateAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionInfo, context) + .getSyncPoller(); + } + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @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 event Subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo) { + return beginCreateOrUpdateAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionInfo) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @param context The context to associate with this operation. + * @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 event Subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo, + Context context) { + return beginCreateOrUpdateAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionInfo, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @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 event Subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SubscriptionInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo) { + return createOrUpdateAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionInfo) + .block(); + } + + /** + * Create or update an event subscription of a namespace topic. + * + *

Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. + * Existing event subscriptions will be updated with this API. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the delivery mode, filter information, and + * others. + * @param context The context to associate with this operation. + * @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 event Subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SubscriptionInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionInner eventSubscriptionInfo, + Context context) { + return createOrUpdateAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionInfo, context) + .block(); + } + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { + return this + .beginDeleteAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName) + .getSyncPoller(); + } + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context) { + return this + .beginDeleteAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context) + .getSyncPoller(); + } + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { + return beginDeleteAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { + deleteAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName).block(); + } + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context) { + deleteAsync(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context).block(); + } + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @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 event Subscription along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + if (eventSubscriptionUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); + } else { + eventSubscriptionUpdateParameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + this.client.getApiVersion(), + eventSubscriptionUpdateParameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param context The context to associate with this operation. + * @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 event Subscription along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + if (eventSubscriptionUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter eventSubscriptionUpdateParameters is required and cannot be null.")); + } else { + eventSubscriptionUpdateParameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + this.client.getApiVersion(), + eventSubscriptionUpdateParameters, + accept, + context); + } + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @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 the {@link PollerFlux} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SubscriptionInner> beginUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + Mono>> mono = + updateWithResponseAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SubscriptionInner.class, + SubscriptionInner.class, + this.client.getContext()); + } + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SubscriptionInner> beginUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync( + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + eventSubscriptionUpdateParameters, + context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), SubscriptionInner.class, SubscriptionInner.class, context); + } + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @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 the {@link SyncPoller} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SubscriptionInner> beginUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return this + .beginUpdateAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters) + .getSyncPoller(); + } + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of event Subscription. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SubscriptionInner> beginUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context) { + return this + .beginUpdateAsync( + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + eventSubscriptionUpdateParameters, + context) + .getSyncPoller(); + } + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @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 event Subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return beginUpdateAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param context The context to associate with this operation. + * @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 event Subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context) { + return beginUpdateAsync( + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + eventSubscriptionUpdateParameters, + context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @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 event Subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SubscriptionInner update( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + return updateAsync( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters) + .block(); + } + + /** + * Update event subscription of a namespace topic. + * + *

Update an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param context The context to associate with this operation. + * @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 event Subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SubscriptionInner update( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + SubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context) { + return updateAsync( + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + eventSubscriptionUpdateParameters, + context) + .block(); + } + + /** + * List event subscriptions of a namespace topic. + * + *

List event subscriptions that belong to a specific namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List event subscriptions operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceTopicSinglePageAsync( + String resourceGroupName, String namespaceName, String topicName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByNamespaceTopic( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List event subscriptions of a namespace topic. + * + *

List event subscriptions that belong to a specific namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List event subscriptions operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceTopicSinglePageAsync( + String resourceGroupName, String namespaceName, String topicName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespaceTopic( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List event subscriptions of a namespace topic. + * + *

List event subscriptions that belong to a specific namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List event subscriptions operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceTopicAsync( + String resourceGroupName, String namespaceName, String topicName, String filter, Integer top) { + return new PagedFlux<>( + () -> listByNamespaceTopicSinglePageAsync(resourceGroupName, namespaceName, topicName, filter, top), + nextLink -> listByNamespaceTopicNextSinglePageAsync(nextLink)); + } + + /** + * List event subscriptions of a namespace topic. + * + *

List event subscriptions that belong to a specific namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @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 result of the List event subscriptions operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceTopicAsync( + String resourceGroupName, String namespaceName, String topicName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listByNamespaceTopicSinglePageAsync(resourceGroupName, namespaceName, topicName, filter, top), + nextLink -> listByNamespaceTopicNextSinglePageAsync(nextLink)); + } + + /** + * List event subscriptions of a namespace topic. + * + *

List event subscriptions that belong to a specific namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List event subscriptions operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceTopicAsync( + String resourceGroupName, String namespaceName, String topicName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> + listByNamespaceTopicSinglePageAsync(resourceGroupName, namespaceName, topicName, filter, top, context), + nextLink -> listByNamespaceTopicNextSinglePageAsync(nextLink, context)); + } + + /** + * List event subscriptions of a namespace topic. + * + *

List event subscriptions that belong to a specific namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @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 result of the List event subscriptions operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespaceTopic( + String resourceGroupName, String namespaceName, String topicName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listByNamespaceTopicAsync(resourceGroupName, namespaceName, topicName, filter, top)); + } + + /** + * List event subscriptions of a namespace topic. + * + *

List event subscriptions that belong to a specific namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List event subscriptions operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespaceTopic( + String resourceGroupName, String namespaceName, String topicName, String filter, Integer top, Context context) { + return new PagedIterable<>( + listByNamespaceTopicAsync(resourceGroupName, namespaceName, topicName, filter, top, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 result of the List event subscriptions operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceTopicNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByNamespaceTopicNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @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 result of the List event subscriptions operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceTopicNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespaceTopicNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java new file mode 100644 index 000000000000..213917adc740 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicEventSubscriptionsImpl.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicEventSubscriptionsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopicEventSubscriptions; +import com.azure.resourcemanager.eventgrid.models.Subscription; + +public final class NamespaceTopicEventSubscriptionsImpl implements NamespaceTopicEventSubscriptions { + private static final ClientLogger LOGGER = new ClientLogger(NamespaceTopicEventSubscriptionsImpl.class); + + private final NamespaceTopicEventSubscriptionsClient innerClient; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public NamespaceTopicEventSubscriptionsImpl( + NamespaceTopicEventSubscriptionsClient innerClient, + com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SubscriptionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Subscription get( + String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { + SubscriptionInner inner = + this.serviceClient().get(resourceGroupName, namespaceName, topicName, eventSubscriptionName); + if (inner != null) { + return new SubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName) { + this.serviceClient().delete(resourceGroupName, namespaceName, topicName, eventSubscriptionName); + } + + public void delete( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context) { + this.serviceClient().delete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); + } + + public PagedIterable listByNamespaceTopic( + String resourceGroupName, String namespaceName, String topicName) { + PagedIterable inner = + this.serviceClient().listByNamespaceTopic(resourceGroupName, namespaceName, topicName); + return Utils.mapPage(inner, inner1 -> new SubscriptionImpl(inner1, this.manager())); + } + + public PagedIterable listByNamespaceTopic( + String resourceGroupName, String namespaceName, String topicName, String filter, Integer top, Context context) { + PagedIterable inner = + this + .serviceClient() + .listByNamespaceTopic(resourceGroupName, namespaceName, topicName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new SubscriptionImpl(inner1, this.manager())); + } + + public Subscription getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); + } + String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); + if (eventSubscriptionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); + } + return this + .getWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); + } + String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); + if (eventSubscriptionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); + } + String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); + if (eventSubscriptionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); + } + this.delete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); + } + String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); + if (eventSubscriptionName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); + } + this.delete(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context); + } + + private NamespaceTopicEventSubscriptionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + public SubscriptionImpl define(String name) { + return new SubscriptionImpl(name, this.manager()); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java new file mode 100644 index 000000000000..9979823dc15b --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicImpl.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner; +import com.azure.resourcemanager.eventgrid.models.EventInputSchema; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopic; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopicProvisioningState; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopicUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.PublisherType; +import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; +import com.azure.resourcemanager.eventgrid.models.TopicSharedAccessKeys; + +public final class NamespaceTopicImpl implements NamespaceTopic, NamespaceTopic.Definition, NamespaceTopic.Update { + private NamespaceTopicInner innerObject; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public NamespaceTopicProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PublisherType publisherType() { + return this.innerModel().publisherType(); + } + + public EventInputSchema inputSchema() { + return this.innerModel().inputSchema(); + } + + public Integer eventRetentionInDays() { + return this.innerModel().eventRetentionInDays(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public NamespaceTopicInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String namespaceName; + + private String topicName; + + private NamespaceTopicUpdateParameters updateNamespaceTopicUpdateParameters; + + public NamespaceTopicImpl withExistingNamespace(String resourceGroupName, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + return this; + } + + public NamespaceTopic create() { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopics() + .createOrUpdate(resourceGroupName, namespaceName, topicName, this.innerModel(), Context.NONE); + return this; + } + + public NamespaceTopic create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopics() + .createOrUpdate(resourceGroupName, namespaceName, topicName, this.innerModel(), context); + return this; + } + + NamespaceTopicImpl(String name, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = new NamespaceTopicInner(); + this.serviceManager = serviceManager; + this.topicName = name; + } + + public NamespaceTopicImpl update() { + this.updateNamespaceTopicUpdateParameters = new NamespaceTopicUpdateParameters(); + return this; + } + + public NamespaceTopic apply() { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopics() + .update( + resourceGroupName, namespaceName, topicName, updateNamespaceTopicUpdateParameters, Context.NONE); + return this; + } + + public NamespaceTopic apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopics() + .update(resourceGroupName, namespaceName, topicName, updateNamespaceTopicUpdateParameters, context); + return this; + } + + NamespaceTopicImpl( + NamespaceTopicInner innerObject, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.namespaceName = Utils.getValueFromIdByName(innerObject.id(), "namespaces"); + this.topicName = Utils.getValueFromIdByName(innerObject.id(), "topics"); + } + + public NamespaceTopic refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopics() + .getWithResponse(resourceGroupName, namespaceName, topicName, Context.NONE) + .getValue(); + return this; + } + + public NamespaceTopic refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopics() + .getWithResponse(resourceGroupName, namespaceName, topicName, context) + .getValue(); + return this; + } + + public Response listSharedAccessKeysWithResponse(Context context) { + return serviceManager + .namespaceTopics() + .listSharedAccessKeysWithResponse(resourceGroupName, namespaceName, topicName, context); + } + + public TopicSharedAccessKeys listSharedAccessKeys() { + return serviceManager.namespaceTopics().listSharedAccessKeys(resourceGroupName, namespaceName, topicName); + } + + public TopicSharedAccessKeys regenerateKey(TopicRegenerateKeyRequest regenerateKeyRequest) { + return serviceManager + .namespaceTopics() + .regenerateKey(resourceGroupName, namespaceName, topicName, regenerateKeyRequest); + } + + public TopicSharedAccessKeys regenerateKey(TopicRegenerateKeyRequest regenerateKeyRequest, Context context) { + return serviceManager + .namespaceTopics() + .regenerateKey(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, context); + } + + public NamespaceTopicImpl withPublisherType(PublisherType publisherType) { + this.innerModel().withPublisherType(publisherType); + return this; + } + + public NamespaceTopicImpl withInputSchema(EventInputSchema inputSchema) { + this.innerModel().withInputSchema(inputSchema); + return this; + } + + public NamespaceTopicImpl withEventRetentionInDays(Integer eventRetentionInDays) { + if (isInCreateMode()) { + this.innerModel().withEventRetentionInDays(eventRetentionInDays); + return this; + } else { + this.updateNamespaceTopicUpdateParameters.withEventRetentionInDays(eventRetentionInDays); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsClientImpl.java new file mode 100644 index 000000000000..080f70c33d21 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsClientImpl.java @@ -0,0 +1,2165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner; +import com.azure.resourcemanager.eventgrid.fluent.models.TopicSharedAccessKeysInner; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopicUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopicsListResult; +import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in NamespaceTopicsClient. */ +public final class NamespaceTopicsClientImpl implements NamespaceTopicsClient { + /** The proxy service used to perform REST calls. */ + private final NamespaceTopicsService service; + + /** The service client containing this operation class. */ + private final EventGridManagementClientImpl client; + + /** + * Initializes an instance of NamespaceTopicsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NamespaceTopicsClientImpl(EventGridManagementClientImpl client) { + this.service = + RestProxy.create(NamespaceTopicsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventGridManagementClientNamespaceTopics to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventGridManagementC") + public interface NamespaceTopicsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") NamespaceTopicInner namespaceTopicInfo, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespace( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/listKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSharedAccessKeys( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}/regenerateKey") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> regenerateKey( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicName") String topicName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") TopicRegenerateKeyRequest regenerateKeyRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get a namespace topic. + * + *

Get properties of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @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 properties of a namespace topic along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a namespace topic. + * + *

Get properties of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param context The context to associate with this operation. + * @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 properties of a namespace topic along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get a namespace topic. + * + *

Get properties of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @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 properties of a namespace topic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String namespaceName, String topicName) { + return getWithResponseAsync(resourceGroupName, namespaceName, topicName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a namespace topic. + * + *

Get properties of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param context The context to associate with this operation. + * @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 properties of a namespace topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String namespaceName, String topicName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, topicName, context).block(); + } + + /** + * Get a namespace topic. + * + *

Get properties of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @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 properties of a namespace topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceTopicInner get(String resourceGroupName, String namespaceName, String topicName) { + return getWithResponse(resourceGroupName, namespaceName, topicName, Context.NONE).getValue(); + } + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @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 namespace topic details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (namespaceTopicInfo == null) { + return Mono + .error(new IllegalArgumentException("Parameter namespaceTopicInfo is required and cannot be null.")); + } else { + namespaceTopicInfo.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + namespaceTopicInfo, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @param context The context to associate with this operation. + * @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 namespace topic details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicInner namespaceTopicInfo, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (namespaceTopicInfo == null) { + return Mono + .error(new IllegalArgumentException("Parameter namespaceTopicInfo is required and cannot be null.")); + } else { + namespaceTopicInfo.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + namespaceTopicInfo, + accept, + context); + } + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @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 the {@link PollerFlux} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NamespaceTopicInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, topicName, namespaceTopicInfo); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NamespaceTopicInner.class, + NamespaceTopicInner.class, + this.client.getContext()); + } + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NamespaceTopicInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicInner namespaceTopicInfo, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, topicName, namespaceTopicInfo, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), NamespaceTopicInner.class, NamespaceTopicInner.class, context); + } + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @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 the {@link SyncPoller} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NamespaceTopicInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicInfo) + .getSyncPoller(); + } + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NamespaceTopicInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicInner namespaceTopicInfo, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicInfo, context) + .getSyncPoller(); + } + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @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 namespace topic details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicInfo) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @param context The context to associate with this operation. + * @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 namespace topic details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicInner namespaceTopicInfo, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicInfo, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @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 namespace topic details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceTopicInner createOrUpdate( + String resourceGroupName, String namespaceName, String topicName, NamespaceTopicInner namespaceTopicInfo) { + return createOrUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicInfo).block(); + } + + /** + * Create a namespace topic. + * + *

Asynchronously creates a new namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicInfo Namespace topic information. + * @param context The context to associate with this operation. + * @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 namespace topic details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceTopicInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicInner namespaceTopicInfo, + Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicInfo, context).block(); + } + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param context The context to associate with this operation. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String topicName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName, topicName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String topicName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, topicName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String topicName) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, topicName).getSyncPoller(); + } + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String topicName, Context context) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, topicName, context).getSyncPoller(); + } + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String namespaceName, String topicName) { + return beginDeleteAsync(resourceGroupName, namespaceName, topicName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param context The context to associate with this operation. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String namespaceName, String topicName, Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, topicName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String topicName) { + deleteAsync(resourceGroupName, namespaceName, topicName).block(); + } + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param context The context to associate with this operation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String topicName, Context context) { + deleteAsync(resourceGroupName, namespaceName, topicName, context).block(); + } + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @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 namespace topic details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (namespaceTopicUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter namespaceTopicUpdateParameters is required and cannot be null.")); + } else { + namespaceTopicUpdateParameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + namespaceTopicUpdateParameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @param context The context to associate with this operation. + * @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 namespace topic details along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (namespaceTopicUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter namespaceTopicUpdateParameters is required and cannot be null.")); + } else { + namespaceTopicUpdateParameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + namespaceTopicUpdateParameters, + accept, + context); + } + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @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 the {@link PollerFlux} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NamespaceTopicInner> beginUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NamespaceTopicInner.class, + NamespaceTopicInner.class, + this.client.getContext()); + } + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NamespaceTopicInner> beginUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync( + resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), NamespaceTopicInner.class, NamespaceTopicInner.class, context); + } + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @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 the {@link SyncPoller} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NamespaceTopicInner> beginUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { + return this + .beginUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters) + .getSyncPoller(); + } + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of namespace topic details. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NamespaceTopicInner> beginUpdate( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, + Context context) { + return this + .beginUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @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 namespace topic details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { + return beginUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @param context The context to associate with this operation. + * @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 namespace topic details on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, + Context context) { + return beginUpdateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @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 namespace topic details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceTopicInner update( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters) { + return updateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters).block(); + } + + /** + * Update a namespace topic. + * + *

Asynchronously updates a namespace topic with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param namespaceTopicUpdateParameters Namespace topic update information. + * @param context The context to associate with this operation. + * @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 namespace topic details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceTopicInner update( + String resourceGroupName, + String namespaceName, + String topicName, + NamespaceTopicUpdateParameters namespaceTopicUpdateParameters, + Context context) { + return updateAsync(resourceGroupName, namespaceName, topicName, namespaceTopicUpdateParameters, context) + .block(); + } + + /** + * List namespace topics under a namespace. + * + *

List all the namespace topics under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List namespace topics operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List namespace topics under a namespace. + * + *

List all the namespace topics under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List namespace topics operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List namespace topics under a namespace. + * + *

List all the namespace topics under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List namespace topics operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List namespace topics under a namespace. + * + *

List all the namespace topics under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 result of the List namespace topics operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List namespace topics under a namespace. + * + *

List all the namespace topics under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List namespace topics operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top, context), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); + } + + /** + * List namespace topics under a namespace. + * + *

List all the namespace topics under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 result of the List namespace topics operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top)); + } + + /** + * List namespace topics under a namespace. + * + *

List all the namespace topics under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List namespace topics operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top, context)); + } + + /** + * List keys for a namespace topic. + * + *

List the two keys used to publish to a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 shared access keys of the Topic along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSharedAccessKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listSharedAccessKeys( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List keys for a namespace topic. + * + *

List the two keys used to publish to a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param context The context to associate with this operation. + * @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 shared access keys of the Topic along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSharedAccessKeysWithResponseAsync( + String resourceGroupName, String namespaceName, String topicName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSharedAccessKeys( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * List keys for a namespace topic. + * + *

List the two keys used to publish to a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 shared access keys of the Topic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSharedAccessKeysAsync( + String resourceGroupName, String namespaceName, String topicName) { + return listSharedAccessKeysWithResponseAsync(resourceGroupName, namespaceName, topicName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List keys for a namespace topic. + * + *

List the two keys used to publish to a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param context The context to associate with this operation. + * @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 shared access keys of the Topic along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSharedAccessKeysWithResponse( + String resourceGroupName, String namespaceName, String topicName, Context context) { + return listSharedAccessKeysWithResponseAsync(resourceGroupName, namespaceName, topicName, context).block(); + } + + /** + * List keys for a namespace topic. + * + *

List the two keys used to publish to a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopicSharedAccessKeysInner listSharedAccessKeys( + String resourceGroupName, String namespaceName, String topicName) { + return listSharedAccessKeysWithResponse(resourceGroupName, namespaceName, topicName, Context.NONE).getValue(); + } + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Topic along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> regenerateKeyWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (regenerateKeyRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); + } else { + regenerateKeyRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .regenerateKey( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + regenerateKeyRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. + * @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 shared access keys of the Topic along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> regenerateKeyWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicName is required and cannot be null.")); + } + if (regenerateKeyRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); + } else { + regenerateKeyRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .regenerateKey( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicName, + this.client.getApiVersion(), + regenerateKeyRequest, + accept, + context); + } + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 the {@link PollerFlux} for polling of shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, TopicSharedAccessKeysInner> beginRegenerateKeyAsync( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest) { + Mono>> mono = + regenerateKeyWithResponseAsync(resourceGroupName, namespaceName, topicName, regenerateKeyRequest); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + TopicSharedAccessKeysInner.class, + TopicSharedAccessKeysInner.class, + this.client.getContext()); + } + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, TopicSharedAccessKeysInner> beginRegenerateKeyAsync( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + regenerateKeyWithResponseAsync(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + TopicSharedAccessKeysInner.class, + TopicSharedAccessKeysInner.class, + context); + } + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 the {@link SyncPoller} for polling of shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TopicSharedAccessKeysInner> beginRegenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest) { + return this + .beginRegenerateKeyAsync(resourceGroupName, namespaceName, topicName, regenerateKeyRequest) + .getSyncPoller(); + } + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TopicSharedAccessKeysInner> beginRegenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest, + Context context) { + return this + .beginRegenerateKeyAsync(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, context) + .getSyncPoller(); + } + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Topic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateKeyAsync( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest) { + return beginRegenerateKeyAsync(resourceGroupName, namespaceName, topicName, regenerateKeyRequest) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. + * @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 shared access keys of the Topic on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateKeyAsync( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest, + Context context) { + return beginRegenerateKeyAsync(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopicSharedAccessKeysInner regenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest) { + return regenerateKeyAsync(resourceGroupName, namespaceName, topicName, regenerateKeyRequest).block(); + } + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. + * @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 shared access keys of the Topic. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopicSharedAccessKeysInner regenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest, + Context context) { + return regenerateKeyAsync(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 result of the List namespace topics operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @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 result of the List namespace topics operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java new file mode 100644 index 000000000000..ac038221588f --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespaceTopicsImpl.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventgrid.fluent.NamespaceTopicsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner; +import com.azure.resourcemanager.eventgrid.fluent.models.TopicSharedAccessKeysInner; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopic; +import com.azure.resourcemanager.eventgrid.models.NamespaceTopics; +import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; +import com.azure.resourcemanager.eventgrid.models.TopicSharedAccessKeys; + +public final class NamespaceTopicsImpl implements NamespaceTopics { + private static final ClientLogger LOGGER = new ClientLogger(NamespaceTopicsImpl.class); + + private final NamespaceTopicsClient innerClient; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public NamespaceTopicsImpl( + NamespaceTopicsClient innerClient, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String namespaceName, String topicName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, namespaceName, topicName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NamespaceTopicImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NamespaceTopic get(String resourceGroupName, String namespaceName, String topicName) { + NamespaceTopicInner inner = this.serviceClient().get(resourceGroupName, namespaceName, topicName); + if (inner != null) { + return new NamespaceTopicImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String namespaceName, String topicName) { + this.serviceClient().delete(resourceGroupName, namespaceName, topicName); + } + + public void delete(String resourceGroupName, String namespaceName, String topicName, Context context) { + this.serviceClient().delete(resourceGroupName, namespaceName, topicName, context); + } + + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + PagedIterable inner = + this.serviceClient().listByNamespace(resourceGroupName, namespaceName); + return Utils.mapPage(inner, inner1 -> new NamespaceTopicImpl(inner1, this.manager())); + } + + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().listByNamespace(resourceGroupName, namespaceName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new NamespaceTopicImpl(inner1, this.manager())); + } + + public Response listSharedAccessKeysWithResponse( + String resourceGroupName, String namespaceName, String topicName, Context context) { + Response inner = + this.serviceClient().listSharedAccessKeysWithResponse(resourceGroupName, namespaceName, topicName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TopicSharedAccessKeysImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public TopicSharedAccessKeys listSharedAccessKeys( + String resourceGroupName, String namespaceName, String topicName) { + TopicSharedAccessKeysInner inner = + this.serviceClient().listSharedAccessKeys(resourceGroupName, namespaceName, topicName); + if (inner != null) { + return new TopicSharedAccessKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public TopicSharedAccessKeys regenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest) { + TopicSharedAccessKeysInner inner = + this.serviceClient().regenerateKey(resourceGroupName, namespaceName, topicName, regenerateKeyRequest); + if (inner != null) { + return new TopicSharedAccessKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public TopicSharedAccessKeys regenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest, + Context context) { + TopicSharedAccessKeysInner inner = + this + .serviceClient() + .regenerateKey(resourceGroupName, namespaceName, topicName, regenerateKeyRequest, context); + if (inner != null) { + return new TopicSharedAccessKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public NamespaceTopic getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, topicName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, topicName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); + } + this.delete(resourceGroupName, namespaceName, topicName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicName = Utils.getValueFromIdByName(id, "topics"); + if (topicName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); + } + this.delete(resourceGroupName, namespaceName, topicName, context); + } + + private NamespaceTopicsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + public NamespaceTopicImpl define(String name) { + return new NamespaceTopicImpl(name, this.manager()); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesClientImpl.java new file mode 100644 index 000000000000..68fafb1ab89a --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesClientImpl.java @@ -0,0 +1,2288 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.NamespacesClient; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceSharedAccessKeysInner; +import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; +import com.azure.resourcemanager.eventgrid.models.NamespaceUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.NamespacesListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in NamespacesClient. */ +public final class NamespacesClientImpl implements NamespacesClient { + /** The proxy service used to perform REST calls. */ + private final NamespacesService service; + + /** The service client containing this operation class. */ + private final EventGridManagementClientImpl client; + + /** + * Initializes an instance of NamespacesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NamespacesClientImpl(EventGridManagementClientImpl client) { + this.service = + RestProxy.create(NamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventGridManagementClientNamespaces to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventGridManagementC") + public interface NamespacesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") NamespaceInner namespaceInfo, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") NamespaceUpdateParameters namespaceUpdateParameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/namespaces") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/listKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSharedAccessKeys( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/regenerateKey") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> regenerateKey( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") NamespaceRegenerateKeyRequest regenerateKeyRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get a namespace. + * + *

Get properties of a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 properties of a namespace along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a namespace. + * + *

Get properties of a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param context The context to associate with this operation. + * @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 properties of a namespace along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get a namespace. + * + *

Get properties of a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 properties of a namespace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String namespaceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a namespace. + * + *

Get properties of a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param context The context to associate with this operation. + * @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 properties of a namespace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String namespaceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName, context).block(); + } + + /** + * Get a namespace. + * + *

Get properties of a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 properties of a namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName) { + return getByResourceGroupWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue(); + } + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @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 namespace resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (namespaceInfo == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceInfo is required and cannot be null.")); + } else { + namespaceInfo.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + namespaceInfo, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @param context The context to associate with this operation. + * @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 namespace resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (namespaceInfo == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceInfo is required and cannot be null.")); + } else { + namespaceInfo.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + namespaceInfo, + accept, + context); + } + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @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 the {@link PollerFlux} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NamespaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, namespaceInfo); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NamespaceInner.class, + NamespaceInner.class, + this.client.getContext()); + } + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NamespaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, namespaceInfo, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), NamespaceInner.class, NamespaceInner.class, context); + } + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @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 the {@link SyncPoller} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo) { + return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, namespaceInfo).getSyncPoller(); + } + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NamespaceInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, namespaceInfo, context).getSyncPoller(); + } + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @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 namespace resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, namespaceInfo) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @param context The context to associate with this operation. + * @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 namespace resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, namespaceInfo, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @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 namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo) { + return createOrUpdateAsync(resourceGroupName, namespaceName, namespaceInfo).block(); + } + + /** + * Create or update a namespace. + * + *

Asynchronously creates or updates a new namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceInfo Namespace information. + * @param context The context to associate with this operation. + * @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 namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceInner createOrUpdate( + String resourceGroupName, String namespaceName, NamespaceInner namespaceInfo, Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, namespaceInfo, context).block(); + } + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param context The context to associate with this operation. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String namespaceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName) { + return this.beginDeleteAsync(resourceGroupName, namespaceName).getSyncPoller(); + } + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, Context context) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, context).getSyncPoller(); + } + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String namespaceName) { + return beginDeleteAsync(resourceGroupName, namespaceName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param context The context to associate with this operation. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String namespaceName, Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName) { + deleteAsync(resourceGroupName, namespaceName).block(); + } + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param context The context to associate with this operation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, Context context) { + deleteAsync(resourceGroupName, namespaceName, context).block(); + } + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @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 namespace resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (namespaceUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter namespaceUpdateParameters is required and cannot be null.")); + } else { + namespaceUpdateParameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + namespaceUpdateParameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @param context The context to associate with this operation. + * @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 namespace resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (namespaceUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter namespaceUpdateParameters is required and cannot be null.")); + } else { + namespaceUpdateParameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + namespaceUpdateParameters, + accept, + context); + } + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @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 the {@link PollerFlux} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NamespaceInner> beginUpdateAsync( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, namespaceName, namespaceUpdateParameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NamespaceInner.class, + NamespaceInner.class, + this.client.getContext()); + } + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NamespaceInner> beginUpdateAsync( + String resourceGroupName, + String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, namespaceName, namespaceUpdateParameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), NamespaceInner.class, NamespaceInner.class, context); + } + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @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 the {@link SyncPoller} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NamespaceInner> beginUpdate( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { + return this.beginUpdateAsync(resourceGroupName, namespaceName, namespaceUpdateParameters).getSyncPoller(); + } + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of namespace resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NamespaceInner> beginUpdate( + String resourceGroupName, + String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters, + Context context) { + return this + .beginUpdateAsync(resourceGroupName, namespaceName, namespaceUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @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 namespace resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { + return beginUpdateAsync(resourceGroupName, namespaceName, namespaceUpdateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @param context The context to associate with this operation. + * @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 namespace resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters, + Context context) { + return beginUpdateAsync(resourceGroupName, namespaceName, namespaceUpdateParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @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 namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceInner update( + String resourceGroupName, String namespaceName, NamespaceUpdateParameters namespaceUpdateParameters) { + return updateAsync(resourceGroupName, namespaceName, namespaceUpdateParameters).block(); + } + + /** + * Update a namespace. + * + *

Asynchronously updates a namespace with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param namespaceUpdateParameters Namespace update information. + * @param context The context to associate with this operation. + * @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 namespace resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceInner update( + String resourceGroupName, + String namespaceName, + NamespaceUpdateParameters namespaceUpdateParameters, + Context context) { + return updateAsync(resourceGroupName, namespaceName, namespaceUpdateParameters, context).block(); + } + + /** + * List namespaces under an Azure subscription. + * + *

List all the namespaces under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Namespaces operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List namespaces under an Azure subscription. + * + *

List all the namespaces under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Namespaces operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List namespaces under an Azure subscription. + * + *

List all the namespaces under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Namespaces operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String filter, Integer top) { + return new PagedFlux<>( + () -> listSinglePageAsync(filter, top), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List namespaces under an Azure subscription. + * + *

List all the namespaces under an Azure subscription. + * + * @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 result of the List Namespaces operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listSinglePageAsync(filter, top), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List namespaces under an Azure subscription. + * + *

List all the namespaces under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Namespaces operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(filter, top, context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List namespaces under an Azure subscription. + * + *

List all the namespaces under an Azure subscription. + * + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listAsync(filter, top)); + } + + /** + * List namespaces under an Azure subscription. + * + *

List all the namespaces under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String filter, Integer top, Context context) { + return new PagedIterable<>(listAsync(filter, top, context)); + } + + /** + * List namespaces under a resource group. + * + *

List all the namespaces under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Namespaces operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List namespaces under a resource group. + * + *

List all the namespaces under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Namespaces operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List namespaces under a resource group. + * + *

List all the namespaces under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Namespaces operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, Integer top) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List namespaces under a resource group. + * + *

List all the namespaces under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @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 result of the List Namespaces operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List namespaces under a resource group. + * + *

List all the namespaces under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Namespaces operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List namespaces under a resource group. + * + *

List all the namespaces under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, top)); + } + + /** + * List namespaces under a resource group. + * + *

List all the namespaces under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup( + String resourceGroupName, String filter, Integer top, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, top, context)); + } + + /** + * List keys for a namespace. + * + *

List the two keys used to publish to a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 shared access keys of the Namespace along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSharedAccessKeysWithResponseAsync( + String resourceGroupName, String namespaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listSharedAccessKeys( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List keys for a namespace. + * + *

List the two keys used to publish to a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param context The context to associate with this operation. + * @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 shared access keys of the Namespace along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSharedAccessKeysWithResponseAsync( + String resourceGroupName, String namespaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSharedAccessKeys( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * List keys for a namespace. + * + *

List the two keys used to publish to a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 shared access keys of the Namespace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSharedAccessKeysAsync( + String resourceGroupName, String namespaceName) { + return listSharedAccessKeysWithResponseAsync(resourceGroupName, namespaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List keys for a namespace. + * + *

List the two keys used to publish to a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param context The context to associate with this operation. + * @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 shared access keys of the Namespace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSharedAccessKeysWithResponse( + String resourceGroupName, String namespaceName, Context context) { + return listSharedAccessKeysWithResponseAsync(resourceGroupName, namespaceName, context).block(); + } + + /** + * List keys for a namespace. + * + *

List the two keys used to publish to a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String namespaceName) { + return listSharedAccessKeysWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue(); + } + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Namespace along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> regenerateKeyWithResponseAsync( + String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (regenerateKeyRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); + } else { + regenerateKeyRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .regenerateKey( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + regenerateKeyRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. + * @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 shared access keys of the Namespace along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> regenerateKeyWithResponseAsync( + String resourceGroupName, + String namespaceName, + NamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (regenerateKeyRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter regenerateKeyRequest is required and cannot be null.")); + } else { + regenerateKeyRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .regenerateKey( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + regenerateKeyRequest, + accept, + context); + } + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 the {@link PollerFlux} for polling of shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NamespaceSharedAccessKeysInner> + beginRegenerateKeyAsync( + String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { + Mono>> mono = + regenerateKeyWithResponseAsync(resourceGroupName, namespaceName, regenerateKeyRequest); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NamespaceSharedAccessKeysInner.class, + NamespaceSharedAccessKeysInner.class, + this.client.getContext()); + } + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NamespaceSharedAccessKeysInner> + beginRegenerateKeyAsync( + String resourceGroupName, + String namespaceName, + NamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + regenerateKeyWithResponseAsync(resourceGroupName, namespaceName, regenerateKeyRequest, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NamespaceSharedAccessKeysInner.class, + NamespaceSharedAccessKeysInner.class, + context); + } + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 the {@link SyncPoller} for polling of shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NamespaceSharedAccessKeysInner> beginRegenerateKey( + String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { + return this.beginRegenerateKeyAsync(resourceGroupName, namespaceName, regenerateKeyRequest).getSyncPoller(); + } + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NamespaceSharedAccessKeysInner> beginRegenerateKey( + String resourceGroupName, + String namespaceName, + NamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context) { + return this + .beginRegenerateKeyAsync(resourceGroupName, namespaceName, regenerateKeyRequest, context) + .getSyncPoller(); + } + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Namespace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateKeyAsync( + String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { + return beginRegenerateKeyAsync(resourceGroupName, namespaceName, regenerateKeyRequest) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. + * @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 shared access keys of the Namespace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateKeyAsync( + String resourceGroupName, + String namespaceName, + NamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context) { + return beginRegenerateKeyAsync(resourceGroupName, namespaceName, regenerateKeyRequest, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceSharedAccessKeysInner regenerateKey( + String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { + return regenerateKeyAsync(resourceGroupName, namespaceName, regenerateKeyRequest).block(); + } + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. + * @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 shared access keys of the Namespace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NamespaceSharedAccessKeysInner regenerateKey( + String resourceGroupName, + String namespaceName, + NamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context) { + return regenerateKeyAsync(resourceGroupName, namespaceName, regenerateKeyRequest, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 result of the List Namespaces operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @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 result of the List Namespaces operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 result of the List Namespaces operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @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 result of the List Namespaces operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesImpl.java new file mode 100644 index 000000000000..3a4368baa5b9 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/NamespacesImpl.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventgrid.fluent.NamespacesClient; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceSharedAccessKeysInner; +import com.azure.resourcemanager.eventgrid.models.Namespace; +import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; +import com.azure.resourcemanager.eventgrid.models.NamespaceSharedAccessKeys; +import com.azure.resourcemanager.eventgrid.models.Namespaces; + +public final class NamespacesImpl implements Namespaces { + private static final ClientLogger LOGGER = new ClientLogger(NamespacesImpl.class); + + private final NamespacesClient innerClient; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public NamespacesImpl( + NamespacesClient innerClient, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String namespaceName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, namespaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NamespaceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Namespace getByResourceGroup(String resourceGroupName, String namespaceName) { + NamespaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, namespaceName); + if (inner != null) { + return new NamespaceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String namespaceName) { + this.serviceClient().delete(resourceGroupName, namespaceName); + } + + public void delete(String resourceGroupName, String namespaceName, Context context) { + this.serviceClient().delete(resourceGroupName, namespaceName, context); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new NamespaceImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient().list(filter, top, context); + return Utils.mapPage(inner, inner1 -> new NamespaceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new NamespaceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup( + String resourceGroupName, String filter, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new NamespaceImpl(inner1, this.manager())); + } + + public Response listSharedAccessKeysWithResponse( + String resourceGroupName, String namespaceName, Context context) { + Response inner = + this.serviceClient().listSharedAccessKeysWithResponse(resourceGroupName, namespaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NamespaceSharedAccessKeysImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NamespaceSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String namespaceName) { + NamespaceSharedAccessKeysInner inner = + this.serviceClient().listSharedAccessKeys(resourceGroupName, namespaceName); + if (inner != null) { + return new NamespaceSharedAccessKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public NamespaceSharedAccessKeys regenerateKey( + String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest) { + NamespaceSharedAccessKeysInner inner = + this.serviceClient().regenerateKey(resourceGroupName, namespaceName, regenerateKeyRequest); + if (inner != null) { + return new NamespaceSharedAccessKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public NamespaceSharedAccessKeys regenerateKey( + String resourceGroupName, + String namespaceName, + NamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context) { + NamespaceSharedAccessKeysInner inner = + this.serviceClient().regenerateKey(resourceGroupName, namespaceName, regenerateKeyRequest, context); + if (inner != null) { + return new NamespaceSharedAccessKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public Namespace getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, namespaceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + this.delete(resourceGroupName, namespaceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + this.delete(resourceGroupName, namespaceName, context); + } + + private NamespacesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + public NamespaceImpl define(String name) { + return new NamespaceImpl(name, this.manager()); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java index b68f492c567b..4fe75500c53e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/OperationsClientImpl.java @@ -54,7 +54,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.EventGrid/operations") @ExpectedResponses({200}) @@ -67,7 +67,9 @@ Mono> list( } /** - * List the available operations supported by the Microsoft.EventGrid resource provider. + * List available operations. + * + *

List the available operations supported by the Microsoft.EventGrid resource provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -94,7 +96,9 @@ private Mono> listSinglePageAsync() { } /** - * List the available operations supported by the Microsoft.EventGrid resource provider. + * List available operations. + * + *

List the available operations supported by the Microsoft.EventGrid resource provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,7 +126,9 @@ private Mono> listSinglePageAsync(Context context) } /** - * List the available operations supported by the Microsoft.EventGrid resource provider. + * List available operations. + * + *

List the available operations supported by the Microsoft.EventGrid resource provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -134,7 +140,9 @@ private PagedFlux listAsync() { } /** - * List the available operations supported by the Microsoft.EventGrid resource provider. + * List available operations. + * + *

List the available operations supported by the Microsoft.EventGrid resource provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,7 +156,9 @@ private PagedFlux listAsync(Context context) { } /** - * List the available operations supported by the Microsoft.EventGrid resource provider. + * List available operations. + * + *

List the available operations supported by the Microsoft.EventGrid resource provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -160,7 +170,9 @@ public PagedIterable list() { } /** - * List the available operations supported by the Microsoft.EventGrid resource provider. + * List available operations. + * + *

List the available operations supported by the Microsoft.EventGrid resource provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsClientImpl.java index e4de198e69fd..a1db4efb5354 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsClientImpl.java @@ -68,11 +68,10 @@ public final class PartnerConfigurationsClientImpl implements PartnerConfigurati */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface PartnerConfigurationsService { + public interface PartnerConfigurationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerConfigurations/default") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -85,8 +84,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerConfigurations/default") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -100,8 +98,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerConfigurations/default") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -113,8 +110,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerConfigurations/default") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -128,8 +124,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerConfigurations") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -155,8 +150,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerConfigurations/default/authorizePartner") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default/authorizePartner") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> authorizePartner( @@ -170,8 +164,7 @@ Mono> authorizePartner( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerConfigurations/default/unauthorizePartner") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerConfigurations/default/unauthorizePartner") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> unauthorizePartner( @@ -195,7 +188,9 @@ Mono> listBySubscriptionNext( } /** - * Get properties of a partner configuration. + * Get a partner configuration. + * + *

Get properties of a partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -238,7 +233,9 @@ private Mono> getByResourceGroupWithResponse } /** - * Get properties of a partner configuration. + * Get a partner configuration. + * + *

Get properties of a partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -280,7 +277,9 @@ private Mono> getByResourceGroupWithResponse } /** - * Get properties of a partner configuration. + * Get a partner configuration. + * + *

Get properties of a partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -294,37 +293,43 @@ private Mono getByResourceGroupAsync(String resourceG } /** - * Get properties of a partner configuration. + * Get a partner configuration. + * + *

Get properties of a partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. + * @param context The context to associate with this operation. * @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 properties of a partner configuration. + * @return properties of a partner configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerConfigurationInner getByResourceGroup(String resourceGroupName) { - return getByResourceGroupAsync(resourceGroupName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, context).block(); } /** - * Get properties of a partner configuration. + * Get a partner configuration. + * + *

Get properties of a partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param context The context to associate with this operation. * @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 properties of a partner configuration along with {@link Response}. + * @return properties of a partner configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, context).block(); + public PartnerConfigurationInner getByResourceGroup(String resourceGroupName) { + return getByResourceGroupWithResponse(resourceGroupName, Context.NONE).getValue(); } /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -376,7 +381,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -426,7 +433,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -451,7 +460,9 @@ private PollerFlux, PartnerConfigurationIn } /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -478,7 +489,9 @@ private PollerFlux, PartnerConfigurationIn } /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -490,11 +503,13 @@ private PollerFlux, PartnerConfigurationIn @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerConfigurationInner> beginCreateOrUpdate( String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo) { - return beginCreateOrUpdateAsync(resourceGroupName, partnerConfigurationInfo).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, partnerConfigurationInfo).getSyncPoller(); } /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -507,11 +522,13 @@ public SyncPoller, PartnerConfigurationInn @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerConfigurationInner> beginCreateOrUpdate( String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, partnerConfigurationInfo, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, partnerConfigurationInfo, context).getSyncPoller(); } /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -529,7 +546,9 @@ private Mono createOrUpdateAsync( } /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -548,7 +567,9 @@ private Mono createOrUpdateAsync( } /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -564,7 +585,9 @@ public PartnerConfigurationInner createOrUpdate( } /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -581,7 +604,9 @@ public PartnerConfigurationInner createOrUpdate( } /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -621,7 +646,9 @@ private Mono>> deleteWithResponseAsync(String resource } /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -659,7 +686,9 @@ private Mono>> deleteWithResponseAsync(String resource } /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -677,7 +706,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -696,7 +727,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -706,11 +739,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName) { - return beginDeleteAsync(resourceGroupName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName).getSyncPoller(); } /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -721,11 +756,13 @@ public SyncPoller, Void> beginDelete(String resourceGroupName) */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, Context context) { - return beginDeleteAsync(resourceGroupName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, context).getSyncPoller(); } /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -739,7 +776,9 @@ private Mono deleteAsync(String resourceGroupName) { } /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -754,7 +793,9 @@ private Mono deleteAsync(String resourceGroupName, Context context) { } /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -767,7 +808,9 @@ public void delete(String resourceGroupName) { } /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -781,7 +824,9 @@ public void delete(String resourceGroupName, Context context) { } /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -834,7 +879,9 @@ private Mono>> updateWithResponseAsync( } /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -887,7 +934,9 @@ private Mono>> updateWithResponseAsync( } /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -912,7 +961,9 @@ private PollerFlux, PartnerConfigurationIn } /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -941,7 +992,9 @@ private PollerFlux, PartnerConfigurationIn } /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -953,11 +1006,13 @@ private PollerFlux, PartnerConfigurationIn @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerConfigurationInner> beginUpdate( String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters) { - return beginUpdateAsync(resourceGroupName, partnerConfigurationUpdateParameters).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, partnerConfigurationUpdateParameters).getSyncPoller(); } /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -972,11 +1027,13 @@ public SyncPoller, PartnerConfigurationInn String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, partnerConfigurationUpdateParameters, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, partnerConfigurationUpdateParameters, context).getSyncPoller(); } /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -994,7 +1051,9 @@ private Mono updateAsync( } /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -1015,7 +1074,9 @@ private Mono updateAsync( } /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -1031,7 +1092,9 @@ public PartnerConfigurationInner update( } /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -1050,7 +1113,9 @@ public PartnerConfigurationInner update( } /** - * List all the partner configurations under a resource group. + * List partner configurations under a resource group. + * + *

List all the partner configurations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1098,7 +1163,9 @@ private Mono> listByResourceGroupSingle } /** - * List all the partner configurations under a resource group. + * List partner configurations under a resource group. + * + *

List all the partner configurations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -1144,7 +1211,9 @@ private Mono> listByResourceGroupSingle } /** - * List all the partner configurations under a resource group. + * List partner configurations under a resource group. + * + *

List all the partner configurations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1158,7 +1227,9 @@ private PagedFlux listByResourceGroupAsync(String res } /** - * List all the partner configurations under a resource group. + * List partner configurations under a resource group. + * + *

List all the partner configurations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -1173,7 +1244,9 @@ private PagedFlux listByResourceGroupAsync(String res } /** - * List all the partner configurations under a resource group. + * List partner configurations under a resource group. + * + *

List all the partner configurations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1187,7 +1260,9 @@ public PagedIterable listByResourceGroup(String resou } /** - * List all the partner configurations under a resource group. + * List partner configurations under a resource group. + * + *

List all the partner configurations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -1202,7 +1277,9 @@ public PagedIterable listByResourceGroup(String resou } /** - * List all the partner configurations under an Azure subscription. + * List partner configurations under an Azure subscription. + * + *

List all the partner configurations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1258,7 +1335,9 @@ private Mono> listSinglePageAsync(Strin } /** - * List all the partner configurations under an Azure subscription. + * List partner configurations under an Azure subscription. + * + *

List all the partner configurations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1313,7 +1392,9 @@ private Mono> listSinglePageAsync( } /** - * List all the partner configurations under an Azure subscription. + * List partner configurations under an Azure subscription. + * + *

List all the partner configurations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1335,7 +1416,9 @@ private PagedFlux listAsync(String filter, Integer to } /** - * List all the partner configurations under an Azure subscription. + * List partner configurations under an Azure subscription. + * + *

List all the partner configurations under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1350,7 +1433,9 @@ private PagedFlux listAsync() { } /** - * List all the partner configurations under an Azure subscription. + * List partner configurations under an Azure subscription. + * + *

List all the partner configurations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1374,7 +1459,9 @@ private PagedFlux listAsync(String filter, Integer to } /** - * List all the partner configurations under an Azure subscription. + * List partner configurations under an Azure subscription. + * + *

List all the partner configurations under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1388,7 +1475,9 @@ public PagedIterable list() { } /** - * List all the partner configurations under an Azure subscription. + * List partner configurations under an Azure subscription. + * + *

List all the partner configurations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1410,7 +1499,9 @@ public PagedIterable list(String filter, Integer top, } /** - * Authorize a single partner either by partner registration immutable Id or by partner name. + * Authorize a partner. + * + *

Authorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be authorized. @@ -1460,7 +1551,9 @@ private Mono> authorizePartnerWithResponseAs } /** - * Authorize a single partner either by partner registration immutable Id or by partner name. + * Authorize a partner. + * + *

Authorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be authorized. @@ -1508,7 +1601,9 @@ private Mono> authorizePartnerWithResponseAs } /** - * Authorize a single partner either by partner registration immutable Id or by partner name. + * Authorize a partner. + * + *

Authorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be authorized. @@ -1524,39 +1619,45 @@ private Mono authorizePartnerAsync(String resourceGro } /** - * Authorize a single partner either by partner registration immutable Id or by partner name. + * Authorize a partner. + * + *

Authorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be authorized. + * @param context The context to associate with this operation. * @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 partner configuration information. + * @return partner configuration information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerConfigurationInner authorizePartner(String resourceGroupName, Partner partnerInfo) { - return authorizePartnerAsync(resourceGroupName, partnerInfo).block(); + public Response authorizePartnerWithResponse( + String resourceGroupName, Partner partnerInfo, Context context) { + return authorizePartnerWithResponseAsync(resourceGroupName, partnerInfo, context).block(); } /** - * Authorize a single partner either by partner registration immutable Id or by partner name. + * Authorize a partner. + * + *

Authorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be authorized. - * @param context The context to associate with this operation. * @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 partner configuration information along with {@link Response}. + * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response authorizePartnerWithResponse( - String resourceGroupName, Partner partnerInfo, Context context) { - return authorizePartnerWithResponseAsync(resourceGroupName, partnerInfo, context).block(); + public PartnerConfigurationInner authorizePartner(String resourceGroupName, Partner partnerInfo) { + return authorizePartnerWithResponse(resourceGroupName, partnerInfo, Context.NONE).getValue(); } /** - * Unauthorize a single partner either by partner registration immutable Id or by partner name. + * Unauthorize a partner. + * + *

Unauthorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be unauthorized. @@ -1606,7 +1707,9 @@ private Mono> unauthorizePartnerWithResponse } /** - * Unauthorize a single partner either by partner registration immutable Id or by partner name. + * Unauthorize a partner. + * + *

Unauthorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be unauthorized. @@ -1654,7 +1757,9 @@ private Mono> unauthorizePartnerWithResponse } /** - * Unauthorize a single partner either by partner registration immutable Id or by partner name. + * Unauthorize a partner. + * + *

Unauthorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be unauthorized. @@ -1670,41 +1775,46 @@ private Mono unauthorizePartnerAsync(String resourceG } /** - * Unauthorize a single partner either by partner registration immutable Id or by partner name. + * Unauthorize a partner. + * + *

Unauthorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be unauthorized. + * @param context The context to associate with this operation. * @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 partner configuration information. + * @return partner configuration information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerConfigurationInner unauthorizePartner(String resourceGroupName, Partner partnerInfo) { - return unauthorizePartnerAsync(resourceGroupName, partnerInfo).block(); + public Response unauthorizePartnerWithResponse( + String resourceGroupName, Partner partnerInfo, Context context) { + return unauthorizePartnerWithResponseAsync(resourceGroupName, partnerInfo, context).block(); } /** - * Unauthorize a single partner either by partner registration immutable Id or by partner name. + * Unauthorize a partner. + * + *

Unauthorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be unauthorized. - * @param context The context to associate with this operation. * @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 partner configuration information along with {@link Response}. + * @return partner configuration information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response unauthorizePartnerWithResponse( - String resourceGroupName, Partner partnerInfo, Context context) { - return unauthorizePartnerWithResponseAsync(resourceGroupName, partnerInfo, context).block(); + public PartnerConfigurationInner unauthorizePartner(String resourceGroupName, Partner partnerInfo) { + return unauthorizePartnerWithResponse(resourceGroupName, partnerInfo, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1741,7 +1851,8 @@ private Mono> listBySubscriptionNextSin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsImpl.java index c07b91121b0c..9b6198315b8c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerConfigurationsImpl.java @@ -29,15 +29,6 @@ public PartnerConfigurationsImpl( this.serviceManager = serviceManager; } - public PartnerConfiguration getByResourceGroup(String resourceGroupName) { - PartnerConfigurationInner inner = this.serviceClient().getByResourceGroup(resourceGroupName); - if (inner != null) { - return new PartnerConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse(String resourceGroupName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, context); @@ -52,6 +43,15 @@ public Response getByResourceGroupWithResponse(String reso } } + public PartnerConfiguration getByResourceGroup(String resourceGroupName) { + PartnerConfigurationInner inner = this.serviceClient().getByResourceGroup(resourceGroupName); + if (inner != null) { + return new PartnerConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + public PartnerConfiguration createOrUpdate( String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo) { PartnerConfigurationInner inner = @@ -127,15 +127,6 @@ public PagedIterable list(String filter, Integer top, Cont return Utils.mapPage(inner, inner1 -> new PartnerConfigurationImpl(inner1, this.manager())); } - public PartnerConfiguration authorizePartner(String resourceGroupName, Partner partnerInfo) { - PartnerConfigurationInner inner = this.serviceClient().authorizePartner(resourceGroupName, partnerInfo); - if (inner != null) { - return new PartnerConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response authorizePartnerWithResponse( String resourceGroupName, Partner partnerInfo, Context context) { Response inner = @@ -151,8 +142,8 @@ public Response authorizePartnerWithResponse( } } - public PartnerConfiguration unauthorizePartner(String resourceGroupName, Partner partnerInfo) { - PartnerConfigurationInner inner = this.serviceClient().unauthorizePartner(resourceGroupName, partnerInfo); + public PartnerConfiguration authorizePartner(String resourceGroupName, Partner partnerInfo) { + PartnerConfigurationInner inner = this.serviceClient().authorizePartner(resourceGroupName, partnerInfo); if (inner != null) { return new PartnerConfigurationImpl(inner, this.manager()); } else { @@ -175,6 +166,15 @@ public Response unauthorizePartnerWithResponse( } } + public PartnerConfiguration unauthorizePartner(String resourceGroupName, Partner partnerInfo) { + PartnerConfigurationInner inner = this.serviceClient().unauthorizePartner(resourceGroupName, partnerInfo); + if (inner != null) { + return new PartnerConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + private PartnerConfigurationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java new file mode 100644 index 000000000000..04b853e01013 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationImpl.java @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; +import com.azure.resourcemanager.eventgrid.models.PartnerDestination; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationActivationState; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationProvisioningState; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationUpdateParameters; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; +import java.util.UUID; + +public final class PartnerDestinationImpl + implements PartnerDestination, PartnerDestination.Definition, PartnerDestination.Update { + private PartnerDestinationInner innerObject; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public UUID partnerRegistrationImmutableId() { + return this.innerModel().partnerRegistrationImmutableId(); + } + + public String endpointServiceContext() { + return this.innerModel().endpointServiceContext(); + } + + public OffsetDateTime expirationTimeIfNotActivatedUtc() { + return this.innerModel().expirationTimeIfNotActivatedUtc(); + } + + public PartnerDestinationProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PartnerDestinationActivationState activationState() { + return this.innerModel().activationState(); + } + + public String endpointBaseUrl() { + return this.innerModel().endpointBaseUrl(); + } + + public String messageForActivation() { + return this.innerModel().messageForActivation(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PartnerDestinationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String partnerDestinationName; + + private PartnerDestinationUpdateParameters updatePartnerDestinationUpdateParameters; + + public PartnerDestinationImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public PartnerDestination create() { + this.innerObject = + serviceManager + .serviceClient() + .getPartnerDestinations() + .createOrUpdate(resourceGroupName, partnerDestinationName, this.innerModel(), Context.NONE); + return this; + } + + public PartnerDestination create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPartnerDestinations() + .createOrUpdate(resourceGroupName, partnerDestinationName, this.innerModel(), context); + return this; + } + + PartnerDestinationImpl(String name, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = new PartnerDestinationInner(); + this.serviceManager = serviceManager; + this.partnerDestinationName = name; + } + + public PartnerDestinationImpl update() { + this.updatePartnerDestinationUpdateParameters = new PartnerDestinationUpdateParameters(); + return this; + } + + public PartnerDestination apply() { + this.innerObject = + serviceManager + .serviceClient() + .getPartnerDestinations() + .update( + resourceGroupName, partnerDestinationName, updatePartnerDestinationUpdateParameters, Context.NONE); + return this; + } + + public PartnerDestination apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPartnerDestinations() + .update(resourceGroupName, partnerDestinationName, updatePartnerDestinationUpdateParameters, context); + return this; + } + + PartnerDestinationImpl( + PartnerDestinationInner innerObject, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.partnerDestinationName = Utils.getValueFromIdByName(innerObject.id(), "partnerDestinations"); + } + + public PartnerDestination refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getPartnerDestinations() + .getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, Context.NONE) + .getValue(); + return this; + } + + public PartnerDestination refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPartnerDestinations() + .getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, context) + .getValue(); + return this; + } + + public Response activateWithResponse(Context context) { + return serviceManager + .partnerDestinations() + .activateWithResponse(resourceGroupName, partnerDestinationName, context); + } + + public PartnerDestination activate() { + return serviceManager.partnerDestinations().activate(resourceGroupName, partnerDestinationName); + } + + public PartnerDestinationImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public PartnerDestinationImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public PartnerDestinationImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updatePartnerDestinationUpdateParameters.withTags(tags); + return this; + } + } + + public PartnerDestinationImpl withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId) { + this.innerModel().withPartnerRegistrationImmutableId(partnerRegistrationImmutableId); + return this; + } + + public PartnerDestinationImpl withEndpointServiceContext(String endpointServiceContext) { + this.innerModel().withEndpointServiceContext(endpointServiceContext); + return this; + } + + public PartnerDestinationImpl withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc) { + this.innerModel().withExpirationTimeIfNotActivatedUtc(expirationTimeIfNotActivatedUtc); + return this; + } + + public PartnerDestinationImpl withActivationState(PartnerDestinationActivationState activationState) { + this.innerModel().withActivationState(activationState); + return this; + } + + public PartnerDestinationImpl withEndpointBaseUrl(String endpointBaseUrl) { + this.innerModel().withEndpointBaseUrl(endpointBaseUrl); + return this; + } + + public PartnerDestinationImpl withMessageForActivation(String messageForActivation) { + this.innerModel().withMessageForActivation(messageForActivation); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsClientImpl.java new file mode 100644 index 000000000000..efa768825548 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsClientImpl.java @@ -0,0 +1,2030 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationUpdateParameters; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinationsListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PartnerDestinationsClient. */ +public final class PartnerDestinationsClientImpl implements PartnerDestinationsClient { + /** The proxy service used to perform REST calls. */ + private final PartnerDestinationsService service; + + /** The service client containing this operation class. */ + private final EventGridManagementClientImpl client; + + /** + * Initializes an instance of PartnerDestinationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PartnerDestinationsClientImpl(EventGridManagementClientImpl client) { + this.service = + RestProxy.create(PartnerDestinationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventGridManagementClientPartnerDestinations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventGridManagementC") + public interface PartnerDestinationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("partnerDestinationName") String partnerDestinationName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("partnerDestinationName") String partnerDestinationName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PartnerDestinationInner partnerDestination, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("partnerDestinationName") String partnerDestinationName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("partnerDestinationName") String partnerDestinationName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}/activate") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> activate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("partnerDestinationName") String partnerDestinationName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get a partner destination. + * + *

Get properties of a partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 properties of a partner destination along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String partnerDestinationName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (partnerDestinationName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + partnerDestinationName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a partner destination. + * + *

Get properties of a partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param context The context to associate with this operation. + * @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 properties of a partner destination along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String partnerDestinationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (partnerDestinationName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + partnerDestinationName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get a partner destination. + * + *

Get properties of a partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 properties of a partner destination on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync( + String resourceGroupName, String partnerDestinationName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, partnerDestinationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a partner destination. + * + *

Get properties of a partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param context The context to associate with this operation. + * @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 properties of a partner destination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerDestinationName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, partnerDestinationName, context).block(); + } + + /** + * Get a partner destination. + * + *

Get properties of a partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 properties of a partner destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PartnerDestinationInner getByResourceGroup(String resourceGroupName, String partnerDestinationName) { + return getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, Context.NONE).getValue(); + } + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @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 event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (partnerDestinationName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); + } + if (partnerDestination == null) { + return Mono + .error(new IllegalArgumentException("Parameter partnerDestination is required and cannot be null.")); + } else { + partnerDestination.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + partnerDestinationName, + this.client.getApiVersion(), + partnerDestination, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @param context The context to associate with this operation. + * @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 event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationInner partnerDestination, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (partnerDestinationName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); + } + if (partnerDestination == null) { + return Mono + .error(new IllegalArgumentException("Parameter partnerDestination is required and cannot be null.")); + } else { + partnerDestination.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + partnerDestinationName, + this.client.getApiVersion(), + partnerDestination, + accept, + context); + } + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @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 the {@link PollerFlux} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PartnerDestinationInner> beginCreateOrUpdateAsync( + String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, partnerDestinationName, partnerDestination); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PartnerDestinationInner.class, + PartnerDestinationInner.class, + this.client.getContext()); + } + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PartnerDestinationInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationInner partnerDestination, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, partnerDestinationName, partnerDestination, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PartnerDestinationInner.class, + PartnerDestinationInner.class, + context); + } + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @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 the {@link SyncPoller} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PartnerDestinationInner> beginCreateOrUpdate( + String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination) + .getSyncPoller(); + } + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PartnerDestinationInner> beginCreateOrUpdate( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationInner partnerDestination, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination, context) + .getSyncPoller(); + } + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @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 event Grid Partner Destination on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { + return beginCreateOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @param context The context to associate with this operation. + * @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 event Grid Partner Destination on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationInner partnerDestination, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @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 event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PartnerDestinationInner createOrUpdate( + String resourceGroupName, String partnerDestinationName, PartnerDestinationInner partnerDestination) { + return createOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination).block(); + } + + /** + * Create a partner destination. + * + *

Asynchronously creates a new partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestination Partner destination create information. + * @param context The context to associate with this operation. + * @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 event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PartnerDestinationInner createOrUpdate( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationInner partnerDestination, + Context context) { + return createOrUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestination, context).block(); + } + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String partnerDestinationName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (partnerDestinationName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + partnerDestinationName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param context The context to associate with this operation. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String partnerDestinationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (partnerDestinationName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + partnerDestinationName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String partnerDestinationName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, partnerDestinationName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String partnerDestinationName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, partnerDestinationName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerDestinationName) { + return this.beginDeleteAsync(resourceGroupName, partnerDestinationName).getSyncPoller(); + } + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String partnerDestinationName, Context context) { + return this.beginDeleteAsync(resourceGroupName, partnerDestinationName, context).getSyncPoller(); + } + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String partnerDestinationName) { + return beginDeleteAsync(resourceGroupName, partnerDestinationName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param context The context to associate with this operation. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String partnerDestinationName, Context context) { + return beginDeleteAsync(resourceGroupName, partnerDestinationName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String partnerDestinationName) { + deleteAsync(resourceGroupName, partnerDestinationName).block(); + } + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param context The context to associate with this operation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String partnerDestinationName, Context context) { + deleteAsync(resourceGroupName, partnerDestinationName, context).block(); + } + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @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 event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (partnerDestinationName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); + } + if (partnerDestinationUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter partnerDestinationUpdateParameters is required and cannot be null.")); + } else { + partnerDestinationUpdateParameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + partnerDestinationName, + this.client.getApiVersion(), + partnerDestinationUpdateParameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @param context The context to associate with this operation. + * @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 event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (partnerDestinationName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); + } + if (partnerDestinationUpdateParameters == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter partnerDestinationUpdateParameters is required and cannot be null.")); + } else { + partnerDestinationUpdateParameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + partnerDestinationName, + this.client.getApiVersion(), + partnerDestinationUpdateParameters, + accept, + context); + } + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @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 the {@link PollerFlux} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PartnerDestinationInner> beginUpdateAsync( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PartnerDestinationInner.class, + PartnerDestinationInner.class, + this.client.getContext()); + } + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PartnerDestinationInner> beginUpdateAsync( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync( + resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PartnerDestinationInner.class, + PartnerDestinationInner.class, + context); + } + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @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 the {@link SyncPoller} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PartnerDestinationInner> beginUpdate( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { + return this + .beginUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters) + .getSyncPoller(); + } + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PartnerDestinationInner> beginUpdate( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, + Context context) { + return this + .beginUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, context) + .getSyncPoller(); + } + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @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 event Grid Partner Destination on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { + return beginUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @param context The context to associate with this operation. + * @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 event Grid Partner Destination on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, + Context context) { + return beginUpdateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @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 event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PartnerDestinationInner update( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters) { + return updateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters).block(); + } + + /** + * Update a partner destination. + * + *

Asynchronously updates a partner destination with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param partnerDestinationUpdateParameters Partner destination update information. + * @param context The context to associate with this operation. + * @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 event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PartnerDestinationInner update( + String resourceGroupName, + String partnerDestinationName, + PartnerDestinationUpdateParameters partnerDestinationUpdateParameters, + Context context) { + return updateAsync(resourceGroupName, partnerDestinationName, partnerDestinationUpdateParameters, context) + .block(); + } + + /** + * List partner destinations under an Azure subscription. + * + *

List all the partner destinations under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Partner Destinations operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List partner destinations under an Azure subscription. + * + *

List all the partner destinations under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Partner Destinations operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List partner destinations under an Azure subscription. + * + *

List all the partner destinations under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String filter, Integer top) { + return new PagedFlux<>( + () -> listSinglePageAsync(filter, top), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List partner destinations under an Azure subscription. + * + *

List all the partner destinations under an Azure subscription. + * + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listSinglePageAsync(filter, top), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List partner destinations under an Azure subscription. + * + *

List all the partner destinations under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(filter, top, context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List partner destinations under an Azure subscription. + * + *

List all the partner destinations under an Azure subscription. + * + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listAsync(filter, top)); + } + + /** + * List partner destinations under an Azure subscription. + * + *

List all the partner destinations under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String filter, Integer top, Context context) { + return new PagedIterable<>(listAsync(filter, top, context)); + } + + /** + * List partner destinations under a resource group. + * + *

List all the partner destinations under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Partner Destinations operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List partner destinations under a resource group. + * + *

List all the partner destinations under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Partner Destinations operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List partner destinations under a resource group. + * + *

List all the partner destinations under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, String filter, Integer top) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List partner destinations under a resource group. + * + *

List all the partner destinations under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List partner destinations under a resource group. + * + *

List all the partner destinations under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, top, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List partner destinations under a resource group. + * + *

List all the partner destinations under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, top)); + } + + /** + * List partner destinations under a resource group. + * + *

List all the partner destinations under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup( + String resourceGroupName, String filter, Integer top, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, top, context)); + } + + /** + * Activate a partner destination. + * + *

Activate a newly created partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> activateWithResponseAsync( + String resourceGroupName, String partnerDestinationName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (partnerDestinationName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .activate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + partnerDestinationName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Activate a partner destination. + * + *

Activate a newly created partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param context The context to associate with this operation. + * @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 event Grid Partner Destination along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> activateWithResponseAsync( + String resourceGroupName, String partnerDestinationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (partnerDestinationName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter partnerDestinationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .activate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + partnerDestinationName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Activate a partner destination. + * + *

Activate a newly created partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 event Grid Partner Destination on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono activateAsync(String resourceGroupName, String partnerDestinationName) { + return activateWithResponseAsync(resourceGroupName, partnerDestinationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Activate a partner destination. + * + *

Activate a newly created partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @param context The context to associate with this operation. + * @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 event Grid Partner Destination along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response activateWithResponse( + String resourceGroupName, String partnerDestinationName, Context context) { + return activateWithResponseAsync(resourceGroupName, partnerDestinationName, context).block(); + } + + /** + * Activate a partner destination. + * + *

Activate a newly created partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 event Grid Partner Destination. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PartnerDestinationInner activate(String resourceGroupName, String partnerDestinationName) { + return activateWithResponse(resourceGroupName, partnerDestinationName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 result of the List Partner Destinations operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @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 result of the List Partner Destinations operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 result of the List Partner Destinations operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @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 result of the List Partner Destinations operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java new file mode 100644 index 000000000000..2a9e8705128a --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerDestinationsImpl.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventgrid.fluent.PartnerDestinationsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; +import com.azure.resourcemanager.eventgrid.models.PartnerDestination; +import com.azure.resourcemanager.eventgrid.models.PartnerDestinations; + +public final class PartnerDestinationsImpl implements PartnerDestinations { + private static final ClientLogger LOGGER = new ClientLogger(PartnerDestinationsImpl.class); + + private final PartnerDestinationsClient innerClient; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public PartnerDestinationsImpl( + PartnerDestinationsClient innerClient, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerDestinationName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PartnerDestinationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PartnerDestination getByResourceGroup(String resourceGroupName, String partnerDestinationName) { + PartnerDestinationInner inner = + this.serviceClient().getByResourceGroup(resourceGroupName, partnerDestinationName); + if (inner != null) { + return new PartnerDestinationImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String partnerDestinationName) { + this.serviceClient().delete(resourceGroupName, partnerDestinationName); + } + + public void delete(String resourceGroupName, String partnerDestinationName, Context context) { + this.serviceClient().delete(resourceGroupName, partnerDestinationName, context); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Integer top, Context context) { + PagedIterable inner = this.serviceClient().list(filter, top, context); + return Utils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup( + String resourceGroupName, String filter, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new PartnerDestinationImpl(inner1, this.manager())); + } + + public Response activateWithResponse( + String resourceGroupName, String partnerDestinationName, Context context) { + Response inner = + this.serviceClient().activateWithResponse(resourceGroupName, partnerDestinationName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PartnerDestinationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PartnerDestination activate(String resourceGroupName, String partnerDestinationName) { + PartnerDestinationInner inner = this.serviceClient().activate(resourceGroupName, partnerDestinationName); + if (inner != null) { + return new PartnerDestinationImpl(inner, this.manager()); + } else { + return null; + } + } + + public PartnerDestination getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String partnerDestinationName = Utils.getValueFromIdByName(id, "partnerDestinations"); + if (partnerDestinationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String partnerDestinationName = Utils.getValueFromIdByName(id, "partnerDestinations"); + if (partnerDestinationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, partnerDestinationName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String partnerDestinationName = Utils.getValueFromIdByName(id, "partnerDestinations"); + if (partnerDestinationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); + } + this.delete(resourceGroupName, partnerDestinationName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String partnerDestinationName = Utils.getValueFromIdByName(id, "partnerDestinations"); + if (partnerDestinationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'partnerDestinations'.", id))); + } + this.delete(resourceGroupName, partnerDestinationName, context); + } + + private PartnerDestinationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + public PartnerDestinationImpl define(String name) { + return new PartnerDestinationImpl(name, this.manager()); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java index f5e17fcfa3dd..606a1c1b21bd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespaceImpl.java @@ -19,6 +19,7 @@ import com.azure.resourcemanager.eventgrid.models.PartnerTopicRoutingMode; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnection; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import java.util.Collections; import java.util.List; import java.util.Map; @@ -81,6 +82,10 @@ public String partnerRegistrationFullyQualifiedId() { return this.innerModel().partnerRegistrationFullyQualifiedId(); } + public TlsVersion minimumTlsVersionAllowed() { + return this.innerModel().minimumTlsVersionAllowed(); + } + public String endpoint() { return this.innerModel().endpoint(); } @@ -212,20 +217,14 @@ public PartnerNamespace refresh(Context context) { return this; } - public PartnerNamespaceSharedAccessKeys listSharedAccessKeys() { - return serviceManager.partnerNamespaces().listSharedAccessKeys(resourceGroupName, partnerNamespaceName); - } - public Response listSharedAccessKeysWithResponse(Context context) { return serviceManager .partnerNamespaces() .listSharedAccessKeysWithResponse(resourceGroupName, partnerNamespaceName, context); } - public PartnerNamespaceSharedAccessKeys regenerateKey(PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest) { - return serviceManager - .partnerNamespaces() - .regenerateKey(resourceGroupName, partnerNamespaceName, regenerateKeyRequest); + public PartnerNamespaceSharedAccessKeys listSharedAccessKeys() { + return serviceManager.partnerNamespaces().listSharedAccessKeys(resourceGroupName, partnerNamespaceName); } public Response regenerateKeyWithResponse( @@ -235,6 +234,12 @@ public Response regenerateKeyWithResponse( .regenerateKeyWithResponse(resourceGroupName, partnerNamespaceName, regenerateKeyRequest, context); } + public PartnerNamespaceSharedAccessKeys regenerateKey(PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest) { + return serviceManager + .partnerNamespaces() + .regenerateKey(resourceGroupName, partnerNamespaceName, regenerateKeyRequest); + } + public PartnerNamespaceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -260,6 +265,16 @@ public PartnerNamespaceImpl withPartnerRegistrationFullyQualifiedId(String partn return this; } + public PartnerNamespaceImpl withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + if (isInCreateMode()) { + this.innerModel().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } else { + this.updatePartnerNamespaceUpdateParameters.withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + } + public PartnerNamespaceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { if (isInCreateMode()) { this.innerModel().withPublicNetworkAccess(publicNetworkAccess); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesClientImpl.java index 721536961de8..8f2559f43841 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesClientImpl.java @@ -68,11 +68,10 @@ public final class PartnerNamespacesClientImpl implements PartnerNamespacesClien */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface PartnerNamespacesService { + public interface PartnerNamespacesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -86,8 +85,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -102,8 +100,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -116,8 +113,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -145,8 +141,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -161,8 +156,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}/listKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/listKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSharedAccessKeys( @@ -176,8 +170,7 @@ Mono> listSharedAccessKeys( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerNamespaces/{partnerNamespaceName}/regenerateKey") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/regenerateKey") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> regenerateKey( @@ -212,7 +205,9 @@ Mono> listByResourceGroupNext( } /** - * Get properties of a partner namespace. + * Get a partner namespace. + * + *

Get properties of a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -261,7 +256,9 @@ private Mono> getByResourceGroupWithResponseAsyn } /** - * Get properties of a partner namespace. + * Get a partner namespace. + * + *

Get properties of a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -308,7 +305,9 @@ private Mono> getByResourceGroupWithResponseAsyn } /** - * Get properties of a partner namespace. + * Get a partner namespace. + * + *

Get properties of a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -324,39 +323,45 @@ private Mono getByResourceGroupAsync(String resourceGroup } /** - * Get properties of a partner namespace. + * Get a partner namespace. + * + *

Get properties of a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. + * @param context The context to associate with this operation. * @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 properties of a partner namespace. + * @return properties of a partner namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerNamespaceInner getByResourceGroup(String resourceGroupName, String partnerNamespaceName) { - return getByResourceGroupAsync(resourceGroupName, partnerNamespaceName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerNamespaceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, partnerNamespaceName, context).block(); } /** - * Get properties of a partner namespace. + * Get a partner namespace. + * + *

Get properties of a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. - * @param context The context to associate with this operation. * @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 properties of a partner namespace along with {@link Response}. + * @return properties of a partner namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String partnerNamespaceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, partnerNamespaceName, context).block(); + public PartnerNamespaceInner getByResourceGroup(String resourceGroupName, String partnerNamespaceName) { + return getByResourceGroupWithResponse(resourceGroupName, partnerNamespaceName, Context.NONE).getValue(); } /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -413,7 +418,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -471,7 +478,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -497,7 +506,9 @@ private PollerFlux, PartnerNamespaceInner> beg } /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -524,7 +535,9 @@ private PollerFlux, PartnerNamespaceInner> beg } /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -537,11 +550,15 @@ private PollerFlux, PartnerNamespaceInner> beg @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerNamespaceInner> beginCreateOrUpdate( String resourceGroupName, String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo) { - return beginCreateOrUpdateAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceInfo).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceInfo) + .getSyncPoller(); } /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -558,12 +575,15 @@ public SyncPoller, PartnerNamespaceInner> begi String partnerNamespaceName, PartnerNamespaceInner partnerNamespaceInfo, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceInfo, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceInfo, context) .getSyncPoller(); } /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -582,7 +602,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -605,7 +627,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -622,7 +646,9 @@ public PartnerNamespaceInner createOrUpdate( } /** - * Asynchronously creates a new partner namespace with the specified parameters. + * Create a partner namespace. + * + *

Asynchronously creates a new partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -643,7 +669,9 @@ public PartnerNamespaceInner createOrUpdate( } /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -690,7 +718,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -735,7 +765,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -754,7 +786,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -776,7 +810,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -787,11 +823,13 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerNamespaceName) { - return beginDeleteAsync(resourceGroupName, partnerNamespaceName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, partnerNamespaceName).getSyncPoller(); } /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -804,11 +842,13 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String partnerNamespaceName, Context context) { - return beginDeleteAsync(resourceGroupName, partnerNamespaceName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, partnerNamespaceName, context).getSyncPoller(); } /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -825,7 +865,9 @@ private Mono deleteAsync(String resourceGroupName, String partnerNamespace } /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -843,7 +885,9 @@ private Mono deleteAsync(String resourceGroupName, String partnerNamespace } /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -857,7 +901,9 @@ public void delete(String resourceGroupName, String partnerNamespaceName) { } /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -872,7 +918,9 @@ public void delete(String resourceGroupName, String partnerNamespaceName, Contex } /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -933,7 +981,9 @@ private Mono>> updateWithResponseAsync( } /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -993,7 +1043,9 @@ private Mono>> updateWithResponseAsync( } /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1021,7 +1073,9 @@ private PollerFlux, PartnerNamespaceInner> beg } /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1048,7 +1102,9 @@ private PollerFlux, PartnerNamespaceInner> beg } /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1063,12 +1119,15 @@ public SyncPoller, PartnerNamespaceInner> begi String resourceGroupName, String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters) { - return beginUpdateAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters) + return this + .beginUpdateAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters) .getSyncPoller(); } /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1085,12 +1144,15 @@ public SyncPoller, PartnerNamespaceInner> begi String partnerNamespaceName, PartnerNamespaceUpdateParameters partnerNamespaceUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, context) + return this + .beginUpdateAsync(resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, context) .getSyncPoller(); } /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1111,7 +1173,9 @@ private Mono updateAsync( } /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1134,7 +1198,9 @@ private Mono updateAsync( } /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1153,7 +1219,9 @@ public PartnerNamespaceInner update( } /** - * Asynchronously updates a partner namespace with the specified parameters. + * Update a partner namespace. + * + *

Asynchronously updates a partner namespace with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1174,7 +1242,9 @@ public PartnerNamespaceInner update( } /** - * List all the partner namespaces under an Azure subscription. + * List partner namespaces under an Azure subscription. + * + *

List all the partner namespaces under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1230,7 +1300,9 @@ private Mono> listSinglePageAsync(String fi } /** - * List all the partner namespaces under an Azure subscription. + * List partner namespaces under an Azure subscription. + * + *

List all the partner namespaces under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1285,7 +1357,9 @@ private Mono> listSinglePageAsync( } /** - * List all the partner namespaces under an Azure subscription. + * List partner namespaces under an Azure subscription. + * + *

List all the partner namespaces under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1307,7 +1381,9 @@ private PagedFlux listAsync(String filter, Integer top) { } /** - * List all the partner namespaces under an Azure subscription. + * List partner namespaces under an Azure subscription. + * + *

List all the partner namespaces under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1322,7 +1398,9 @@ private PagedFlux listAsync() { } /** - * List all the partner namespaces under an Azure subscription. + * List partner namespaces under an Azure subscription. + * + *

List all the partner namespaces under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1346,7 +1424,9 @@ private PagedFlux listAsync(String filter, Integer top, C } /** - * List all the partner namespaces under an Azure subscription. + * List partner namespaces under an Azure subscription. + * + *

List all the partner namespaces under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1360,7 +1440,9 @@ public PagedIterable list() { } /** - * List all the partner namespaces under an Azure subscription. + * List partner namespaces under an Azure subscription. + * + *

List all the partner namespaces under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1382,7 +1464,9 @@ public PagedIterable list(String filter, Integer top, Con } /** - * List all the partner namespaces under a resource group. + * List partner namespaces under a resource group. + * + *

List all the partner namespaces under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1445,7 +1529,9 @@ private Mono> listByResourceGroupSinglePage } /** - * List all the partner namespaces under a resource group. + * List partner namespaces under a resource group. + * + *

List all the partner namespaces under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1506,7 +1592,9 @@ private Mono> listByResourceGroupSinglePage } /** - * List all the partner namespaces under a resource group. + * List partner namespaces under a resource group. + * + *

List all the partner namespaces under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1531,7 +1619,9 @@ private PagedFlux listByResourceGroupAsync( } /** - * List all the partner namespaces under a resource group. + * List partner namespaces under a resource group. + * + *

List all the partner namespaces under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1549,7 +1639,9 @@ private PagedFlux listByResourceGroupAsync(String resourc } /** - * List all the partner namespaces under a resource group. + * List partner namespaces under a resource group. + * + *

List all the partner namespaces under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1575,7 +1667,9 @@ private PagedFlux listByResourceGroupAsync( } /** - * List all the partner namespaces under a resource group. + * List partner namespaces under a resource group. + * + *

List all the partner namespaces under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1591,7 +1685,9 @@ public PagedIterable listByResourceGroup(String resourceG } /** - * List all the partner namespaces under a resource group. + * List partner namespaces under a resource group. + * + *

List all the partner namespaces under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1615,7 +1711,9 @@ public PagedIterable listByResourceGroup( } /** - * List the two keys used to publish to a partner namespace. + * List keys for a partner namespace. + * + *

List the two keys used to publish to a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1665,7 +1763,9 @@ private Mono> listSharedAccessKe } /** - * List the two keys used to publish to a partner namespace. + * List keys for a partner namespace. + * + *

List the two keys used to publish to a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1713,7 +1813,9 @@ private Mono> listSharedAccessKe } /** - * List the two keys used to publish to a partner namespace. + * List keys for a partner namespace. + * + *

List the two keys used to publish to a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1730,40 +1832,46 @@ private Mono listSharedAccessKeysAsync( } /** - * List the two keys used to publish to a partner namespace. + * List keys for a partner namespace. + * + *

List the two keys used to publish to a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. + * @param context The context to associate with this operation. * @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 shared access keys of the partner namespace. + * @return shared access keys of the partner namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerNamespaceSharedAccessKeysInner listSharedAccessKeys( - String resourceGroupName, String partnerNamespaceName) { - return listSharedAccessKeysAsync(resourceGroupName, partnerNamespaceName).block(); + public Response listSharedAccessKeysWithResponse( + String resourceGroupName, String partnerNamespaceName, Context context) { + return listSharedAccessKeysWithResponseAsync(resourceGroupName, partnerNamespaceName, context).block(); } /** - * List the two keys used to publish to a partner namespace. + * List keys for a partner namespace. + * + *

List the two keys used to publish to a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. - * @param context The context to associate with this operation. * @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 shared access keys of the partner namespace along with {@link Response}. + * @return shared access keys of the partner namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSharedAccessKeysWithResponse( - String resourceGroupName, String partnerNamespaceName, Context context) { - return listSharedAccessKeysWithResponseAsync(resourceGroupName, partnerNamespaceName, context).block(); + public PartnerNamespaceSharedAccessKeysInner listSharedAccessKeys( + String resourceGroupName, String partnerNamespaceName) { + return listSharedAccessKeysWithResponse(resourceGroupName, partnerNamespaceName, Context.NONE).getValue(); } /** - * Regenerate a shared access key for a partner namespace. + * Regenerate key for a partner namespace. + * + *

Regenerate a shared access key for a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1823,7 +1931,9 @@ private Mono> regenerateKeyWithR } /** - * Regenerate a shared access key for a partner namespace. + * Regenerate key for a partner namespace. + * + *

Regenerate a shared access key for a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1882,7 +1992,9 @@ private Mono> regenerateKeyWithR } /** - * Regenerate a shared access key for a partner namespace. + * Regenerate key for a partner namespace. + * + *

Regenerate a shared access key for a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -1902,50 +2014,56 @@ private Mono regenerateKeyAsync( } /** - * Regenerate a shared access key for a partner namespace. + * Regenerate key for a partner namespace. + * + *

Regenerate a shared access key for a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. + * @param context The context to associate with this operation. * @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 shared access keys of the partner namespace. + * @return shared access keys of the partner namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerNamespaceSharedAccessKeysInner regenerateKey( + public Response regenerateKeyWithResponse( String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest) { - return regenerateKeyAsync(resourceGroupName, partnerNamespaceName, regenerateKeyRequest).block(); + PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context) { + return regenerateKeyWithResponseAsync(resourceGroupName, partnerNamespaceName, regenerateKeyRequest, context) + .block(); } /** - * Regenerate a shared access key for a partner namespace. + * Regenerate key for a partner namespace. + * + *

Regenerate a shared access key for a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. - * @param context The context to associate with this operation. * @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 shared access keys of the partner namespace along with {@link Response}. + * @return shared access keys of the partner namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response regenerateKeyWithResponse( + public PartnerNamespaceSharedAccessKeysInner regenerateKey( String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, - Context context) { - return regenerateKeyWithResponseAsync(resourceGroupName, partnerNamespaceName, regenerateKeyRequest, context) - .block(); + PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest) { + return regenerateKeyWithResponse(resourceGroupName, partnerNamespaceName, regenerateKeyRequest, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1982,7 +2100,8 @@ private Mono> listBySubscriptionNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2020,7 +2139,8 @@ private Mono> listBySubscriptionNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -2057,7 +2177,8 @@ private Mono> listByResourceGroupNextSingle /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesImpl.java index d27d8efe1722..89929772913c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerNamespacesImpl.java @@ -30,15 +30,6 @@ public PartnerNamespacesImpl( this.serviceManager = serviceManager; } - public PartnerNamespace getByResourceGroup(String resourceGroupName, String partnerNamespaceName) { - PartnerNamespaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, partnerNamespaceName); - if (inner != null) { - return new PartnerNamespaceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String partnerNamespaceName, Context context) { Response inner = @@ -54,6 +45,15 @@ public Response getByResourceGroupWithResponse( } } + public PartnerNamespace getByResourceGroup(String resourceGroupName, String partnerNamespaceName) { + PartnerNamespaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, partnerNamespaceName); + if (inner != null) { + return new PartnerNamespaceImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String partnerNamespaceName) { this.serviceClient().delete(resourceGroupName, partnerNamespaceName); } @@ -84,17 +84,6 @@ public PagedIterable listByResourceGroup( return Utils.mapPage(inner, inner1 -> new PartnerNamespaceImpl(inner1, this.manager())); } - public PartnerNamespaceSharedAccessKeys listSharedAccessKeys( - String resourceGroupName, String partnerNamespaceName) { - PartnerNamespaceSharedAccessKeysInner inner = - this.serviceClient().listSharedAccessKeys(resourceGroupName, partnerNamespaceName); - if (inner != null) { - return new PartnerNamespaceSharedAccessKeysImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listSharedAccessKeysWithResponse( String resourceGroupName, String partnerNamespaceName, Context context) { Response inner = @@ -110,12 +99,10 @@ public Response listSharedAccessKeysWithRespon } } - public PartnerNamespaceSharedAccessKeys regenerateKey( - String resourceGroupName, - String partnerNamespaceName, - PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest) { + public PartnerNamespaceSharedAccessKeys listSharedAccessKeys( + String resourceGroupName, String partnerNamespaceName) { PartnerNamespaceSharedAccessKeysInner inner = - this.serviceClient().regenerateKey(resourceGroupName, partnerNamespaceName, regenerateKeyRequest); + this.serviceClient().listSharedAccessKeys(resourceGroupName, partnerNamespaceName); if (inner != null) { return new PartnerNamespaceSharedAccessKeysImpl(inner, this.manager()); } else { @@ -143,6 +130,19 @@ public Response regenerateKeyWithResponse( } } + public PartnerNamespaceSharedAccessKeys regenerateKey( + String resourceGroupName, + String partnerNamespaceName, + PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest) { + PartnerNamespaceSharedAccessKeysInner inner = + this.serviceClient().regenerateKey(resourceGroupName, partnerNamespaceName, regenerateKeyRequest); + if (inner != null) { + return new PartnerNamespaceSharedAccessKeysImpl(inner, this.manager()); + } else { + return null; + } + } + public PartnerNamespace getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsClientImpl.java index 0a9baf387d05..1c907882e86c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsClientImpl.java @@ -66,11 +66,10 @@ public final class PartnerRegistrationsClientImpl implements PartnerRegistration */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface PartnerRegistrationsService { + public interface PartnerRegistrationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerRegistrations/{partnerRegistrationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -84,8 +83,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerRegistrations/{partnerRegistrationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -100,8 +98,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerRegistrations/{partnerRegistrationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -114,8 +111,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerRegistrations/{partnerRegistrationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -143,8 +139,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerRegistrations") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -179,7 +174,9 @@ Mono> listByResourceGroupNext( } /** - * Gets a partner registration with the specified parameters. + * Get a partner registration. + * + *

Gets a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -230,7 +227,9 @@ private Mono> getByResourceGroupWithResponseA } /** - * Gets a partner registration with the specified parameters. + * Get a partner registration. + * + *

Gets a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -279,7 +278,9 @@ private Mono> getByResourceGroupWithResponseA } /** - * Gets a partner registration with the specified parameters. + * Get a partner registration. + * + *

Gets a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -296,39 +297,45 @@ private Mono getByResourceGroupAsync( } /** - * Gets a partner registration with the specified parameters. + * Get a partner registration. + * + *

Gets a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. + * @param context The context to associate with this operation. * @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 a partner registration with the specified parameters. + * @return a partner registration with the specified parameters along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerRegistrationInner getByResourceGroup(String resourceGroupName, String partnerRegistrationName) { - return getByResourceGroupAsync(resourceGroupName, partnerRegistrationName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerRegistrationName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, partnerRegistrationName, context).block(); } /** - * Gets a partner registration with the specified parameters. + * Get a partner registration. + * + *

Gets a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. - * @param context The context to associate with this operation. * @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 a partner registration with the specified parameters along with {@link Response}. + * @return a partner registration with the specified parameters. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String partnerRegistrationName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, partnerRegistrationName, context).block(); + public PartnerRegistrationInner getByResourceGroup(String resourceGroupName, String partnerRegistrationName) { + return getByResourceGroupWithResponse(resourceGroupName, partnerRegistrationName, Context.NONE).getValue(); } /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -388,7 +395,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -449,7 +458,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -475,7 +486,9 @@ private PollerFlux, PartnerRegistrationInne } /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -507,7 +520,9 @@ private PollerFlux, PartnerRegistrationInne } /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -520,12 +535,15 @@ private PollerFlux, PartnerRegistrationInne @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PartnerRegistrationInner> beginCreateOrUpdate( String resourceGroupName, String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo) { - return beginCreateOrUpdateAsync(resourceGroupName, partnerRegistrationName, partnerRegistrationInfo) + return this + .beginCreateOrUpdateAsync(resourceGroupName, partnerRegistrationName, partnerRegistrationInfo) .getSyncPoller(); } /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -542,12 +560,15 @@ public SyncPoller, PartnerRegistrationInner String partnerRegistrationName, PartnerRegistrationInner partnerRegistrationInfo, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, partnerRegistrationName, partnerRegistrationInfo, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, partnerRegistrationName, partnerRegistrationInfo, context) .getSyncPoller(); } /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -566,7 +587,9 @@ private Mono createOrUpdateAsync( } /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -589,7 +612,9 @@ private Mono createOrUpdateAsync( } /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -606,7 +631,9 @@ public PartnerRegistrationInner createOrUpdate( } /** - * Creates a new partner registration with the specified parameters. + * Create a partner registration. + * + *

Creates a new partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -628,7 +655,9 @@ public PartnerRegistrationInner createOrUpdate( } /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -676,7 +705,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -722,7 +753,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -742,7 +775,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -764,7 +799,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -775,11 +812,13 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerRegistrationName) { - return beginDeleteAsync(resourceGroupName, partnerRegistrationName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, partnerRegistrationName).getSyncPoller(); } /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -792,11 +831,13 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String partnerRegistrationName, Context context) { - return beginDeleteAsync(resourceGroupName, partnerRegistrationName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, partnerRegistrationName, context).getSyncPoller(); } /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -813,7 +854,9 @@ private Mono deleteAsync(String resourceGroupName, String partnerRegistrat } /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -831,7 +874,9 @@ private Mono deleteAsync(String resourceGroupName, String partnerRegistrat } /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -845,7 +890,9 @@ public void delete(String resourceGroupName, String partnerRegistrationName) { } /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -860,7 +907,9 @@ public void delete(String resourceGroupName, String partnerRegistrationName, Con } /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -922,7 +971,9 @@ private Mono>> updateWithResponseAsync( } /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -983,7 +1034,9 @@ private Mono>> updateWithResponseAsync( } /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -1011,7 +1064,9 @@ private PollerFlux, PartnerRegistrationInne } /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -1043,7 +1098,9 @@ private PollerFlux, PartnerRegistrationInne } /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -1058,12 +1115,15 @@ public SyncPoller, PartnerRegistrationInner String resourceGroupName, String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters) { - return beginUpdateAsync(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters) + return this + .beginUpdateAsync(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters) .getSyncPoller(); } /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -1080,13 +1140,15 @@ public SyncPoller, PartnerRegistrationInner String partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Context context) { - return beginUpdateAsync( - resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters, context) + return this + .beginUpdateAsync(resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters, context) .getSyncPoller(); } /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -1107,7 +1169,9 @@ private Mono updateAsync( } /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -1131,7 +1195,9 @@ private Mono updateAsync( } /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -1150,7 +1216,9 @@ public PartnerRegistrationInner update( } /** - * Updates a partner registration with the specified parameters. + * Update a partner registration. + * + *

Updates a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -1172,7 +1240,9 @@ public PartnerRegistrationInner update( } /** - * List all the partner registrations under an Azure subscription. + * List partner registrations under an Azure subscription. + * + *

List all the partner registrations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1228,7 +1298,9 @@ private Mono> listSinglePageAsync(String } /** - * List all the partner registrations under an Azure subscription. + * List partner registrations under an Azure subscription. + * + *

List all the partner registrations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1283,7 +1355,9 @@ private Mono> listSinglePageAsync( } /** - * List all the partner registrations under an Azure subscription. + * List partner registrations under an Azure subscription. + * + *

List all the partner registrations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1305,7 +1379,9 @@ private PagedFlux listAsync(String filter, Integer top } /** - * List all the partner registrations under an Azure subscription. + * List partner registrations under an Azure subscription. + * + *

List all the partner registrations under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1320,7 +1396,9 @@ private PagedFlux listAsync() { } /** - * List all the partner registrations under an Azure subscription. + * List partner registrations under an Azure subscription. + * + *

List all the partner registrations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1344,7 +1422,9 @@ private PagedFlux listAsync(String filter, Integer top } /** - * List all the partner registrations under an Azure subscription. + * List partner registrations under an Azure subscription. + * + *

List all the partner registrations under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1358,7 +1438,9 @@ public PagedIterable list() { } /** - * List all the partner registrations under an Azure subscription. + * List partner registrations under an Azure subscription. + * + *

List all the partner registrations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1380,7 +1462,9 @@ public PagedIterable list(String filter, Integer top, } /** - * List all the partner registrations under a resource group. + * List partner registrations under a resource group. + * + *

List all the partner registrations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1443,7 +1527,9 @@ private Mono> listByResourceGroupSingleP } /** - * List all the partner registrations under a resource group. + * List partner registrations under a resource group. + * + *

List all the partner registrations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1504,7 +1590,9 @@ private Mono> listByResourceGroupSingleP } /** - * List all the partner registrations under a resource group. + * List partner registrations under a resource group. + * + *

List all the partner registrations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1529,7 +1617,9 @@ private PagedFlux listByResourceGroupAsync( } /** - * List all the partner registrations under a resource group. + * List partner registrations under a resource group. + * + *

List all the partner registrations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1547,7 +1637,9 @@ private PagedFlux listByResourceGroupAsync(String reso } /** - * List all the partner registrations under a resource group. + * List partner registrations under a resource group. + * + *

List all the partner registrations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1573,7 +1665,9 @@ private PagedFlux listByResourceGroupAsync( } /** - * List all the partner registrations under a resource group. + * List partner registrations under a resource group. + * + *

List all the partner registrations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1589,7 +1683,9 @@ public PagedIterable listByResourceGroup(String resour } /** - * List all the partner registrations under a resource group. + * List partner registrations under a resource group. + * + *

List all the partner registrations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1615,7 +1711,8 @@ public PagedIterable listByResourceGroup( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1652,7 +1749,8 @@ private Mono> listBySubscriptionNextSing /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1690,7 +1788,8 @@ private Mono> listBySubscriptionNextSing /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1727,7 +1826,8 @@ private Mono> listByResourceGroupNextSin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java index 7e90c58371b4..fc37966d0445 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerRegistrationsImpl.java @@ -27,16 +27,6 @@ public PartnerRegistrationsImpl( this.serviceManager = serviceManager; } - public PartnerRegistration getByResourceGroup(String resourceGroupName, String partnerRegistrationName) { - PartnerRegistrationInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, partnerRegistrationName); - if (inner != null) { - return new PartnerRegistrationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String partnerRegistrationName, Context context) { Response inner = @@ -52,6 +42,16 @@ public Response getByResourceGroupWithResponse( } } + public PartnerRegistration getByResourceGroup(String resourceGroupName, String partnerRegistrationName) { + PartnerRegistrationInner inner = + this.serviceClient().getByResourceGroup(resourceGroupName, partnerRegistrationName); + if (inner != null) { + return new PartnerRegistrationImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String partnerRegistrationName) { this.serviceClient().delete(resourceGroupName, partnerRegistrationName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsClientImpl.java index 9edb594cbab0..1c8ab252ea8d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsClientImpl.java @@ -72,11 +72,10 @@ public final class PartnerTopicEventSubscriptionsClientImpl implements PartnerTo */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface PartnerTopicEventSubscriptionsService { + public interface PartnerTopicEventSubscriptionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -91,8 +90,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -108,8 +106,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -123,8 +120,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -140,8 +136,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getFullUrl( @@ -156,8 +151,7 @@ Mono> getFullUrl( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}/eventSubscriptions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPartnerTopic( @@ -173,8 +167,7 @@ Mono> listByPartnerTopic( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDeliveryAttributes( @@ -199,7 +192,9 @@ Mono> listByPartnerTopicNext( } /** - * Get properties of an event subscription of a partner topic. + * Get an event subscription of a partner topic. + * + *

Get properties of an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -256,7 +251,9 @@ private Mono> getWithResponseAsync( } /** - * Get properties of an event subscription of a partner topic. + * Get an event subscription of a partner topic. + * + *

Get properties of an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -311,7 +308,9 @@ private Mono> getWithResponseAsync( } /** - * Get properties of an event subscription of a partner topic. + * Get an event subscription of a partner topic. + * + *

Get properties of an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -330,43 +329,49 @@ private Mono getAsync( } /** - * Get properties of an event subscription of a partner topic. + * Get an event subscription of a partner topic. + * + *

Get properties of an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. * @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 properties of an event subscription of a partner topic. + * @return properties of an event subscription of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - return getAsync(resourceGroupName, partnerTopicName, eventSubscriptionName).block(); + public Response getWithResponse( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { + return getWithResponseAsync(resourceGroupName, partnerTopicName, eventSubscriptionName, context).block(); } /** - * Get properties of an event subscription of a partner topic. + * Get an event subscription of a partner topic. + * + *

Get properties of an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. - * @param context The context to associate with this operation. * @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 properties of an event subscription of a partner topic along with {@link Response}. + * @return properties of an event subscription of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { - return getWithResponseAsync(resourceGroupName, partnerTopicName, eventSubscriptionName, context).block(); + public EventSubscriptionInner get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { + return getWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE).getValue(); } /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -434,7 +439,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -501,7 +508,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -534,7 +543,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -570,7 +581,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -589,13 +602,15 @@ public SyncPoller, EventSubscriptionInner> be String partnerTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdateAsync( - resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionInfo) + return this + .beginCreateOrUpdateAsync(resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionInfo) .getSyncPoller(); } /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -616,13 +631,16 @@ public SyncPoller, EventSubscriptionInner> be String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionInfo, context) .getSyncPoller(); } /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -648,7 +666,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -676,7 +696,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -700,7 +722,9 @@ public EventSubscriptionInner createOrUpdate( } /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -727,7 +751,9 @@ public EventSubscriptionInner createOrUpdate( } /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -781,7 +807,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -833,7 +861,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -856,7 +886,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -880,7 +912,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -894,11 +928,13 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - return beginDeleteAsync(resourceGroupName, partnerTopicName, eventSubscriptionName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, partnerTopicName, eventSubscriptionName).getSyncPoller(); } /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -913,11 +949,15 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { - return beginDeleteAsync(resourceGroupName, partnerTopicName, eventSubscriptionName, context).getSyncPoller(); + return this + .beginDeleteAsync(resourceGroupName, partnerTopicName, eventSubscriptionName, context) + .getSyncPoller(); } /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -936,7 +976,9 @@ private Mono deleteAsync(String resourceGroupName, String partnerTopicName } /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -957,7 +999,9 @@ private Mono deleteAsync( } /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -973,7 +1017,9 @@ public void delete(String resourceGroupName, String partnerTopicName, String eve } /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -991,7 +1037,9 @@ public void delete( } /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1060,7 +1108,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1128,7 +1178,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1160,7 +1212,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1195,7 +1249,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1213,13 +1269,16 @@ public SyncPoller, EventSubscriptionInner> be String partnerTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters) .getSyncPoller(); } /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1239,13 +1298,16 @@ public SyncPoller, EventSubscriptionInner> be String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters, context) .getSyncPoller(); } /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1270,7 +1332,9 @@ private Mono updateAsync( } /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1297,7 +1361,9 @@ private Mono updateAsync( } /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1321,7 +1387,9 @@ public EventSubscriptionInner update( } /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1347,7 +1415,9 @@ public EventSubscriptionInner update( } /** - * Get the full endpoint URL for an event subscription of a partner topic. + * Get full URL of an event subscription of a partner topic. + * + *

Get the full endpoint URL for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1404,7 +1474,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for an event subscription of a partner topic. + * Get full URL of an event subscription of a partner topic. + * + *

Get the full endpoint URL for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1459,7 +1531,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for an event subscription of a partner topic. + * Get full URL of an event subscription of a partner topic. + * + *

Get the full endpoint URL for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1479,44 +1553,51 @@ private Mono getFullUrlAsync( } /** - * Get the full endpoint URL for an event subscription of a partner topic. + * Get full URL of an event subscription of a partner topic. + * + *

Get the full endpoint URL for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. * @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 the full endpoint URL for an event subscription of a partner topic. + * @return the full endpoint URL for an event subscription of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - return getFullUrlAsync(resourceGroupName, partnerTopicName, eventSubscriptionName).block(); + public Response getFullUrlWithResponse( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { + return getFullUrlWithResponseAsync(resourceGroupName, partnerTopicName, eventSubscriptionName, context).block(); } /** - * Get the full endpoint URL for an event subscription of a partner topic. + * Get full URL of an event subscription of a partner topic. + * + *

Get the full endpoint URL for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. - * @param context The context to associate with this operation. * @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 the full endpoint URL for an event subscription of a partner topic along with {@link Response}. + * @return the full endpoint URL for an event subscription of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { - return getFullUrlWithResponseAsync(resourceGroupName, partnerTopicName, eventSubscriptionName, context).block(); + public EventSubscriptionFullUrlInner getFullUrl( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { + return getFullUrlWithResponse(resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE) + .getValue(); } /** - * List event subscriptions that belong to a specific partner topic. + * List event subscriptions of a partner topic. + * + *

List event subscriptions that belong to a specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1585,7 +1666,9 @@ private Mono> listByPartnerTopicSinglePage } /** - * List event subscriptions that belong to a specific partner topic. + * List event subscriptions of a partner topic. + * + *

List event subscriptions that belong to a specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1652,7 +1735,9 @@ private Mono> listByPartnerTopicSinglePage } /** - * List event subscriptions that belong to a specific partner topic. + * List event subscriptions of a partner topic. + * + *

List event subscriptions that belong to a specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1678,7 +1763,9 @@ private PagedFlux listByPartnerTopicAsync( } /** - * List event subscriptions that belong to a specific partner topic. + * List event subscriptions of a partner topic. + * + *

List event subscriptions that belong to a specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1698,7 +1785,9 @@ private PagedFlux listByPartnerTopicAsync( } /** - * List event subscriptions that belong to a specific partner topic. + * List event subscriptions of a partner topic. + * + *

List event subscriptions that belong to a specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1725,7 +1814,9 @@ private PagedFlux listByPartnerTopicAsync( } /** - * List event subscriptions that belong to a specific partner topic. + * List event subscriptions of a partner topic. + * + *

List event subscriptions that belong to a specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1742,7 +1833,9 @@ public PagedIterable listByPartnerTopic(String resourceG } /** - * List event subscriptions that belong to a specific partner topic. + * List event subscriptions of a partner topic. + * + *

List event subscriptions that belong to a specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1767,7 +1860,9 @@ public PagedIterable listByPartnerTopic( } /** - * Get all delivery attributes for an event subscription of a partner topic. + * Get delivery attributes for an event subscription of a partner topic. + * + *

Get all delivery attributes for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1824,7 +1919,9 @@ private Mono> getDeliveryAttributesWi } /** - * Get all delivery attributes for an event subscription of a partner topic. + * Get delivery attributes for an event subscription of a partner topic. + * + *

Get all delivery attributes for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1879,7 +1976,9 @@ private Mono> getDeliveryAttributesWi } /** - * Get all delivery attributes for an event subscription of a partner topic. + * Get delivery attributes for an event subscription of a partner topic. + * + *

Get all delivery attributes for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1899,48 +1998,55 @@ private Mono getDeliveryAttributesAsync( } /** - * Get all delivery attributes for an event subscription of a partner topic. + * Get delivery attributes for an event subscription of a partner topic. + * + *

Get all delivery attributes for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. * @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 all delivery attributes for an event subscription of a partner topic. + * @return all delivery attributes for an event subscription of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - return getDeliveryAttributesAsync(resourceGroupName, partnerTopicName, eventSubscriptionName).block(); + public Response getDeliveryAttributesWithResponse( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { + return getDeliveryAttributesWithResponseAsync( + resourceGroupName, partnerTopicName, eventSubscriptionName, context) + .block(); } /** - * Get all delivery attributes for an event subscription of a partner topic. + * Get delivery attributes for an event subscription of a partner topic. + * + *

Get all delivery attributes for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. - * @param context The context to associate with this operation. * @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 all delivery attributes for an event subscription of a partner topic along with {@link Response}. + * @return all delivery attributes for an event subscription of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { - return getDeliveryAttributesWithResponseAsync( - resourceGroupName, partnerTopicName, eventSubscriptionName, context) - .block(); + public DeliveryAttributeListResultInner getDeliveryAttributes( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponse( + resourceGroupName, partnerTopicName, eventSubscriptionName, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1977,7 +2083,8 @@ private Mono> listByPartnerTopicNextSingle /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java index f3d87c7f89cb..38884f7ae289 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicEventSubscriptionsImpl.java @@ -33,16 +33,6 @@ public PartnerTopicEventSubscriptionsImpl( this.serviceManager = serviceManager; } - public EventSubscription get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - EventSubscriptionInner inner = - this.serviceClient().get(resourceGroupName, partnerTopicName, eventSubscriptionName); - if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { Response inner = @@ -58,6 +48,16 @@ public Response getWithResponse( } } + public EventSubscription get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { + EventSubscriptionInner inner = + this.serviceClient().get(resourceGroupName, partnerTopicName, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + public EventSubscription createOrUpdate( String resourceGroupName, String partnerTopicName, @@ -139,17 +139,6 @@ public EventSubscription update( } } - public EventSubscriptionFullUrl getFullUrl( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - EventSubscriptionFullUrlInner inner = - this.serviceClient().getFullUrl(resourceGroupName, partnerTopicName, eventSubscriptionName); - if (inner != null) { - return new EventSubscriptionFullUrlImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getFullUrlWithResponse( String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { Response inner = @@ -167,6 +156,17 @@ public Response getFullUrlWithResponse( } } + public EventSubscriptionFullUrl getFullUrl( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { + EventSubscriptionFullUrlInner inner = + this.serviceClient().getFullUrl(resourceGroupName, partnerTopicName, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionFullUrlImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listByPartnerTopic(String resourceGroupName, String partnerTopicName) { PagedIterable inner = this.serviceClient().listByPartnerTopic(resourceGroupName, partnerTopicName); @@ -180,17 +180,6 @@ public PagedIterable listByPartnerTopic( return Utils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } - public DeliveryAttributeListResult getDeliveryAttributes( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { - DeliveryAttributeListResultInner inner = - this.serviceClient().getDeliveryAttributes(resourceGroupName, partnerTopicName, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getDeliveryAttributesWithResponse( String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context) { Response inner = @@ -208,6 +197,17 @@ public Response getDeliveryAttributesWithResponse( } } + public DeliveryAttributeListResult getDeliveryAttributes( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName) { + DeliveryAttributeListResultInner inner = + this.serviceClient().getDeliveryAttributes(resourceGroupName, partnerTopicName, eventSubscriptionName); + if (inner != null) { + return new DeliveryAttributeListResultImpl(inner, this.manager()); + } else { + return null; + } + } + private PartnerTopicEventSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java index aa23add5531c..bae8ca1f9d2b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicImpl.java @@ -201,22 +201,22 @@ public PartnerTopic refresh(Context context) { return this; } - public PartnerTopic activate() { - return serviceManager.partnerTopics().activate(resourceGroupName, partnerTopicName); - } - public Response activateWithResponse(Context context) { return serviceManager.partnerTopics().activateWithResponse(resourceGroupName, partnerTopicName, context); } - public PartnerTopic deactivate() { - return serviceManager.partnerTopics().deactivate(resourceGroupName, partnerTopicName); + public PartnerTopic activate() { + return serviceManager.partnerTopics().activate(resourceGroupName, partnerTopicName); } public Response deactivateWithResponse(Context context) { return serviceManager.partnerTopics().deactivateWithResponse(resourceGroupName, partnerTopicName, context); } + public PartnerTopic deactivate() { + return serviceManager.partnerTopics().deactivate(resourceGroupName, partnerTopicName); + } + public PartnerTopicImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsClientImpl.java index 660b06c68df5..0aca5259cdae 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsClientImpl.java @@ -66,11 +66,10 @@ public final class PartnerTopicsClientImpl implements PartnerTopicsClient { */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface PartnerTopicsService { + public interface PartnerTopicsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -84,8 +83,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -100,8 +98,7 @@ Mono> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -114,8 +111,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -143,8 +139,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -159,8 +154,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}/activate") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/activate") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> activate( @@ -174,8 +168,7 @@ Mono> activate( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/partnerTopics/{partnerTopicName}/deactivate") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/deactivate") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> deactivate( @@ -209,7 +202,9 @@ Mono> listByResourceGroupNext( } /** - * Get properties of a partner topic. + * Get a partner topic. + * + *

Get properties of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -258,7 +253,9 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Get properties of a partner topic. + * Get a partner topic. + * + *

Get properties of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -305,7 +302,9 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Get properties of a partner topic. + * Get a partner topic. + * + *

Get properties of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -321,39 +320,45 @@ private Mono getByResourceGroupAsync(String resourceGroupName } /** - * Get properties of a partner topic. + * Get a partner topic. + * + *

Get properties of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. + * @param context The context to associate with this operation. * @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 properties of a partner topic. + * @return properties of a partner topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerTopicInner getByResourceGroup(String resourceGroupName, String partnerTopicName) { - return getByResourceGroupAsync(resourceGroupName, partnerTopicName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerTopicName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, partnerTopicName, context).block(); } /** - * Get properties of a partner topic. + * Get a partner topic. + * + *

Get properties of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. - * @param context The context to associate with this operation. * @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 properties of a partner topic along with {@link Response}. + * @return properties of a partner topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String partnerTopicName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, partnerTopicName, context).block(); + public PartnerTopicInner getByResourceGroup(String resourceGroupName, String partnerTopicName) { + return getByResourceGroupWithResponse(resourceGroupName, partnerTopicName, Context.NONE).getValue(); } /** - * Asynchronously creates a new partner topic with the specified parameters. + * Create a partner topic. + * + *

Asynchronously creates a new partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -410,7 +415,9 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new partner topic with the specified parameters. + * Create a partner topic. + * + *

Asynchronously creates a new partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -465,7 +472,9 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new partner topic with the specified parameters. + * Create a partner topic. + * + *

Asynchronously creates a new partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -483,42 +492,49 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new partner topic with the specified parameters. + * Create a partner topic. + * + *

Asynchronously creates a new partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param partnerTopicInfo Partner Topic information. + * @param context The context to associate with this operation. * @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 event Grid Partner Topic. + * @return event Grid Partner Topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerTopicInner createOrUpdate( - String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo) { - return createOrUpdateAsync(resourceGroupName, partnerTopicName, partnerTopicInfo).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, partnerTopicName, partnerTopicInfo, context).block(); } /** - * Asynchronously creates a new partner topic with the specified parameters. + * Create a partner topic. + * + *

Asynchronously creates a new partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param partnerTopicInfo Partner Topic information. - * @param context The context to associate with this operation. * @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 event Grid Partner Topic along with {@link Response}. + * @return event Grid Partner Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, partnerTopicName, partnerTopicInfo, context).block(); + public PartnerTopicInner createOrUpdate( + String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo) { + return createOrUpdateWithResponse(resourceGroupName, partnerTopicName, partnerTopicInfo, Context.NONE) + .getValue(); } /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -565,7 +581,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -610,7 +628,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -629,7 +649,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -650,7 +672,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -661,11 +685,13 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String partnerTopicName) { - return beginDeleteAsync(resourceGroupName, partnerTopicName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, partnerTopicName).getSyncPoller(); } /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -678,11 +704,13 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String partnerTopicName, Context context) { - return beginDeleteAsync(resourceGroupName, partnerTopicName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, partnerTopicName, context).getSyncPoller(); } /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -699,7 +727,9 @@ private Mono deleteAsync(String resourceGroupName, String partnerTopicName } /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -717,7 +747,9 @@ private Mono deleteAsync(String resourceGroupName, String partnerTopicName } /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -731,7 +763,9 @@ public void delete(String resourceGroupName, String partnerTopicName) { } /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -746,7 +780,9 @@ public void delete(String resourceGroupName, String partnerTopicName, Context co } /** - * Asynchronously updates a partner topic with the specified parameters. + * Update a partner topic. + * + *

Asynchronously updates a partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -805,7 +841,9 @@ private Mono> updateWithResponseAsync( } /** - * Asynchronously updates a partner topic with the specified parameters. + * Update a partner topic. + * + *

Asynchronously updates a partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -865,7 +903,9 @@ private Mono> updateWithResponseAsync( } /** - * Asynchronously updates a partner topic with the specified parameters. + * Update a partner topic. + * + *

Asynchronously updates a partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -883,46 +923,53 @@ private Mono updateAsync( } /** - * Asynchronously updates a partner topic with the specified parameters. + * Update a partner topic. + * + *

Asynchronously updates a partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param partnerTopicUpdateParameters PartnerTopic update information. + * @param context The context to associate with this operation. * @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 the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerTopicInner update( - String resourceGroupName, String partnerTopicName, PartnerTopicUpdateParameters partnerTopicUpdateParameters) { - return updateAsync(resourceGroupName, partnerTopicName, partnerTopicUpdateParameters).block(); + public Response updateWithResponse( + String resourceGroupName, + String partnerTopicName, + PartnerTopicUpdateParameters partnerTopicUpdateParameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, partnerTopicName, partnerTopicUpdateParameters, context) + .block(); } /** - * Asynchronously updates a partner topic with the specified parameters. + * Update a partner topic. + * + *

Asynchronously updates a partner topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param partnerTopicUpdateParameters PartnerTopic update information. - * @param context The context to associate with this operation. * @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 the response body along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String partnerTopicName, - PartnerTopicUpdateParameters partnerTopicUpdateParameters, - Context context) { - return updateWithResponseAsync(resourceGroupName, partnerTopicName, partnerTopicUpdateParameters, context) - .block(); + public PartnerTopicInner update( + String resourceGroupName, String partnerTopicName, PartnerTopicUpdateParameters partnerTopicUpdateParameters) { + return updateWithResponse(resourceGroupName, partnerTopicName, partnerTopicUpdateParameters, Context.NONE) + .getValue(); } /** - * List all the partner topics under an Azure subscription. + * List partner topics under an Azure subscription. + * + *

List all the partner topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -978,7 +1025,9 @@ private Mono> listSinglePageAsync(String filter } /** - * List all the partner topics under an Azure subscription. + * List partner topics under an Azure subscription. + * + *

List all the partner topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1032,7 +1081,9 @@ private Mono> listSinglePageAsync(String filter } /** - * List all the partner topics under an Azure subscription. + * List partner topics under an Azure subscription. + * + *

List all the partner topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1054,7 +1105,9 @@ private PagedFlux listAsync(String filter, Integer top) { } /** - * List all the partner topics under an Azure subscription. + * List partner topics under an Azure subscription. + * + *

List all the partner topics under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1069,7 +1122,9 @@ private PagedFlux listAsync() { } /** - * List all the partner topics under an Azure subscription. + * List partner topics under an Azure subscription. + * + *

List all the partner topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1093,7 +1148,9 @@ private PagedFlux listAsync(String filter, Integer top, Conte } /** - * List all the partner topics under an Azure subscription. + * List partner topics under an Azure subscription. + * + *

List all the partner topics under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1107,7 +1164,9 @@ public PagedIterable list() { } /** - * List all the partner topics under an Azure subscription. + * List partner topics under an Azure subscription. + * + *

List all the partner topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1129,7 +1188,9 @@ public PagedIterable list(String filter, Integer top, Context } /** - * List all the partner topics under a resource group. + * List partner topics under a resource group. + * + *

List all the partner topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1192,7 +1253,9 @@ private Mono> listByResourceGroupSinglePageAsyn } /** - * List all the partner topics under a resource group. + * List partner topics under a resource group. + * + *

List all the partner topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1253,7 +1316,9 @@ private Mono> listByResourceGroupSinglePageAsyn } /** - * List all the partner topics under a resource group. + * List partner topics under a resource group. + * + *

List all the partner topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1278,7 +1343,9 @@ private PagedFlux listByResourceGroupAsync( } /** - * List all the partner topics under a resource group. + * List partner topics under a resource group. + * + *

List all the partner topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1296,7 +1363,9 @@ private PagedFlux listByResourceGroupAsync(String resourceGro } /** - * List all the partner topics under a resource group. + * List partner topics under a resource group. + * + *

List all the partner topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1322,7 +1391,9 @@ private PagedFlux listByResourceGroupAsync( } /** - * List all the partner topics under a resource group. + * List partner topics under a resource group. + * + *

List all the partner topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1338,7 +1409,9 @@ public PagedIterable listByResourceGroup(String resourceGroup } /** - * List all the partner topics under a resource group. + * List partner topics under a resource group. + * + *

List all the partner topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1362,7 +1435,9 @@ public PagedIterable listByResourceGroup( } /** - * Activate a newly created partner topic. + * Activate a partner topic. + * + *

Activate a newly created partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1411,7 +1486,9 @@ private Mono> activateWithResponseAsync( } /** - * Activate a newly created partner topic. + * Activate a partner topic. + * + *

Activate a newly created partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1458,7 +1535,9 @@ private Mono> activateWithResponseAsync( } /** - * Activate a newly created partner topic. + * Activate a partner topic. + * + *

Activate a newly created partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1474,39 +1553,45 @@ private Mono activateAsync(String resourceGroupName, String p } /** - * Activate a newly created partner topic. + * Activate a partner topic. + * + *

Activate a newly created partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. + * @param context The context to associate with this operation. * @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 event Grid Partner Topic. + * @return event Grid Partner Topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerTopicInner activate(String resourceGroupName, String partnerTopicName) { - return activateAsync(resourceGroupName, partnerTopicName).block(); + public Response activateWithResponse( + String resourceGroupName, String partnerTopicName, Context context) { + return activateWithResponseAsync(resourceGroupName, partnerTopicName, context).block(); } /** - * Activate a newly created partner topic. + * Activate a partner topic. + * + *

Activate a newly created partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. - * @param context The context to associate with this operation. * @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 event Grid Partner Topic along with {@link Response}. + * @return event Grid Partner Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response activateWithResponse( - String resourceGroupName, String partnerTopicName, Context context) { - return activateWithResponseAsync(resourceGroupName, partnerTopicName, context).block(); + public PartnerTopicInner activate(String resourceGroupName, String partnerTopicName) { + return activateWithResponse(resourceGroupName, partnerTopicName, Context.NONE).getValue(); } /** - * Deactivate specific partner topic. + * Deactivate a partner topic. + * + *

Deactivate specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1555,7 +1640,9 @@ private Mono> deactivateWithResponseAsync( } /** - * Deactivate specific partner topic. + * Deactivate a partner topic. + * + *

Deactivate specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1602,7 +1689,9 @@ private Mono> deactivateWithResponseAsync( } /** - * Deactivate specific partner topic. + * Deactivate a partner topic. + * + *

Deactivate specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -1618,41 +1707,46 @@ private Mono deactivateAsync(String resourceGroupName, String } /** - * Deactivate specific partner topic. + * Deactivate a partner topic. + * + *

Deactivate specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. + * @param context The context to associate with this operation. * @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 event Grid Partner Topic. + * @return event Grid Partner Topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PartnerTopicInner deactivate(String resourceGroupName, String partnerTopicName) { - return deactivateAsync(resourceGroupName, partnerTopicName).block(); + public Response deactivateWithResponse( + String resourceGroupName, String partnerTopicName, Context context) { + return deactivateWithResponseAsync(resourceGroupName, partnerTopicName, context).block(); } /** - * Deactivate specific partner topic. + * Deactivate a partner topic. + * + *

Deactivate specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. - * @param context The context to associate with this operation. * @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 event Grid Partner Topic along with {@link Response}. + * @return event Grid Partner Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deactivateWithResponse( - String resourceGroupName, String partnerTopicName, Context context) { - return deactivateWithResponseAsync(resourceGroupName, partnerTopicName, context).block(); + public PartnerTopicInner deactivate(String resourceGroupName, String partnerTopicName) { + return deactivateWithResponse(resourceGroupName, partnerTopicName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1689,7 +1783,8 @@ private Mono> listBySubscriptionNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1727,7 +1822,8 @@ private Mono> listBySubscriptionNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1764,7 +1860,8 @@ private Mono> listByResourceGroupNextSinglePage /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java index 488882cd5a8a..1bdb4705f3c8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PartnerTopicsImpl.java @@ -27,15 +27,6 @@ public PartnerTopicsImpl( this.serviceManager = serviceManager; } - public PartnerTopic getByResourceGroup(String resourceGroupName, String partnerTopicName) { - PartnerTopicInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, partnerTopicName); - if (inner != null) { - return new PartnerTopicImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String partnerTopicName, Context context) { Response inner = @@ -51,6 +42,15 @@ public Response getByResourceGroupWithResponse( } } + public PartnerTopic getByResourceGroup(String resourceGroupName, String partnerTopicName) { + PartnerTopicInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, partnerTopicName); + if (inner != null) { + return new PartnerTopicImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String partnerTopicName) { this.serviceClient().delete(resourceGroupName, partnerTopicName); } @@ -81,15 +81,6 @@ public PagedIterable listByResourceGroup( return Utils.mapPage(inner, inner1 -> new PartnerTopicImpl(inner1, this.manager())); } - public PartnerTopic activate(String resourceGroupName, String partnerTopicName) { - PartnerTopicInner inner = this.serviceClient().activate(resourceGroupName, partnerTopicName); - if (inner != null) { - return new PartnerTopicImpl(inner, this.manager()); - } else { - return null; - } - } - public Response activateWithResponse( String resourceGroupName, String partnerTopicName, Context context) { Response inner = @@ -105,8 +96,8 @@ public Response activateWithResponse( } } - public PartnerTopic deactivate(String resourceGroupName, String partnerTopicName) { - PartnerTopicInner inner = this.serviceClient().deactivate(resourceGroupName, partnerTopicName); + public PartnerTopic activate(String resourceGroupName, String partnerTopicName) { + PartnerTopicInner inner = this.serviceClient().activate(resourceGroupName, partnerTopicName); if (inner != null) { return new PartnerTopicImpl(inner, this.manager()); } else { @@ -129,6 +120,15 @@ public Response deactivateWithResponse( } } + public PartnerTopic deactivate(String resourceGroupName, String partnerTopicName) { + PartnerTopicInner inner = this.serviceClient().deactivate(resourceGroupName, partnerTopicName); + if (inner != null) { + return new PartnerTopicImpl(inner, this.manager()); + } else { + return null; + } + } + public PartnerTopic getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java new file mode 100644 index 000000000000..339985c3d03e --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingImpl.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner; +import com.azure.resourcemanager.eventgrid.models.PermissionBinding; +import com.azure.resourcemanager.eventgrid.models.PermissionBindingProvisioningState; +import com.azure.resourcemanager.eventgrid.models.PermissionType; + +public final class PermissionBindingImpl + implements PermissionBinding, PermissionBinding.Definition, PermissionBinding.Update { + private PermissionBindingInner innerObject; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String description() { + return this.innerModel().description(); + } + + public String topicSpaceName() { + return this.innerModel().topicSpaceName(); + } + + public PermissionType permission() { + return this.innerModel().permission(); + } + + public String clientGroupName() { + return this.innerModel().clientGroupName(); + } + + public PermissionBindingProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PermissionBindingInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String namespaceName; + + private String permissionBindingName; + + public PermissionBindingImpl withExistingNamespace(String resourceGroupName, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + return this; + } + + public PermissionBinding create() { + this.innerObject = + serviceManager + .serviceClient() + .getPermissionBindings() + .createOrUpdate( + resourceGroupName, namespaceName, permissionBindingName, this.innerModel(), Context.NONE); + return this; + } + + public PermissionBinding create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPermissionBindings() + .createOrUpdate(resourceGroupName, namespaceName, permissionBindingName, this.innerModel(), context); + return this; + } + + PermissionBindingImpl(String name, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = new PermissionBindingInner(); + this.serviceManager = serviceManager; + this.permissionBindingName = name; + } + + public PermissionBindingImpl update() { + return this; + } + + public PermissionBinding apply() { + this.innerObject = + serviceManager + .serviceClient() + .getPermissionBindings() + .createOrUpdate( + resourceGroupName, namespaceName, permissionBindingName, this.innerModel(), Context.NONE); + return this; + } + + public PermissionBinding apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPermissionBindings() + .createOrUpdate(resourceGroupName, namespaceName, permissionBindingName, this.innerModel(), context); + return this; + } + + PermissionBindingImpl( + PermissionBindingInner innerObject, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.namespaceName = Utils.getValueFromIdByName(innerObject.id(), "namespaces"); + this.permissionBindingName = Utils.getValueFromIdByName(innerObject.id(), "permissionBindings"); + } + + public PermissionBinding refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getPermissionBindings() + .getWithResponse(resourceGroupName, namespaceName, permissionBindingName, Context.NONE) + .getValue(); + return this; + } + + public PermissionBinding refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPermissionBindings() + .getWithResponse(resourceGroupName, namespaceName, permissionBindingName, context) + .getValue(); + return this; + } + + public PermissionBindingImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public PermissionBindingImpl withTopicSpaceName(String topicSpaceName) { + this.innerModel().withTopicSpaceName(topicSpaceName); + return this; + } + + public PermissionBindingImpl withPermission(PermissionType permission) { + this.innerModel().withPermission(permission); + return this; + } + + public PermissionBindingImpl withClientGroupName(String clientGroupName) { + this.innerModel().withClientGroupName(clientGroupName); + return this; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsClientImpl.java new file mode 100644 index 000000000000..f45c3d6d352d --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsClientImpl.java @@ -0,0 +1,1279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner; +import com.azure.resourcemanager.eventgrid.models.PermissionBindingsListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PermissionBindingsClient. */ +public final class PermissionBindingsClientImpl implements PermissionBindingsClient { + /** The proxy service used to perform REST calls. */ + private final PermissionBindingsService service; + + /** The service client containing this operation class. */ + private final EventGridManagementClientImpl client; + + /** + * Initializes an instance of PermissionBindingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PermissionBindingsClientImpl(EventGridManagementClientImpl client) { + this.service = + RestProxy.create(PermissionBindingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventGridManagementClientPermissionBindings to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventGridManagementC") + public interface PermissionBindingsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("permissionBindingName") String permissionBindingName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("permissionBindingName") String permissionBindingName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PermissionBindingInner permissionBindingInfo, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings/{permissionBindingName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("permissionBindingName") String permissionBindingName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/permissionBindings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespace( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get a permission binding. + * + *

Get properties of a permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 properties of a permission binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String permissionBindingName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (permissionBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + permissionBindingName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a permission binding. + * + *

Get properties of a permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @param context The context to associate with this operation. + * @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 properties of a permission binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (permissionBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + permissionBindingName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get a permission binding. + * + *

Get properties of a permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 properties of a permission binding on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String namespaceName, String permissionBindingName) { + return getWithResponseAsync(resourceGroupName, namespaceName, permissionBindingName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a permission binding. + * + *

Get properties of a permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @param context The context to associate with this operation. + * @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 properties of a permission binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, permissionBindingName, context).block(); + } + + /** + * Get a permission binding. + * + *

Get properties of a permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 properties of a permission binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PermissionBindingInner get(String resourceGroupName, String namespaceName, String permissionBindingName) { + return getWithResponse(resourceGroupName, namespaceName, permissionBindingName, Context.NONE).getValue(); + } + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @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 the Permission binding resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (permissionBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); + } + if (permissionBindingInfo == null) { + return Mono + .error(new IllegalArgumentException("Parameter permissionBindingInfo is required and cannot be null.")); + } else { + permissionBindingInfo.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + permissionBindingName, + this.client.getApiVersion(), + permissionBindingInfo, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @param context The context to associate with this operation. + * @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 the Permission binding resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (permissionBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); + } + if (permissionBindingInfo == null) { + return Mono + .error(new IllegalArgumentException("Parameter permissionBindingInfo is required and cannot be null.")); + } else { + permissionBindingInfo.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + permissionBindingName, + this.client.getApiVersion(), + permissionBindingInfo, + accept, + context); + } + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @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 the {@link PollerFlux} for polling of the Permission binding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PermissionBindingInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo) { + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PermissionBindingInner.class, + PermissionBindingInner.class, + this.client.getContext()); + } + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of the Permission binding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PermissionBindingInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PermissionBindingInner.class, + PermissionBindingInner.class, + context); + } + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @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 the {@link SyncPoller} for polling of the Permission binding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PermissionBindingInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo) + .getSyncPoller(); + } + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of the Permission binding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PermissionBindingInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo, + Context context) { + return this + .beginCreateOrUpdateAsync( + resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo, context) + .getSyncPoller(); + } + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @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 the Permission binding resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @param context The context to associate with this operation. + * @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 the Permission binding resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo, + Context context) { + return beginCreateOrUpdateAsync( + resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @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 the Permission binding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PermissionBindingInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo) { + return createOrUpdateAsync(resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo) + .block(); + } + + /** + * Create or update a permission binding. + * + *

Create or update a permission binding with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName The permission binding name. + * @param permissionBindingInfo Permission binding information. + * @param context The context to associate with this operation. + * @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 the Permission binding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PermissionBindingInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String permissionBindingName, + PermissionBindingInner permissionBindingInfo, + Context context) { + return createOrUpdateAsync( + resourceGroupName, namespaceName, permissionBindingName, permissionBindingInfo, context) + .block(); + } + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String permissionBindingName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (permissionBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + permissionBindingName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @param context The context to associate with this operation. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (permissionBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter permissionBindingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + permissionBindingName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String permissionBindingName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, permissionBindingName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, permissionBindingName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String permissionBindingName) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, permissionBindingName).getSyncPoller(); + } + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, permissionBindingName, context).getSyncPoller(); + } + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String namespaceName, String permissionBindingName) { + return beginDeleteAsync(resourceGroupName, namespaceName, permissionBindingName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @param context The context to associate with this operation. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, permissionBindingName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String permissionBindingName) { + deleteAsync(resourceGroupName, namespaceName, permissionBindingName).block(); + } + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @param context The context to associate with this operation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { + deleteAsync(resourceGroupName, namespaceName, permissionBindingName, context).block(); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the permission bindings under a namespace along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the permission bindings under a namespace along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top, context), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top)); + } + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 result of the List Permission Binding operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @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 result of the List Permission Binding operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java new file mode 100644 index 000000000000..20a751ced06b --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PermissionBindingsImpl.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventgrid.fluent.PermissionBindingsClient; +import com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner; +import com.azure.resourcemanager.eventgrid.models.PermissionBinding; +import com.azure.resourcemanager.eventgrid.models.PermissionBindings; + +public final class PermissionBindingsImpl implements PermissionBindings { + private static final ClientLogger LOGGER = new ClientLogger(PermissionBindingsImpl.class); + + private final PermissionBindingsClient innerClient; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public PermissionBindingsImpl( + PermissionBindingsClient innerClient, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, namespaceName, permissionBindingName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PermissionBindingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PermissionBinding get(String resourceGroupName, String namespaceName, String permissionBindingName) { + PermissionBindingInner inner = + this.serviceClient().get(resourceGroupName, namespaceName, permissionBindingName); + if (inner != null) { + return new PermissionBindingImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String namespaceName, String permissionBindingName) { + this.serviceClient().delete(resourceGroupName, namespaceName, permissionBindingName); + } + + public void delete(String resourceGroupName, String namespaceName, String permissionBindingName, Context context) { + this.serviceClient().delete(resourceGroupName, namespaceName, permissionBindingName, context); + } + + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + PagedIterable inner = + this.serviceClient().listByNamespace(resourceGroupName, namespaceName); + return Utils.mapPage(inner, inner1 -> new PermissionBindingImpl(inner1, this.manager())); + } + + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().listByNamespace(resourceGroupName, namespaceName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new PermissionBindingImpl(inner1, this.manager())); + } + + public PermissionBinding getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String permissionBindingName = Utils.getValueFromIdByName(id, "permissionBindings"); + if (permissionBindingName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'permissionBindings'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, permissionBindingName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String permissionBindingName = Utils.getValueFromIdByName(id, "permissionBindings"); + if (permissionBindingName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'permissionBindings'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, permissionBindingName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String permissionBindingName = Utils.getValueFromIdByName(id, "permissionBindings"); + if (permissionBindingName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'permissionBindings'.", id))); + } + this.delete(resourceGroupName, namespaceName, permissionBindingName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String permissionBindingName = Utils.getValueFromIdByName(id, "permissionBindings"); + if (permissionBindingName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'permissionBindings'.", id))); + } + this.delete(resourceGroupName, namespaceName, permissionBindingName, context); + } + + private PermissionBindingsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + public PermissionBindingImpl define(String name) { + return new PermissionBindingImpl(name, this.manager()); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsClientImpl.java index c118fe99db2c..a5d6946c7916 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsClientImpl.java @@ -66,11 +66,10 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface PrivateEndpointConnectionsService { + public interface PrivateEndpointConnectionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -86,8 +85,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -104,8 +102,7 @@ Mono>> update( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -120,8 +117,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/{parentType}/{parentName}/privateEndpointConnections") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResource( @@ -148,19 +144,21 @@ Mono> listByResourceNext( } /** - * Get a specific private endpoint connection under a topic, domain, or partner namespace. + * Get a specific private endpoint connection. + * + *

Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @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 a specific private endpoint connection under a topic, domain, or partner namespace along with {@link - * Response} on successful completion of {@link Mono}. + * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -215,20 +213,22 @@ private Mono> getWithResponseAsync( } /** - * Get a specific private endpoint connection under a topic, domain, or partner namespace. + * Get a specific private endpoint connection. + * + *

Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param context The context to associate with this operation. * @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 a specific private endpoint connection under a topic, domain, or partner namespace along with {@link - * Response} on successful completion of {@link Mono}. + * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -281,19 +281,21 @@ private Mono> getWithResponseAsync( } /** - * Get a specific private endpoint connection under a topic, domain, or partner namespace. + * Get a specific private endpoint connection. + * + *

Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @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 a specific private endpoint connection under a topic, domain, or partner namespace on successful - * completion of {@link Mono}. + * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -306,63 +308,70 @@ private Mono getAsync( } /** - * Get a specific private endpoint connection under a topic, domain, or partner namespace. + * Get a specific private endpoint connection. + * + *

Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @param context The context to associate with this operation. * @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 a specific private endpoint connection under a topic, domain, or partner namespace. + * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get( + public Response getWithResponse( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, - String privateEndpointConnectionName) { - return getAsync(resourceGroupName, parentType, parentName, privateEndpointConnectionName).block(); + String privateEndpointConnectionName, + Context context) { + return getWithResponseAsync(resourceGroupName, parentType, parentName, privateEndpointConnectionName, context) + .block(); } /** - * Get a specific private endpoint connection under a topic, domain, or partner namespace. + * Get a specific private endpoint connection. + * + *

Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. - * @param context The context to associate with this operation. * @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 a specific private endpoint connection under a topic, domain, or partner namespace along with {@link - * Response}. + * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public PrivateEndpointConnectionInner get( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, - String privateEndpointConnectionName, - Context context) { - return getWithResponseAsync(resourceGroupName, parentType, parentName, privateEndpointConnectionName, context) - .block(); + String privateEndpointConnectionName) { + return getWithResponse(resourceGroupName, parentType, parentName, privateEndpointConnectionName, Context.NONE) + .getValue(); } /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -433,13 +442,15 @@ private Mono>> updateWithResponseAsync( } /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. @@ -509,13 +520,15 @@ private Mono>> updateWithResponseAsync( } /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -544,13 +557,15 @@ private PollerFlux, PrivateEndpointCo } /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. @@ -587,13 +602,15 @@ private PollerFlux, PrivateEndpointCo } /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -608,19 +625,22 @@ public SyncPoller, PrivateEndpointCon String parentName, String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, parentType, parentName, privateEndpointConnectionName, privateEndpointConnection) .getSyncPoller(); } /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. @@ -637,7 +657,8 @@ public SyncPoller, PrivateEndpointCon String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnection, Context context) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, parentType, parentName, @@ -648,13 +669,15 @@ public SyncPoller, PrivateEndpointCon } /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -676,13 +699,15 @@ private Mono updateAsync( } /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. @@ -711,13 +736,15 @@ private Mono updateAsync( } /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -738,13 +765,15 @@ public PrivateEndpointConnectionInner update( } /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. @@ -772,13 +801,15 @@ public PrivateEndpointConnectionInner update( } /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -836,13 +867,15 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -899,13 +932,15 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -927,13 +962,15 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -957,13 +994,15 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -976,18 +1015,21 @@ public SyncPoller, Void> beginDelete( PrivateEndpointConnectionsParentType parentType, String parentName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, parentType, parentName, privateEndpointConnectionName) + return this + .beginDeleteAsync(resourceGroupName, parentType, parentName, privateEndpointConnectionName) .getSyncPoller(); } /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1002,18 +1044,21 @@ public SyncPoller, Void> beginDelete( String parentName, String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, parentType, parentName, privateEndpointConnectionName, context) + return this + .beginDeleteAsync(resourceGroupName, parentType, parentName, privateEndpointConnectionName, context) .getSyncPoller(); } /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1032,13 +1077,15 @@ private Mono deleteAsync( } /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1059,13 +1106,15 @@ private Mono deleteAsync( } /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1081,13 +1130,15 @@ public void delete( } /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1105,13 +1156,15 @@ public void delete( } /** - * Get all private endpoint connections under a topic, domain, or partner namespace. + * Lists all private endpoint connections under a resource. + * + *

Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -1123,8 +1176,8 @@ public void delete( * @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 all private endpoint connections under a topic, domain, or partner namespace along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return all private endpoint connections under a topic, domain, or partner namespace or namespace along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceSinglePageAsync( @@ -1184,13 +1237,15 @@ private Mono> listByResourceSingle } /** - * Get all private endpoint connections under a topic, domain, or partner namespace. + * Lists all private endpoint connections under a resource. + * + *

Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -1203,8 +1258,8 @@ private Mono> listByResourceSingle * @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 all private endpoint connections under a topic, domain, or partner namespace along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return all private endpoint connections under a topic, domain, or partner namespace or namespace along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceSinglePageAsync( @@ -1262,13 +1317,15 @@ private Mono> listByResourceSingle } /** - * Get all private endpoint connections under a topic, domain, or partner namespace. + * Lists all private endpoint connections under a resource. + * + *

Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -1280,8 +1337,8 @@ private Mono> listByResourceSingle * @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 all private endpoint connections under a topic, domain, or partner namespace as paginated response with - * {@link PagedFlux}. + * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceAsync( @@ -1296,18 +1353,20 @@ private PagedFlux listByResourceAsync( } /** - * Get all private endpoint connections under a topic, domain, or partner namespace. + * Lists all private endpoint connections under a resource. + * + *

Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @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 all private endpoint connections under a topic, domain, or partner namespace as paginated response with - * {@link PagedFlux}. + * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceAsync( @@ -1320,13 +1379,15 @@ private PagedFlux listByResourceAsync( } /** - * Get all private endpoint connections under a topic, domain, or partner namespace. + * Lists all private endpoint connections under a resource. + * + *

Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -1339,8 +1400,8 @@ private PagedFlux listByResourceAsync( * @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 all private endpoint connections under a topic, domain, or partner namespace as paginated response with - * {@link PagedFlux}. + * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceAsync( @@ -1356,18 +1417,20 @@ private PagedFlux listByResourceAsync( } /** - * Get all private endpoint connections under a topic, domain, or partner namespace. + * Lists all private endpoint connections under a resource. + * + *

Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @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 all private endpoint connections under a topic, domain, or partner namespace as paginated response with - * {@link PagedIterable}. + * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResource( @@ -1378,13 +1441,15 @@ public PagedIterable listByResource( } /** - * Get all private endpoint connections under a topic, domain, or partner namespace. + * Lists all private endpoint connections under a resource. + * + *

Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -1397,8 +1462,8 @@ public PagedIterable listByResource( * @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 all private endpoint connections under a topic, domain, or partner namespace as paginated response with - * {@link PagedIterable}. + * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResource( @@ -1415,7 +1480,8 @@ public PagedIterable listByResource( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1451,7 +1517,8 @@ private Mono> listByResourceNextSi /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java index 0902cf8cae16..911d984a9baf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateEndpointConnectionsImpl.java @@ -29,20 +29,6 @@ public PrivateEndpointConnectionsImpl( this.serviceManager = serviceManager; } - public PrivateEndpointConnection get( - String resourceGroupName, - PrivateEndpointConnectionsParentType parentType, - String parentName, - String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner = - this.serviceClient().get(resourceGroupName, parentType, parentName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, @@ -64,6 +50,20 @@ public Response getWithResponse( } } + public PrivateEndpointConnection get( + String resourceGroupName, + PrivateEndpointConnectionsParentType parentType, + String parentName, + String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner = + this.serviceClient().get(resourceGroupName, parentType, parentName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + public PrivateEndpointConnection update( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesClientImpl.java index cfe733ed3d42..1ff72a17ec94 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesClientImpl.java @@ -56,11 +56,10 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface PrivateLinkResourcesService { + public interface PrivateLinkResourcesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/{parentType}/{parentName}/privateLinkResources/{privateLinkResourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateLinkResources/{privateLinkResourceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -76,8 +75,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/{parentType}/{parentName}/privateLinkResources") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResource( @@ -104,14 +102,17 @@ Mono> listByResourceNext( } /** - * Get properties of a private link resource. + * Get a private link resource. + * + *

Get properties of a private link resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). - * @param privateLinkResourceName The name of private link resource. + * namespace name or namespace name). + * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace + * or namespace. * @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. @@ -167,14 +168,17 @@ private Mono> getWithResponseAsync( } /** - * Get properties of a private link resource. + * Get a private link resource. + * + *

Get properties of a private link resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). - * @param privateLinkResourceName The name of private link resource. + * namespace name or namespace name). + * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace + * or namespace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -232,14 +236,17 @@ private Mono> getWithResponseAsync( } /** - * Get properties of a private link resource. + * Get a private link resource. + * + *

Get properties of a private link resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). - * @param privateLinkResourceName The name of private link resource. + * namespace name or namespace name). + * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace + * or namespace. * @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. @@ -253,59 +260,68 @@ private Mono getAsync( } /** - * Get properties of a private link resource. + * Get a private link resource. + * + *

Get properties of a private link resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). - * @param privateLinkResourceName The name of private link resource. + * namespace name or namespace name). + * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace + * or namespace. + * @param context The context to associate with this operation. * @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 properties of a private link resource. + * @return properties of a private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceInner get( - String resourceGroupName, String parentType, String parentName, String privateLinkResourceName) { - return getAsync(resourceGroupName, parentType, parentName, privateLinkResourceName).block(); + public Response getWithResponse( + String resourceGroupName, + String parentType, + String parentName, + String privateLinkResourceName, + Context context) { + return getWithResponseAsync(resourceGroupName, parentType, parentName, privateLinkResourceName, context) + .block(); } /** - * Get properties of a private link resource. + * Get a private link resource. + * + *

Get properties of a private link resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). - * @param privateLinkResourceName The name of private link resource. - * @param context The context to associate with this operation. + * namespace name or namespace name). + * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace + * or namespace. * @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 properties of a private link resource along with {@link Response}. + * @return properties of a private link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String parentType, - String parentName, - String privateLinkResourceName, - Context context) { - return getWithResponseAsync(resourceGroupName, parentType, parentName, privateLinkResourceName, context) - .block(); + public PrivateLinkResourceInner get( + String resourceGroupName, String parentType, String parentName, String privateLinkResourceName) { + return getWithResponse(resourceGroupName, parentType, parentName, privateLinkResourceName, Context.NONE) + .getValue(); } /** - * List all the private link resources under a topic, domain, or partner namespace. + * List private link resources under specific topic, domain, or partner namespace or namespace. + * + *

List all the private link resources under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -374,13 +390,15 @@ private Mono> listByResourceSinglePageAs } /** - * List all the private link resources under a topic, domain, or partner namespace. + * List private link resources under specific topic, domain, or partner namespace or namespace. + * + *

List all the private link resources under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -447,13 +465,15 @@ private Mono> listByResourceSinglePageAs } /** - * List all the private link resources under a topic, domain, or partner namespace. + * List private link resources under specific topic, domain, or partner namespace or namespace. + * + *

List all the private link resources under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -476,13 +496,15 @@ private PagedFlux listByResourceAsync( } /** - * List all the private link resources under a topic, domain, or partner namespace. + * List private link resources under specific topic, domain, or partner namespace or namespace. + * + *

List all the private link resources under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace or namespace name). * @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. @@ -499,13 +521,15 @@ private PagedFlux listByResourceAsync( } /** - * List all the private link resources under a topic, domain, or partner namespace. + * List private link resources under specific topic, domain, or partner namespace or namespace. + * + *

List all the private link resources under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -529,13 +553,15 @@ private PagedFlux listByResourceAsync( } /** - * List all the private link resources under a topic, domain, or partner namespace. + * List private link resources under specific topic, domain, or partner namespace or namespace. + * + *

List all the private link resources under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace or namespace name). * @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. @@ -550,13 +576,15 @@ public PagedIterable listByResource( } /** - * List all the private link resources under a topic, domain, or partner namespace. + * List private link resources under specific topic, domain, or partner namespace or namespace. + * + *

List all the private link resources under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -581,7 +609,8 @@ public PagedIterable listByResource( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -617,7 +646,8 @@ private Mono> listByResourceNextSinglePa /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesImpl.java index d7a1eb06fc7b..32f1d1392166 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/PrivateLinkResourcesImpl.java @@ -27,17 +27,6 @@ public PrivateLinkResourcesImpl( this.serviceManager = serviceManager; } - public PrivateLinkResource get( - String resourceGroupName, String parentType, String parentName, String privateLinkResourceName) { - PrivateLinkResourceInner inner = - this.serviceClient().get(resourceGroupName, parentType, parentName, privateLinkResourceName); - if (inner != null) { - return new PrivateLinkResourceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String parentType, @@ -59,6 +48,17 @@ public Response getWithResponse( } } + public PrivateLinkResource get( + String resourceGroupName, String parentType, String parentName, String privateLinkResourceName) { + PrivateLinkResourceInner inner = + this.serviceClient().get(resourceGroupName, parentType, parentName, privateLinkResourceName); + if (inner != null) { + return new PrivateLinkResourceImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listByResource( String resourceGroupName, String parentType, String parentName) { PagedIterable inner = diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionImpl.java new file mode 100644 index 000000000000..6b9129bde784 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SubscriptionImpl.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner; +import com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration; +import com.azure.resourcemanager.eventgrid.models.DeliverySchema; +import com.azure.resourcemanager.eventgrid.models.FiltersConfiguration; +import com.azure.resourcemanager.eventgrid.models.Subscription; +import com.azure.resourcemanager.eventgrid.models.SubscriptionProvisioningState; +import com.azure.resourcemanager.eventgrid.models.SubscriptionUpdateParameters; + +public final class SubscriptionImpl implements Subscription, Subscription.Definition, Subscription.Update { + private SubscriptionInner innerObject; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public SubscriptionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public DeliveryConfiguration deliveryConfiguration() { + return this.innerModel().deliveryConfiguration(); + } + + public DeliverySchema eventDeliverySchema() { + return this.innerModel().eventDeliverySchema(); + } + + public FiltersConfiguration filtersConfiguration() { + return this.innerModel().filtersConfiguration(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SubscriptionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String namespaceName; + + private String topicName; + + private String eventSubscriptionName; + + private SubscriptionUpdateParameters updateEventSubscriptionUpdateParameters; + + public SubscriptionImpl withExistingTopic(String resourceGroupName, String namespaceName, String topicName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + this.topicName = topicName; + return this; + } + + public Subscription create() { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopicEventSubscriptions() + .createOrUpdate( + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + this.innerModel(), + Context.NONE); + return this; + } + + public Subscription create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopicEventSubscriptions() + .createOrUpdate( + resourceGroupName, namespaceName, topicName, eventSubscriptionName, this.innerModel(), context); + return this; + } + + SubscriptionImpl(String name, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = new SubscriptionInner(); + this.serviceManager = serviceManager; + this.eventSubscriptionName = name; + } + + public SubscriptionImpl update() { + this.updateEventSubscriptionUpdateParameters = new SubscriptionUpdateParameters(); + return this; + } + + public Subscription apply() { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopicEventSubscriptions() + .update( + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + updateEventSubscriptionUpdateParameters, + Context.NONE); + return this; + } + + public Subscription apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopicEventSubscriptions() + .update( + resourceGroupName, + namespaceName, + topicName, + eventSubscriptionName, + updateEventSubscriptionUpdateParameters, + context); + return this; + } + + SubscriptionImpl( + SubscriptionInner innerObject, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.namespaceName = Utils.getValueFromIdByName(innerObject.id(), "namespaces"); + this.topicName = Utils.getValueFromIdByName(innerObject.id(), "topics"); + this.eventSubscriptionName = Utils.getValueFromIdByName(innerObject.id(), "eventSubscriptions"); + } + + public Subscription refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopicEventSubscriptions() + .getWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, Context.NONE) + .getValue(); + return this; + } + + public Subscription refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getNamespaceTopicEventSubscriptions() + .getWithResponse(resourceGroupName, namespaceName, topicName, eventSubscriptionName, context) + .getValue(); + return this; + } + + public SubscriptionImpl withDeliveryConfiguration(DeliveryConfiguration deliveryConfiguration) { + if (isInCreateMode()) { + this.innerModel().withDeliveryConfiguration(deliveryConfiguration); + return this; + } else { + this.updateEventSubscriptionUpdateParameters.withDeliveryConfiguration(deliveryConfiguration); + return this; + } + } + + public SubscriptionImpl withEventDeliverySchema(DeliverySchema eventDeliverySchema) { + if (isInCreateMode()) { + this.innerModel().withEventDeliverySchema(eventDeliverySchema); + return this; + } else { + this.updateEventSubscriptionUpdateParameters.withEventDeliverySchema(eventDeliverySchema); + return this; + } + } + + public SubscriptionImpl withFiltersConfiguration(FiltersConfiguration filtersConfiguration) { + if (isInCreateMode()) { + this.innerModel().withFiltersConfiguration(filtersConfiguration); + return this; + } else { + this.updateEventSubscriptionUpdateParameters.withFiltersConfiguration(filtersConfiguration); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsClientImpl.java index 11cbb56cd12b..a25c6f9aa10c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsClientImpl.java @@ -72,11 +72,25 @@ public final class SystemTopicEventSubscriptionsClientImpl implements SystemTopi */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface SystemTopicEventSubscriptionsService { + public interface SystemTopicEventSubscriptionsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeliveryAttributes( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("systemTopicName") String systemTopicName, + @PathParam("eventSubscriptionName") String eventSubscriptionName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -91,8 +105,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -108,8 +121,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -123,8 +135,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -140,8 +151,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getFullUrl( @@ -156,8 +166,7 @@ Mono> getFullUrl( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics/{systemTopicName}/eventSubscriptions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySystemTopic( @@ -171,22 +180,6 @@ Mono> listBySystemTopic( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics/{systemTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeliveryAttributes( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("systemTopicName") String systemTopicName, - @PathParam("eventSubscriptionName") String eventSubscriptionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -199,7 +192,191 @@ Mono> listBySystemTopicNext( } /** - * Get an event subscription. + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 all delivery attributes for an event subscription along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (systemTopicName == null) { + return Mono + .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getDeliveryAttributes( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + systemTopicName, + eventSubscriptionName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. + * @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 all delivery attributes for an event subscription along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeliveryAttributesWithResponseAsync( + String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (systemTopicName == null) { + return Mono + .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); + } + if (eventSubscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getDeliveryAttributes( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + systemTopicName, + eventSubscriptionName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 all delivery attributes for an event subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeliveryAttributesAsync( + String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. + * @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 all delivery attributes for an event subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeliveryAttributesWithResponse( + String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { + return getDeliveryAttributesWithResponseAsync( + resourceGroupName, systemTopicName, eventSubscriptionName, context) + .block(); + } + + /** + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 all delivery attributes for an event subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeliveryAttributeListResultInner getDeliveryAttributes( + String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponse( + resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE) + .getValue(); + } + + /** + * Get an event subscription of a system topic. + * + *

Get an event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -255,7 +432,9 @@ private Mono> getWithResponseAsync( } /** - * Get an event subscription. + * Get an event subscription of a system topic. + * + *

Get an event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -309,7 +488,9 @@ private Mono> getWithResponseAsync( } /** - * Get an event subscription. + * Get an event subscription of a system topic. + * + *

Get an event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -328,43 +509,49 @@ private Mono getAsync( } /** - * Get an event subscription. + * Get an event subscription of a system topic. + * + *

Get an event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. * @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 an event subscription. + * @return an event subscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner get(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - return getAsync(resourceGroupName, systemTopicName, eventSubscriptionName).block(); + public Response getWithResponse( + String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { + return getWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName, context).block(); } /** - * Get an event subscription. + * Get an event subscription of a system topic. + * + *

Get an event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. - * @param context The context to associate with this operation. * @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 an event subscription along with {@link Response}. + * @return an event subscription. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { - return getWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName, context).block(); + public EventSubscriptionInner get(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + return getWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE).getValue(); } /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -432,7 +619,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -499,7 +688,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -532,7 +723,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -568,7 +761,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -587,13 +782,15 @@ public SyncPoller, EventSubscriptionInner> be String systemTopicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdateAsync( - resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionInfo) + return this + .beginCreateOrUpdateAsync(resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionInfo) .getSyncPoller(); } /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -614,13 +811,16 @@ public SyncPoller, EventSubscriptionInner> be String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionInfo, context) .getSyncPoller(); } /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -646,7 +846,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -674,7 +876,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -698,7 +902,9 @@ public EventSubscriptionInner createOrUpdate( } /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -725,7 +931,9 @@ public EventSubscriptionInner createOrUpdate( } /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -779,7 +987,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -831,7 +1041,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -854,7 +1066,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -878,7 +1092,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -892,11 +1108,13 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - return beginDeleteAsync(resourceGroupName, systemTopicName, eventSubscriptionName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, systemTopicName, eventSubscriptionName).getSyncPoller(); } /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -911,11 +1129,15 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { - return beginDeleteAsync(resourceGroupName, systemTopicName, eventSubscriptionName, context).getSyncPoller(); + return this + .beginDeleteAsync(resourceGroupName, systemTopicName, eventSubscriptionName, context) + .getSyncPoller(); } /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -934,7 +1156,9 @@ private Mono deleteAsync(String resourceGroupName, String systemTopicName, } /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -955,7 +1179,9 @@ private Mono deleteAsync( } /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -971,7 +1197,9 @@ public void delete(String resourceGroupName, String systemTopicName, String even } /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -989,7 +1217,9 @@ public void delete( } /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1058,7 +1288,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1126,7 +1358,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1158,7 +1392,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1193,7 +1429,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1211,13 +1449,16 @@ public SyncPoller, EventSubscriptionInner> be String systemTopicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters) .getSyncPoller(); } /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1237,13 +1478,16 @@ public SyncPoller, EventSubscriptionInner> be String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters, context) .getSyncPoller(); } /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1268,7 +1512,9 @@ private Mono updateAsync( } /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1295,7 +1541,9 @@ private Mono updateAsync( } /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1318,7 +1566,9 @@ public EventSubscriptionInner update( } /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1344,7 +1594,9 @@ public EventSubscriptionInner update( } /** - * Get the full endpoint URL for an event subscription of a system topic. + * Get full URL of an event subscription of a system topic + * + *

Get the full endpoint URL for an event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1401,7 +1653,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for an event subscription of a system topic. + * Get full URL of an event subscription of a system topic + * + *

Get the full endpoint URL for an event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1456,7 +1710,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for an event subscription of a system topic. + * Get full URL of an event subscription of a system topic + * + *

Get the full endpoint URL for an event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1476,44 +1732,51 @@ private Mono getFullUrlAsync( } /** - * Get the full endpoint URL for an event subscription of a system topic. + * Get full URL of an event subscription of a system topic + * + *

Get the full endpoint URL for an event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. * @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 the full endpoint URL for an event subscription of a system topic. + * @return the full endpoint URL for an event subscription of a system topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl( - String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - return getFullUrlAsync(resourceGroupName, systemTopicName, eventSubscriptionName).block(); + public Response getFullUrlWithResponse( + String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { + return getFullUrlWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName, context).block(); } /** - * Get the full endpoint URL for an event subscription of a system topic. + * Get full URL of an event subscription of a system topic + * + *

Get the full endpoint URL for an event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. - * @param context The context to associate with this operation. * @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 the full endpoint URL for an event subscription of a system topic along with {@link Response}. + * @return the full endpoint URL for an event subscription of a system topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse( - String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { - return getFullUrlWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName, context).block(); + public EventSubscriptionFullUrlInner getFullUrl( + String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + return getFullUrlWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, Context.NONE) + .getValue(); } /** - * List event subscriptions that belong to a specific system topic. + * List event subscriptions of a system topic. + * + *

List event subscriptions that belong to a specific system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1582,7 +1845,9 @@ private Mono> listBySystemTopicSinglePageA } /** - * List event subscriptions that belong to a specific system topic. + * List event subscriptions of a system topic. + * + *

List event subscriptions that belong to a specific system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1649,7 +1914,9 @@ private Mono> listBySystemTopicSinglePageA } /** - * List event subscriptions that belong to a specific system topic. + * List event subscriptions of a system topic. + * + *

List event subscriptions that belong to a specific system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1675,7 +1942,9 @@ private PagedFlux listBySystemTopicAsync( } /** - * List event subscriptions that belong to a specific system topic. + * List event subscriptions of a system topic. + * + *

List event subscriptions that belong to a specific system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1694,7 +1963,9 @@ private PagedFlux listBySystemTopicAsync(String resource } /** - * List event subscriptions that belong to a specific system topic. + * List event subscriptions of a system topic. + * + *

List event subscriptions that belong to a specific system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1721,7 +1992,9 @@ private PagedFlux listBySystemTopicAsync( } /** - * List event subscriptions that belong to a specific system topic. + * List event subscriptions of a system topic. + * + *

List event subscriptions that belong to a specific system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1738,7 +2011,9 @@ public PagedIterable listBySystemTopic(String resourceGr } /** - * List event subscriptions that belong to a specific system topic. + * List event subscriptions of a system topic. + * + *

List event subscriptions that belong to a specific system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1762,180 +2037,11 @@ public PagedIterable listBySystemTopic( return new PagedIterable<>(listBySystemTopicAsync(resourceGroupName, systemTopicName, filter, top, context)); } - /** - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 all delivery attributes for an event subscription along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getDeliveryAttributes( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - systemTopicName, - eventSubscriptionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 100 characters in length and use alphanumeric letters only. - * @param context The context to associate with this operation. - * @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 all delivery attributes for an event subscription along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDeliveryAttributesWithResponseAsync( - String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (systemTopicName == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemTopicName is required and cannot be null.")); - } - if (eventSubscriptionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter eventSubscriptionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getDeliveryAttributes( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - systemTopicName, - eventSubscriptionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 all delivery attributes for an event subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDeliveryAttributesAsync( - String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, systemTopicName, eventSubscriptionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 all delivery attributes for an event subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes( - String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - return getDeliveryAttributesAsync(resourceGroupName, systemTopicName, eventSubscriptionName).block(); - } - - /** - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 100 characters in length and use alphanumeric letters only. - * @param context The context to associate with this operation. - * @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 all delivery attributes for an event subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse( - String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { - return getDeliveryAttributesWithResponseAsync( - resourceGroupName, systemTopicName, eventSubscriptionName, context) - .block(); - } - /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1971,7 +2077,8 @@ private Mono> listBySystemTopicNextSingleP /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java index 5ab57a2d839c..1043616f507b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicEventSubscriptionsImpl.java @@ -33,11 +33,29 @@ public SystemTopicEventSubscriptionsImpl( this.serviceManager = serviceManager; } - public EventSubscription get(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - EventSubscriptionInner inner = - this.serviceClient().get(resourceGroupName, systemTopicName, eventSubscriptionName); + public Response getDeliveryAttributesWithResponse( + String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { + Response inner = + this + .serviceClient() + .getDeliveryAttributesWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, context); if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeliveryAttributeListResult getDeliveryAttributes( + String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + DeliveryAttributeListResultInner inner = + this.serviceClient().getDeliveryAttributes(resourceGroupName, systemTopicName, eventSubscriptionName); + if (inner != null) { + return new DeliveryAttributeListResultImpl(inner, this.manager()); } else { return null; } @@ -58,6 +76,16 @@ public Response getWithResponse( } } + public EventSubscription get(String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + EventSubscriptionInner inner = + this.serviceClient().get(resourceGroupName, systemTopicName, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + public EventSubscription createOrUpdate( String resourceGroupName, String systemTopicName, @@ -139,17 +167,6 @@ public EventSubscription update( } } - public EventSubscriptionFullUrl getFullUrl( - String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - EventSubscriptionFullUrlInner inner = - this.serviceClient().getFullUrl(resourceGroupName, systemTopicName, eventSubscriptionName); - if (inner != null) { - return new EventSubscriptionFullUrlImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getFullUrlWithResponse( String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { Response inner = @@ -167,6 +184,17 @@ public Response getFullUrlWithResponse( } } + public EventSubscriptionFullUrl getFullUrl( + String resourceGroupName, String systemTopicName, String eventSubscriptionName) { + EventSubscriptionFullUrlInner inner = + this.serviceClient().getFullUrl(resourceGroupName, systemTopicName, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionFullUrlImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listBySystemTopic(String resourceGroupName, String systemTopicName) { PagedIterable inner = this.serviceClient().listBySystemTopic(resourceGroupName, systemTopicName); @@ -180,34 +208,6 @@ public PagedIterable listBySystemTopic( return Utils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } - public DeliveryAttributeListResult getDeliveryAttributes( - String resourceGroupName, String systemTopicName, String eventSubscriptionName) { - DeliveryAttributeListResultInner inner = - this.serviceClient().getDeliveryAttributes(resourceGroupName, systemTopicName, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getDeliveryAttributesWithResponse( - String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context) { - Response inner = - this - .serviceClient() - .getDeliveryAttributesWithResponse(resourceGroupName, systemTopicName, eventSubscriptionName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DeliveryAttributeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - private SystemTopicEventSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java index c3c01a141f38..6aa664c05801 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicImpl.java @@ -45,14 +45,14 @@ public Map tags() { } } - public IdentityInfo identity() { - return this.innerModel().identity(); - } - public SystemData systemData() { return this.innerModel().systemData(); } + public IdentityInfo identity() { + return this.innerModel().identity(); + } + public ResourceProvisioningState provisioningState() { return this.innerModel().provisioningState(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsClientImpl.java index 54a1a7df25bd..4bf673cf6196 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsClientImpl.java @@ -65,11 +65,10 @@ public final class SystemTopicsClientImpl implements SystemTopicsClient { */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface SystemTopicsService { + public interface SystemTopicsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics/{systemTopicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -83,8 +82,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics/{systemTopicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -99,8 +97,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics/{systemTopicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -113,8 +110,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics/{systemTopicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -142,8 +138,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid" - + "/systemTopics") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -178,7 +173,9 @@ Mono> listByResourceGroupNext( } /** - * Get properties of a system topic. + * Get a system topic. + * + *

Get properties of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -227,7 +224,9 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Get properties of a system topic. + * Get a system topic. + * + *

Get properties of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -274,7 +273,9 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Get properties of a system topic. + * Get a system topic. + * + *

Get properties of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -290,39 +291,45 @@ private Mono getByResourceGroupAsync(String resourceGroupName, } /** - * Get properties of a system topic. + * Get a system topic. + * + *

Get properties of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. + * @param context The context to associate with this operation. * @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 properties of a system topic. + * @return properties of a system topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SystemTopicInner getByResourceGroup(String resourceGroupName, String systemTopicName) { - return getByResourceGroupAsync(resourceGroupName, systemTopicName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String systemTopicName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, systemTopicName, context).block(); } /** - * Get properties of a system topic. + * Get a system topic. + * + *

Get properties of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. - * @param context The context to associate with this operation. * @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 properties of a system topic along with {@link Response}. + * @return properties of a system topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String systemTopicName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, systemTopicName, context).block(); + public SystemTopicInner getByResourceGroup(String resourceGroupName, String systemTopicName) { + return getByResourceGroupWithResponse(resourceGroupName, systemTopicName, Context.NONE).getValue(); } /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -379,7 +386,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -434,7 +443,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -460,7 +471,9 @@ private PollerFlux, SystemTopicInner> beginCreateOr } /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -484,7 +497,9 @@ private PollerFlux, SystemTopicInner> beginCreateOr } /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -497,11 +512,13 @@ private PollerFlux, SystemTopicInner> beginCreateOr @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SystemTopicInner> beginCreateOrUpdate( String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo) { - return beginCreateOrUpdateAsync(resourceGroupName, systemTopicName, systemTopicInfo).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, systemTopicName, systemTopicInfo).getSyncPoller(); } /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -515,11 +532,15 @@ public SyncPoller, SystemTopicInner> beginCreateOrU @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SystemTopicInner> beginCreateOrUpdate( String resourceGroupName, String systemTopicName, SystemTopicInner systemTopicInfo, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, systemTopicName, systemTopicInfo, context).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, systemTopicName, systemTopicInfo, context) + .getSyncPoller(); } /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -538,7 +559,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -558,7 +581,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -575,7 +600,9 @@ public SystemTopicInner createOrUpdate( } /** - * Asynchronously creates a new system topic with the specified parameters. + * Create a system topic. + * + *

Asynchronously creates a new system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -593,7 +620,9 @@ public SystemTopicInner createOrUpdate( } /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -639,7 +668,9 @@ private Mono>> deleteWithResponseAsync(String resource } /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -684,7 +715,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -703,7 +736,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -724,7 +759,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -735,11 +772,13 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String systemTopicName) { - return beginDeleteAsync(resourceGroupName, systemTopicName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, systemTopicName).getSyncPoller(); } /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -752,11 +791,13 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String systemTopicName, Context context) { - return beginDeleteAsync(resourceGroupName, systemTopicName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, systemTopicName, context).getSyncPoller(); } /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -773,7 +814,9 @@ private Mono deleteAsync(String resourceGroupName, String systemTopicName) } /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -791,7 +834,9 @@ private Mono deleteAsync(String resourceGroupName, String systemTopicName, } /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -805,7 +850,9 @@ public void delete(String resourceGroupName, String systemTopicName) { } /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -820,7 +867,9 @@ public void delete(String resourceGroupName, String systemTopicName, Context con } /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -879,7 +928,9 @@ private Mono>> updateWithResponseAsync( } /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -939,7 +990,9 @@ private Mono>> updateWithResponseAsync( } /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -965,7 +1018,9 @@ private PollerFlux, SystemTopicInner> beginUpdateAs } /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -992,7 +1047,9 @@ private PollerFlux, SystemTopicInner> beginUpdateAs } /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1005,11 +1062,13 @@ private PollerFlux, SystemTopicInner> beginUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SystemTopicInner> beginUpdate( String resourceGroupName, String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters) { - return beginUpdateAsync(resourceGroupName, systemTopicName, systemTopicUpdateParameters).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, systemTopicName, systemTopicUpdateParameters).getSyncPoller(); } /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1026,12 +1085,15 @@ public SyncPoller, SystemTopicInner> beginUpdate( String systemTopicName, SystemTopicUpdateParameters systemTopicUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, systemTopicName, systemTopicUpdateParameters, context) + return this + .beginUpdateAsync(resourceGroupName, systemTopicName, systemTopicUpdateParameters, context) .getSyncPoller(); } /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1050,7 +1112,9 @@ private Mono updateAsync( } /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1073,7 +1137,9 @@ private Mono updateAsync( } /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1090,7 +1156,9 @@ public SystemTopicInner update( } /** - * Asynchronously updates a system topic with the specified parameters. + * Update a system topic. + * + *

Asynchronously updates a system topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -1111,7 +1179,9 @@ public SystemTopicInner update( } /** - * List all the system topics under an Azure subscription. + * List system topics under an Azure subscription. + * + *

List all the system topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1167,7 +1237,9 @@ private Mono> listSinglePageAsync(String filter, } /** - * List all the system topics under an Azure subscription. + * List system topics under an Azure subscription. + * + *

List all the system topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1221,7 +1293,9 @@ private Mono> listSinglePageAsync(String filter, } /** - * List all the system topics under an Azure subscription. + * List system topics under an Azure subscription. + * + *

List all the system topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1243,7 +1317,9 @@ private PagedFlux listAsync(String filter, Integer top) { } /** - * List all the system topics under an Azure subscription. + * List system topics under an Azure subscription. + * + *

List all the system topics under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1258,7 +1334,9 @@ private PagedFlux listAsync() { } /** - * List all the system topics under an Azure subscription. + * List system topics under an Azure subscription. + * + *

List all the system topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1282,7 +1360,9 @@ private PagedFlux listAsync(String filter, Integer top, Contex } /** - * List all the system topics under an Azure subscription. + * List system topics under an Azure subscription. + * + *

List all the system topics under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1296,7 +1376,9 @@ public PagedIterable list() { } /** - * List all the system topics under an Azure subscription. + * List system topics under an Azure subscription. + * + *

List all the system topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1318,7 +1400,9 @@ public PagedIterable list(String filter, Integer top, Context } /** - * List all the system topics under a resource group. + * List system topics under a resource group. + * + *

List all the system topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1381,7 +1465,9 @@ private Mono> listByResourceGroupSinglePageAsync } /** - * List all the system topics under a resource group. + * List system topics under a resource group. + * + *

List all the system topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1442,7 +1528,9 @@ private Mono> listByResourceGroupSinglePageAsync } /** - * List all the system topics under a resource group. + * List system topics under a resource group. + * + *

List all the system topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1466,7 +1554,9 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou } /** - * List all the system topics under a resource group. + * List system topics under a resource group. + * + *

List all the system topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1484,7 +1574,9 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou } /** - * List all the system topics under a resource group. + * List system topics under a resource group. + * + *

List all the system topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1510,7 +1602,9 @@ private PagedFlux listByResourceGroupAsync( } /** - * List all the system topics under a resource group. + * List system topics under a resource group. + * + *

List all the system topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1526,7 +1620,9 @@ public PagedIterable listByResourceGroup(String resourceGroupN } /** - * List all the system topics under a resource group. + * List system topics under a resource group. + * + *

List all the system topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1552,7 +1648,8 @@ public PagedIterable listByResourceGroup( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1589,7 +1686,8 @@ private Mono> listBySubscriptionNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1627,7 +1725,8 @@ private Mono> listBySubscriptionNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1664,7 +1763,8 @@ private Mono> listByResourceGroupNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java index a65d3279f734..d3e7b011a969 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/SystemTopicsImpl.java @@ -27,15 +27,6 @@ public SystemTopicsImpl( this.serviceManager = serviceManager; } - public SystemTopic getByResourceGroup(String resourceGroupName, String systemTopicName) { - SystemTopicInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, systemTopicName); - if (inner != null) { - return new SystemTopicImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String systemTopicName, Context context) { Response inner = @@ -51,6 +42,15 @@ public Response getByResourceGroupWithResponse( } } + public SystemTopic getByResourceGroup(String resourceGroupName, String systemTopicName) { + SystemTopicInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, systemTopicName); + if (inner != null) { + return new SystemTopicImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String systemTopicName) { this.serviceClient().delete(resourceGroupName, systemTopicName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsClientImpl.java index 2d89bdccd5e4..1ed2fa791716 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsClientImpl.java @@ -69,11 +69,10 @@ public final class TopicEventSubscriptionsClientImpl implements TopicEventSubscr */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface TopicEventSubscriptionsService { + public interface TopicEventSubscriptionsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDeliveryAttributes( @@ -88,8 +87,7 @@ Mono> getDeliveryAttributes( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -104,8 +102,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -121,8 +118,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -136,8 +132,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}/eventSubscriptions/{eventSubscriptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -153,8 +148,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getFullUrl( @@ -169,8 +163,7 @@ Mono> getFullUrl( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}/eventSubscriptions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -196,10 +189,12 @@ Mono> listNext( } /** - * Get all delivery attributes for an event subscription for topic. + * Get delivery attributes for an event subscription for topic. + * + *

Get all delivery attributes for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -251,10 +246,12 @@ private Mono> getDeliveryAttributesWi } /** - * Get all delivery attributes for an event subscription for topic. + * Get delivery attributes for an event subscription for topic. + * + *

Get all delivery attributes for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -304,10 +301,12 @@ private Mono> getDeliveryAttributesWi } /** - * Get all delivery attributes for an event subscription for topic. + * Get delivery attributes for an event subscription for topic. + * + *

Get all delivery attributes for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -322,46 +321,53 @@ private Mono getDeliveryAttributesAsync( } /** - * Get all delivery attributes for an event subscription for topic. + * Get delivery attributes for an event subscription for topic. + * + *

Get all delivery attributes for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. * @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 all delivery attributes for an event subscription for topic. + * @return all delivery attributes for an event subscription for topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeliveryAttributeListResultInner getDeliveryAttributes( - String resourceGroupName, String topicName, String eventSubscriptionName) { - return getDeliveryAttributesAsync(resourceGroupName, topicName, eventSubscriptionName).block(); + public Response getDeliveryAttributesWithResponse( + String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { + return getDeliveryAttributesWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName, context) + .block(); } /** - * Get all delivery attributes for an event subscription for topic. + * Get delivery attributes for an event subscription for topic. + * + *

Get all delivery attributes for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. * @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 all delivery attributes for an event subscription for topic along with {@link Response}. + * @return all delivery attributes for an event subscription for topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDeliveryAttributesWithResponse( - String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { - return getDeliveryAttributesWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName, context) - .block(); + public DeliveryAttributeListResultInner getDeliveryAttributes( + String resourceGroupName, String topicName, String eventSubscriptionName) { + return getDeliveryAttributesWithResponse(resourceGroupName, topicName, eventSubscriptionName, Context.NONE) + .getValue(); } /** - * Get properties of an event subscription of a topic. + * Get an event subscription of a topic. + * + *

Get properties of an event subscription of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the partner topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -414,10 +420,12 @@ private Mono> getWithResponseAsync( } /** - * Get properties of an event subscription of a topic. + * Get an event subscription of a topic. + * + *

Get properties of an event subscription of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the partner topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. * @param context The context to associate with this operation. @@ -468,10 +476,12 @@ private Mono> getWithResponseAsync( } /** - * Get properties of an event subscription of a topic. + * Get an event subscription of a topic. + * + *

Get properties of an event subscription of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the partner topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -487,43 +497,49 @@ private Mono getAsync( } /** - * Get properties of an event subscription of a topic. + * Get an event subscription of a topic. + * + *

Get properties of an event subscription of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the partner topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. + * @param context The context to associate with this operation. * @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 properties of an event subscription of a topic. + * @return properties of an event subscription of a topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionInner get(String resourceGroupName, String topicName, String eventSubscriptionName) { - return getAsync(resourceGroupName, topicName, eventSubscriptionName).block(); + public Response getWithResponse( + String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { + return getWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName, context).block(); } /** - * Get properties of an event subscription of a topic. + * Get an event subscription of a topic. + * + *

Get properties of an event subscription of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the partner topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. - * @param context The context to associate with this operation. * @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 properties of an event subscription of a topic along with {@link Response}. + * @return properties of an event subscription of a topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { - return getWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName, context).block(); + public EventSubscriptionInner get(String resourceGroupName, String topicName, String eventSubscriptionName) { + return getWithResponse(resourceGroupName, topicName, eventSubscriptionName, Context.NONE).getValue(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -589,7 +605,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -654,7 +672,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -685,7 +705,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -720,7 +742,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -738,12 +762,15 @@ public SyncPoller, EventSubscriptionInner> be String topicName, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { - return beginCreateOrUpdateAsync(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo) + return this + .beginCreateOrUpdateAsync(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo) .getSyncPoller(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -763,13 +790,16 @@ public SyncPoller, EventSubscriptionInner> be String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo, context) .getSyncPoller(); } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -793,7 +823,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -820,7 +852,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -842,7 +876,9 @@ public EventSubscriptionInner createOrUpdate( } /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -867,7 +903,9 @@ public EventSubscriptionInner createOrUpdate( } /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -920,7 +958,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -971,7 +1011,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -994,7 +1036,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1018,7 +1062,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1032,11 +1078,13 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String topicName, String eventSubscriptionName) { - return beginDeleteAsync(resourceGroupName, topicName, eventSubscriptionName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, topicName, eventSubscriptionName).getSyncPoller(); } /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1051,11 +1099,13 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { - return beginDeleteAsync(resourceGroupName, topicName, eventSubscriptionName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, topicName, eventSubscriptionName, context).getSyncPoller(); } /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1074,7 +1124,9 @@ private Mono deleteAsync(String resourceGroupName, String topicName, Strin } /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1095,7 +1147,9 @@ private Mono deleteAsync( } /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1111,7 +1165,9 @@ public void delete(String resourceGroupName, String topicName, String eventSubsc } /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1128,7 +1184,9 @@ public void delete(String resourceGroupName, String topicName, String eventSubsc } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -1195,7 +1253,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -1261,7 +1321,9 @@ private Mono>> updateWithResponseAsync( } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -1292,7 +1354,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -1326,7 +1390,9 @@ private PollerFlux, EventSubscriptionInner> b } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -1343,12 +1409,15 @@ public SyncPoller, EventSubscriptionInner> be String topicName, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { - return beginUpdateAsync(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters) + return this + .beginUpdateAsync(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters) .getSyncPoller(); } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -1367,13 +1436,16 @@ public SyncPoller, EventSubscriptionInner> be String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Context context) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters, context) .getSyncPoller(); } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -1396,7 +1468,9 @@ private Mono updateAsync( } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -1422,7 +1496,9 @@ private Mono updateAsync( } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -1444,7 +1520,9 @@ public EventSubscriptionInner update( } /** - * Update an existing event subscription for a topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain. @@ -1469,7 +1547,9 @@ public EventSubscriptionInner update( } /** - * Get the full endpoint URL for an event subscription for topic. + * Get full URL of an event subscription for topic. + * + *

Get the full endpoint URL for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -1524,7 +1604,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for an event subscription for topic. + * Get full URL of an event subscription for topic. + * + *

Get the full endpoint URL for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -1577,7 +1659,9 @@ private Mono> getFullUrlWithResponseAsyn } /** - * Get the full endpoint URL for an event subscription for topic. + * Get full URL of an event subscription for topic. + * + *

Get the full endpoint URL for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -1595,42 +1679,48 @@ private Mono getFullUrlAsync( } /** - * Get the full endpoint URL for an event subscription for topic. + * Get full URL of an event subscription for topic. + * + *

Get the full endpoint URL for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. + * @param context The context to associate with this operation. * @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 the full endpoint URL for an event subscription for topic. + * @return the full endpoint URL for an event subscription for topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EventSubscriptionFullUrlInner getFullUrl( - String resourceGroupName, String topicName, String eventSubscriptionName) { - return getFullUrlAsync(resourceGroupName, topicName, eventSubscriptionName).block(); + public Response getFullUrlWithResponse( + String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { + return getFullUrlWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName, context).block(); } /** - * Get the full endpoint URL for an event subscription for topic. + * Get full URL of an event subscription for topic. + * + *

Get the full endpoint URL for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. - * @param context The context to associate with this operation. * @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 the full endpoint URL for an event subscription for topic along with {@link Response}. + * @return the full endpoint URL for an event subscription for topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getFullUrlWithResponse( - String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { - return getFullUrlWithResponseAsync(resourceGroupName, topicName, eventSubscriptionName, context).block(); + public EventSubscriptionFullUrlInner getFullUrl( + String resourceGroupName, String topicName, String eventSubscriptionName) { + return getFullUrlWithResponse(resourceGroupName, topicName, eventSubscriptionName, Context.NONE).getValue(); } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific topic. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1698,7 +1788,9 @@ private Mono> listSinglePageAsync( } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific topic. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1764,7 +1856,9 @@ private Mono> listSinglePageAsync( } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific topic. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1790,7 +1884,9 @@ private PagedFlux listAsync( } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific topic. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1809,7 +1905,9 @@ private PagedFlux listAsync(String resourceGroupName, St } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific topic. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1836,7 +1934,9 @@ private PagedFlux listAsync( } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific topic. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1853,7 +1953,9 @@ public PagedIterable list(String resourceGroupName, Stri } /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific topic. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1880,7 +1982,8 @@ public PagedIterable list( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -1916,7 +2019,8 @@ private Mono> listNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java index f17c40ac130c..75ac6cfb8a95 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicEventSubscriptionsImpl.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.eventgrid.models.DeliveryAttributeListResult; import com.azure.resourcemanager.eventgrid.models.EventSubscription; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFullUrl; +import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; import com.azure.resourcemanager.eventgrid.models.TopicEventSubscriptions; public final class TopicEventSubscriptionsImpl implements TopicEventSubscriptions { @@ -32,17 +33,6 @@ public TopicEventSubscriptionsImpl( this.serviceManager = serviceManager; } - public DeliveryAttributeListResult getDeliveryAttributes( - String resourceGroupName, String topicName, String eventSubscriptionName) { - DeliveryAttributeListResultInner inner = - this.serviceClient().getDeliveryAttributes(resourceGroupName, topicName, eventSubscriptionName); - if (inner != null) { - return new DeliveryAttributeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getDeliveryAttributesWithResponse( String resourceGroupName, String topicName, String eventSubscriptionName, Context context) { Response inner = @@ -60,10 +50,12 @@ public Response getDeliveryAttributesWithResponse( } } - public EventSubscription get(String resourceGroupName, String topicName, String eventSubscriptionName) { - EventSubscriptionInner inner = this.serviceClient().get(resourceGroupName, topicName, eventSubscriptionName); + public DeliveryAttributeListResult getDeliveryAttributes( + String resourceGroupName, String topicName, String eventSubscriptionName) { + DeliveryAttributeListResultInner inner = + this.serviceClient().getDeliveryAttributes(resourceGroupName, topicName, eventSubscriptionName); if (inner != null) { - return new EventSubscriptionImpl(inner, this.manager()); + return new DeliveryAttributeListResultImpl(inner, this.manager()); } else { return null; } @@ -84,6 +76,48 @@ public Response getWithResponse( } } + public EventSubscription get(String resourceGroupName, String topicName, String eventSubscriptionName) { + EventSubscriptionInner inner = this.serviceClient().get(resourceGroupName, topicName, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public EventSubscription createOrUpdate( + String resourceGroupName, + String topicName, + String eventSubscriptionName, + EventSubscriptionInner eventSubscriptionInfo) { + EventSubscriptionInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo); + if (inner != null) { + return new EventSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public EventSubscription createOrUpdate( + String resourceGroupName, + String topicName, + String eventSubscriptionName, + EventSubscriptionInner eventSubscriptionInfo, + Context context) { + EventSubscriptionInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo, context); + if (inner != null) { + return new EventSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String topicName, String eventSubscriptionName) { this.serviceClient().delete(resourceGroupName, topicName, eventSubscriptionName); } @@ -92,12 +126,35 @@ public void delete(String resourceGroupName, String topicName, String eventSubsc this.serviceClient().delete(resourceGroupName, topicName, eventSubscriptionName, context); } - public EventSubscriptionFullUrl getFullUrl( - String resourceGroupName, String topicName, String eventSubscriptionName) { - EventSubscriptionFullUrlInner inner = - this.serviceClient().getFullUrl(resourceGroupName, topicName, eventSubscriptionName); + public EventSubscription update( + String resourceGroupName, + String topicName, + String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) { + EventSubscriptionInner inner = + this + .serviceClient() + .update(resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters); if (inner != null) { - return new EventSubscriptionFullUrlImpl(inner, this.manager()); + return new EventSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public EventSubscription update( + String resourceGroupName, + String topicName, + String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context) { + EventSubscriptionInner inner = + this + .serviceClient() + .update( + resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters, context); + if (inner != null) { + return new EventSubscriptionImpl(inner, this.manager()); } else { return null; } @@ -118,6 +175,17 @@ public Response getFullUrlWithResponse( } } + public EventSubscriptionFullUrl getFullUrl( + String resourceGroupName, String topicName, String eventSubscriptionName) { + EventSubscriptionFullUrlInner inner = + this.serviceClient().getFullUrl(resourceGroupName, topicName, eventSubscriptionName); + if (inner != null) { + return new EventSubscriptionFullUrlImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list(String resourceGroupName, String topicName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, topicName); return Utils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); @@ -130,118 +198,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new EventSubscriptionImpl(inner1, this.manager())); } - public EventSubscription getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String topicName = Utils.getValueFromIdByName(id, "topics"); - if (topicName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); - if (eventSubscriptionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } - return this.getWithResponse(resourceGroupName, topicName, eventSubscriptionName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String topicName = Utils.getValueFromIdByName(id, "topics"); - if (topicName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); - if (eventSubscriptionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } - return this.getWithResponse(resourceGroupName, topicName, eventSubscriptionName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String topicName = Utils.getValueFromIdByName(id, "topics"); - if (topicName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); - if (eventSubscriptionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } - this.delete(resourceGroupName, topicName, eventSubscriptionName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String topicName = Utils.getValueFromIdByName(id, "topics"); - if (topicName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'topics'.", id))); - } - String eventSubscriptionName = Utils.getValueFromIdByName(id, "eventSubscriptions"); - if (eventSubscriptionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'eventSubscriptions'.", id))); - } - this.delete(resourceGroupName, topicName, eventSubscriptionName, context); - } - private TopicEventSubscriptionsClient serviceClient() { return this.innerClient; } @@ -249,8 +205,4 @@ private TopicEventSubscriptionsClient serviceClient() { private com.azure.resourcemanager.eventgrid.EventGridManager manager() { return this.serviceManager; } - - public EventSubscriptionImpl define(String name) { - return new EventSubscriptionImpl(name, this.manager()); - } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java index 260352a2b106..36a2cda4aeaa 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicImpl.java @@ -11,12 +11,17 @@ import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.eventgrid.fluent.models.TopicInner; import com.azure.resourcemanager.eventgrid.models.DataResidencyBoundary; +import com.azure.resourcemanager.eventgrid.models.EventTypeInfo; +import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; import com.azure.resourcemanager.eventgrid.models.IdentityInfo; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.InputSchemaMapping; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnection; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.ResourceKind; +import com.azure.resourcemanager.eventgrid.models.ResourceSku; +import com.azure.resourcemanager.eventgrid.models.TlsVersion; import com.azure.resourcemanager.eventgrid.models.Topic; import com.azure.resourcemanager.eventgrid.models.TopicProvisioningState; import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; @@ -57,10 +62,22 @@ public Map tags() { } } + public ResourceSku sku() { + return this.innerModel().sku(); + } + public IdentityInfo identity() { return this.innerModel().identity(); } + public ResourceKind kind() { + return this.innerModel().kind(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -87,6 +104,14 @@ public String endpoint() { return this.innerModel().endpoint(); } + public EventTypeInfo eventTypeInfo() { + return this.innerModel().eventTypeInfo(); + } + + public TlsVersion minimumTlsVersionAllowed() { + return this.innerModel().minimumTlsVersionAllowed(); + } + public InputSchema inputSchema() { return this.innerModel().inputSchema(); } @@ -225,14 +250,14 @@ public Topic refresh(Context context) { return this; } - public TopicSharedAccessKeys listSharedAccessKeys() { - return serviceManager.topics().listSharedAccessKeys(resourceGroupName, topicName); - } - public Response listSharedAccessKeysWithResponse(Context context) { return serviceManager.topics().listSharedAccessKeysWithResponse(resourceGroupName, topicName, context); } + public TopicSharedAccessKeys listSharedAccessKeys() { + return serviceManager.topics().listSharedAccessKeys(resourceGroupName, topicName); + } + public TopicSharedAccessKeys regenerateKey(TopicRegenerateKeyRequest regenerateKeyRequest) { return serviceManager.topics().regenerateKey(resourceGroupName, topicName, regenerateKeyRequest); } @@ -261,6 +286,16 @@ public TopicImpl withTags(Map tags) { } } + public TopicImpl withSku(ResourceSku sku) { + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updateTopicUpdateParameters.withSku(sku); + return this; + } + } + public TopicImpl withIdentity(IdentityInfo identity) { if (isInCreateMode()) { this.innerModel().withIdentity(identity); @@ -271,6 +306,36 @@ public TopicImpl withIdentity(IdentityInfo identity) { } } + public TopicImpl withKind(ResourceKind kind) { + this.innerModel().withKind(kind); + return this; + } + + public TopicImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + public TopicImpl withEventTypeInfo(EventTypeInfo eventTypeInfo) { + if (isInCreateMode()) { + this.innerModel().withEventTypeInfo(eventTypeInfo); + return this; + } else { + this.updateTopicUpdateParameters.withEventTypeInfo(eventTypeInfo); + return this; + } + } + + public TopicImpl withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + if (isInCreateMode()) { + this.innerModel().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } else { + this.updateTopicUpdateParameters.withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + } + public TopicImpl withInputSchema(InputSchema inputSchema) { this.innerModel().withInputSchema(inputSchema); return this; diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java new file mode 100644 index 000000000000..69fb6b9dbdf6 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpaceImpl.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceInner; +import com.azure.resourcemanager.eventgrid.models.TopicSpace; +import com.azure.resourcemanager.eventgrid.models.TopicSpaceProvisioningState; +import java.util.Collections; +import java.util.List; + +public final class TopicSpaceImpl implements TopicSpace, TopicSpace.Definition, TopicSpace.Update { + private TopicSpaceInner innerObject; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String description() { + return this.innerModel().description(); + } + + public List topicTemplates() { + List inner = this.innerModel().topicTemplates(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public TopicSpaceProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public TopicSpaceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String namespaceName; + + private String topicSpaceName; + + public TopicSpaceImpl withExistingNamespace(String resourceGroupName, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.namespaceName = namespaceName; + return this; + } + + public TopicSpace create() { + this.innerObject = + serviceManager + .serviceClient() + .getTopicSpaces() + .createOrUpdate(resourceGroupName, namespaceName, topicSpaceName, this.innerModel(), Context.NONE); + return this; + } + + public TopicSpace create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getTopicSpaces() + .createOrUpdate(resourceGroupName, namespaceName, topicSpaceName, this.innerModel(), context); + return this; + } + + TopicSpaceImpl(String name, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = new TopicSpaceInner(); + this.serviceManager = serviceManager; + this.topicSpaceName = name; + } + + public TopicSpaceImpl update() { + return this; + } + + public TopicSpace apply() { + this.innerObject = + serviceManager + .serviceClient() + .getTopicSpaces() + .createOrUpdate(resourceGroupName, namespaceName, topicSpaceName, this.innerModel(), Context.NONE); + return this; + } + + public TopicSpace apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getTopicSpaces() + .createOrUpdate(resourceGroupName, namespaceName, topicSpaceName, this.innerModel(), context); + return this; + } + + TopicSpaceImpl(TopicSpaceInner innerObject, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.namespaceName = Utils.getValueFromIdByName(innerObject.id(), "namespaces"); + this.topicSpaceName = Utils.getValueFromIdByName(innerObject.id(), "topicSpaces"); + } + + public TopicSpace refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getTopicSpaces() + .getWithResponse(resourceGroupName, namespaceName, topicSpaceName, Context.NONE) + .getValue(); + return this; + } + + public TopicSpace refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getTopicSpaces() + .getWithResponse(resourceGroupName, namespaceName, topicSpaceName, context) + .getValue(); + return this; + } + + public TopicSpaceImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public TopicSpaceImpl withTopicTemplates(List topicTemplates) { + this.innerModel().withTopicTemplates(topicTemplates); + return this; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesClientImpl.java new file mode 100644 index 000000000000..3128d7180314 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesClientImpl.java @@ -0,0 +1,1243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient; +import com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceInner; +import com.azure.resourcemanager.eventgrid.models.TopicSpacesListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in TopicSpacesClient. */ +public final class TopicSpacesClientImpl implements TopicSpacesClient { + /** The proxy service used to perform REST calls. */ + private final TopicSpacesService service; + + /** The service client containing this operation class. */ + private final EventGridManagementClientImpl client; + + /** + * Initializes an instance of TopicSpacesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TopicSpacesClientImpl(EventGridManagementClientImpl client) { + this.service = + RestProxy.create(TopicSpacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for EventGridManagementClientTopicSpaces to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "EventGridManagementC") + public interface TopicSpacesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicSpaceName") String topicSpaceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicSpaceName") String topicSpaceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") TopicSpaceInner topicSpaceInfo, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces/{topicSpaceName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @PathParam("topicSpaceName") String topicSpaceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topicSpaces") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespace( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("namespaceName") String namespaceName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByNamespaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get a topic space. + * + *

Get properties of a topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 properties of a topic space along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String topicSpaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicSpaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicSpaceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a topic space. + * + *

Get properties of a topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @param context The context to associate with this operation. + * @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 properties of a topic space along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicSpaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicSpaceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get a topic space. + * + *

Get properties of a topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 properties of a topic space on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String namespaceName, String topicSpaceName) { + return getWithResponseAsync(resourceGroupName, namespaceName, topicSpaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a topic space. + * + *

Get properties of a topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @param context The context to associate with this operation. + * @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 properties of a topic space along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { + return getWithResponseAsync(resourceGroupName, namespaceName, topicSpaceName, context).block(); + } + + /** + * Get a topic space. + * + *

Get properties of a topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 properties of a topic space. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopicSpaceInner get(String resourceGroupName, String namespaceName, String topicSpaceName) { + return getWithResponse(resourceGroupName, namespaceName, topicSpaceName, Context.NONE).getValue(); + } + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @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 the Topic space resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicSpaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); + } + if (topicSpaceInfo == null) { + return Mono.error(new IllegalArgumentException("Parameter topicSpaceInfo is required and cannot be null.")); + } else { + topicSpaceInfo.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicSpaceName, + this.client.getApiVersion(), + topicSpaceInfo, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @param context The context to associate with this operation. + * @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 the Topic space resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String namespaceName, + String topicSpaceName, + TopicSpaceInner topicSpaceInfo, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicSpaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); + } + if (topicSpaceInfo == null) { + return Mono.error(new IllegalArgumentException("Parameter topicSpaceInfo is required and cannot be null.")); + } else { + topicSpaceInfo.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicSpaceName, + this.client.getApiVersion(), + topicSpaceInfo, + accept, + context); + } + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @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 the {@link PollerFlux} for polling of the Topic space resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, TopicSpaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + TopicSpaceInner.class, + TopicSpaceInner.class, + this.client.getContext()); + } + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of the Topic space resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, TopicSpaceInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicSpaceName, + TopicSpaceInner topicSpaceInfo, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), TopicSpaceInner.class, TopicSpaceInner.class, context); + } + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @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 the {@link SyncPoller} for polling of the Topic space resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TopicSpaceInner> beginCreateOrUpdate( + String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo) + .getSyncPoller(); + } + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of the Topic space resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, TopicSpaceInner> beginCreateOrUpdate( + String resourceGroupName, + String namespaceName, + String topicSpaceName, + TopicSpaceInner topicSpaceInfo, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo, context) + .getSyncPoller(); + } + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @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 the Topic space resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @param context The context to associate with this operation. + * @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 the Topic space resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String namespaceName, + String topicSpaceName, + TopicSpaceInner topicSpaceInfo, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @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 the Topic space resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopicSpaceInner createOrUpdate( + String resourceGroupName, String namespaceName, String topicSpaceName, TopicSpaceInner topicSpaceInfo) { + return createOrUpdateAsync(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo).block(); + } + + /** + * Create or update a topic space. + * + *

Create or update a topic space with the specified parameters. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName The topic space name. + * @param topicSpaceInfo Topic space information. + * @param context The context to associate with this operation. + * @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 the Topic space resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopicSpaceInner createOrUpdate( + String resourceGroupName, + String namespaceName, + String topicSpaceName, + TopicSpaceInner topicSpaceInfo, + Context context) { + return createOrUpdateAsync(resourceGroupName, namespaceName, topicSpaceName, topicSpaceInfo, context).block(); + } + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String topicSpaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicSpaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicSpaceName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @param context The context to associate with this operation. + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (topicSpaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter topicSpaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + topicSpaceName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String topicSpaceName) { + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, topicSpaceName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @param context The context to associate with this operation. + * @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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, namespaceName, topicSpaceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String topicSpaceName) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, topicSpaceName).getSyncPoller(); + } + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @param context The context to associate with this operation. + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { + return this.beginDeleteAsync(resourceGroupName, namespaceName, topicSpaceName, context).getSyncPoller(); + } + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String namespaceName, String topicSpaceName) { + return beginDeleteAsync(resourceGroupName, namespaceName, topicSpaceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @param context The context to associate with this operation. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { + return beginDeleteAsync(resourceGroupName, namespaceName, topicSpaceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String topicSpaceName) { + deleteAsync(resourceGroupName, namespaceName, topicSpaceName).block(); + } + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @param context The context to associate with this operation. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { + deleteAsync(resourceGroupName, namespaceName, topicSpaceName, context).block(); + } + + /** + * List all topic spaces under a namespace. + * + *

Get all the topic spaces under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the topic spaces under a namespace along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all topic spaces under a namespace. + * + *

Get all the topic spaces under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the topic spaces under a namespace along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceSinglePageAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespace( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + namespaceName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all topic spaces under a namespace. + * + *

Get all the topic spaces under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the topic spaces under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List all topic spaces under a namespace. + * + *

Get all the topic spaces under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the topic spaces under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink)); + } + + /** + * List all topic spaces under a namespace. + * + *

Get all the topic spaces under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the topic spaces under a namespace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByNamespaceAsync( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, filter, top, context), + nextLink -> listByNamespaceNextSinglePageAsync(nextLink, context)); + } + + /** + * List all topic spaces under a namespace. + * + *

Get all the topic spaces under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top)); + } + + /** + * List all topic spaces under a namespace. + * + *

Get all the topic spaces under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @param context The context to associate with this operation. + * @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 all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName, filter, top, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @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 result of the List Topic Space operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @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 result of the List Topic Space operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByNamespaceNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByNamespaceNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java new file mode 100644 index 000000000000..8f499f121d94 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicSpacesImpl.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.eventgrid.fluent.TopicSpacesClient; +import com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceInner; +import com.azure.resourcemanager.eventgrid.models.TopicSpace; +import com.azure.resourcemanager.eventgrid.models.TopicSpaces; + +public final class TopicSpacesImpl implements TopicSpaces { + private static final ClientLogger LOGGER = new ClientLogger(TopicSpacesImpl.class); + + private final TopicSpacesClient innerClient; + + private final com.azure.resourcemanager.eventgrid.EventGridManager serviceManager; + + public TopicSpacesImpl( + TopicSpacesClient innerClient, com.azure.resourcemanager.eventgrid.EventGridManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, namespaceName, topicSpaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TopicSpaceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public TopicSpace get(String resourceGroupName, String namespaceName, String topicSpaceName) { + TopicSpaceInner inner = this.serviceClient().get(resourceGroupName, namespaceName, topicSpaceName); + if (inner != null) { + return new TopicSpaceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String namespaceName, String topicSpaceName) { + this.serviceClient().delete(resourceGroupName, namespaceName, topicSpaceName); + } + + public void delete(String resourceGroupName, String namespaceName, String topicSpaceName, Context context) { + this.serviceClient().delete(resourceGroupName, namespaceName, topicSpaceName, context); + } + + public PagedIterable listByNamespace(String resourceGroupName, String namespaceName) { + PagedIterable inner = this.serviceClient().listByNamespace(resourceGroupName, namespaceName); + return Utils.mapPage(inner, inner1 -> new TopicSpaceImpl(inner1, this.manager())); + } + + public PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().listByNamespace(resourceGroupName, namespaceName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new TopicSpaceImpl(inner1, this.manager())); + } + + public TopicSpace getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicSpaceName = Utils.getValueFromIdByName(id, "topicSpaces"); + if (topicSpaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topicSpaces'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, topicSpaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicSpaceName = Utils.getValueFromIdByName(id, "topicSpaces"); + if (topicSpaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topicSpaces'.", id))); + } + return this.getWithResponse(resourceGroupName, namespaceName, topicSpaceName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicSpaceName = Utils.getValueFromIdByName(id, "topicSpaces"); + if (topicSpaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topicSpaces'.", id))); + } + this.delete(resourceGroupName, namespaceName, topicSpaceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "namespaces"); + if (namespaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'namespaces'.", id))); + } + String topicSpaceName = Utils.getValueFromIdByName(id, "topicSpaces"); + if (topicSpaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'topicSpaces'.", id))); + } + this.delete(resourceGroupName, namespaceName, topicSpaceName, context); + } + + private TopicSpacesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.eventgrid.EventGridManager manager() { + return this.serviceManager; + } + + public TopicSpaceImpl define(String name) { + return new TopicSpaceImpl(name, this.manager()); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypeInfoImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypeInfoImpl.java index daae253e009e..e3b720aea6df 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypeInfoImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypeInfoImpl.java @@ -77,6 +77,10 @@ public List supportedScopesForSource() { } } + public Boolean areRegionalAndGlobalSourcesSupported() { + return this.innerModel().areRegionalAndGlobalSourcesSupported(); + } + public TopicTypeInfoInner innerModel() { return this.innerObject; } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java index 37096dcad7cb..b3ec8bf35e75 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesClientImpl.java @@ -57,7 +57,7 @@ public final class TopicTypesClientImpl implements TopicTypesClient { */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface TopicTypesService { + public interface TopicTypesService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.EventGrid/topicTypes") @ExpectedResponses({200}) @@ -92,7 +92,9 @@ Mono> listEventTypes( } /** - * List all registered topic types. + * List topic types. + * + *

List all registered topic types. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -119,7 +121,9 @@ private Mono> listSinglePageAsync() { } /** - * List all registered topic types. + * List topic types. + * + *

List all registered topic types. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -147,7 +151,9 @@ private Mono> listSinglePageAsync(Context cont } /** - * List all registered topic types. + * List topic types. + * + *

List all registered topic types. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -159,7 +165,9 @@ private PagedFlux listAsync() { } /** - * List all registered topic types. + * List topic types. + * + *

List all registered topic types. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -173,7 +181,9 @@ private PagedFlux listAsync(Context context) { } /** - * List all registered topic types. + * List topic types. + * + *

List all registered topic types. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -185,7 +195,9 @@ public PagedIterable list() { } /** - * List all registered topic types. + * List topic types. + * + *

List all registered topic types. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -199,7 +211,9 @@ public PagedIterable list(Context context) { } /** - * Get information about a topic type. + * Get a topic type. + * + *

Get information about a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -227,7 +241,9 @@ private Mono> getWithResponseAsync(String topicType } /** - * Get information about a topic type. + * Get a topic type. + * + *

Get information about a topic type. * * @param topicTypeName Name of the topic type. * @param context The context to associate with this operation. @@ -253,7 +269,9 @@ private Mono> getWithResponseAsync(String topicType } /** - * Get information about a topic type. + * Get a topic type. + * + *

Get information about a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,36 +285,42 @@ private Mono getAsync(String topicTypeName) { } /** - * Get information about a topic type. + * Get a topic type. + * + *

Get information about a topic type. * * @param topicTypeName Name of the topic type. + * @param context The context to associate with this operation. * @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 information about a topic type. + * @return information about a topic type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TopicTypeInfoInner get(String topicTypeName) { - return getAsync(topicTypeName).block(); + public Response getWithResponse(String topicTypeName, Context context) { + return getWithResponseAsync(topicTypeName, context).block(); } /** - * Get information about a topic type. + * Get a topic type. + * + *

Get information about a topic type. * * @param topicTypeName Name of the topic type. - * @param context The context to associate with this operation. * @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 information about a topic type along with {@link Response}. + * @return information about a topic type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String topicTypeName, Context context) { - return getWithResponseAsync(topicTypeName, context).block(); + public TopicTypeInfoInner get(String topicTypeName) { + return getWithResponse(topicTypeName, Context.NONE).getValue(); } /** - * List event types for a topic type. + * List event types. + * + *

List event types for a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -331,7 +355,9 @@ private Mono> listEventTypesSinglePageAsync(String } /** - * List event types for a topic type. + * List event types. + * + *

List event types for a topic type. * * @param topicTypeName Name of the topic type. * @param context The context to associate with this operation. @@ -363,7 +389,9 @@ private Mono> listEventTypesSinglePageAsync(String } /** - * List event types for a topic type. + * List event types. + * + *

List event types for a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -377,7 +405,9 @@ private PagedFlux listEventTypesAsync(String topicTypeName) { } /** - * List event types for a topic type. + * List event types. + * + *

List event types for a topic type. * * @param topicTypeName Name of the topic type. * @param context The context to associate with this operation. @@ -392,7 +422,9 @@ private PagedFlux listEventTypesAsync(String topicTypeName, Cont } /** - * List event types for a topic type. + * List event types. + * + *

List event types for a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -406,7 +438,9 @@ public PagedIterable listEventTypes(String topicTypeName) { } /** - * List event types for a topic type. + * List event types. + * + *

List event types for a topic type. * * @param topicTypeName Name of the topic type. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java index 3bb53536c894..fa82346092ab 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicTypesImpl.java @@ -39,15 +39,6 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new TopicTypeInfoImpl(inner1, this.manager())); } - public TopicTypeInfo get(String topicTypeName) { - TopicTypeInfoInner inner = this.serviceClient().get(topicTypeName); - if (inner != null) { - return new TopicTypeInfoImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String topicTypeName, Context context) { Response inner = this.serviceClient().getWithResponse(topicTypeName, context); if (inner != null) { @@ -61,6 +52,15 @@ public Response getWithResponse(String topicTypeName, Context con } } + public TopicTypeInfo get(String topicTypeName) { + TopicTypeInfoInner inner = this.serviceClient().get(topicTypeName); + if (inner != null) { + return new TopicTypeInfoImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listEventTypes(String topicTypeName) { PagedIterable inner = this.serviceClient().listEventTypes(topicTypeName); return Utils.mapPage(inner, inner1 -> new EventTypeImpl(inner1, this.manager())); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsClientImpl.java index bbb111022b1f..982142212efe 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsClientImpl.java @@ -69,11 +69,10 @@ public final class TopicsClientImpl implements TopicsClient { */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface TopicsService { + public interface TopicsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -87,8 +86,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -103,8 +101,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -117,8 +114,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -160,8 +156,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}/listKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/listKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSharedAccessKeys( @@ -175,8 +170,7 @@ Mono> listSharedAccessKeys( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics" - + "/{topicName}/regenerateKey") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/regenerateKey") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> regenerateKey( @@ -191,8 +185,7 @@ Mono>> regenerateKey( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}" - + "/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventTypes") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventTypes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listEventTypes( @@ -228,7 +221,9 @@ Mono> listByResourceGroupNext( } /** - * Get properties of a topic. + * Get a topic. + * + *

Get properties of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -275,7 +270,9 @@ private Mono> getByResourceGroupWithResponseAsync(String re } /** - * Get properties of a topic. + * Get a topic. + * + *

Get properties of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -321,7 +318,9 @@ private Mono> getByResourceGroupWithResponseAsync( } /** - * Get properties of a topic. + * Get a topic. + * + *

Get properties of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -337,39 +336,45 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Strin } /** - * Get properties of a topic. + * Get a topic. + * + *

Get properties of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. + * @param context The context to associate with this operation. * @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 properties of a topic. + * @return properties of a topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TopicInner getByResourceGroup(String resourceGroupName, String topicName) { - return getByResourceGroupAsync(resourceGroupName, topicName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String topicName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, topicName, context).block(); } /** - * Get properties of a topic. + * Get a topic. + * + *

Get properties of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. - * @param context The context to associate with this operation. * @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 properties of a topic along with {@link Response}. + * @return properties of a topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String topicName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, topicName, context).block(); + public TopicInner getByResourceGroup(String resourceGroupName, String topicName) { + return getByResourceGroupWithResponse(resourceGroupName, topicName, Context.NONE).getValue(); } /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -424,7 +429,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -477,7 +484,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -499,7 +508,9 @@ private PollerFlux, TopicInner> beginCreateOrUpdateAsync( } /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -523,7 +534,9 @@ private PollerFlux, TopicInner> beginCreateOrUpdateAsync( } /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -536,11 +549,13 @@ private PollerFlux, TopicInner> beginCreateOrUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicInner> beginCreateOrUpdate( String resourceGroupName, String topicName, TopicInner topicInfo) { - return beginCreateOrUpdateAsync(resourceGroupName, topicName, topicInfo).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, topicName, topicInfo).getSyncPoller(); } /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -554,11 +569,13 @@ public SyncPoller, TopicInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicInner> beginCreateOrUpdate( String resourceGroupName, String topicName, TopicInner topicInfo, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, topicName, topicInfo, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, topicName, topicInfo, context).getSyncPoller(); } /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -576,7 +593,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, String to } /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -596,7 +615,9 @@ private Mono createOrUpdateAsync( } /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -612,7 +633,9 @@ public TopicInner createOrUpdate(String resourceGroupName, String topicName, Top } /** - * Asynchronously creates a new topic with the specified parameters. + * Create a topic. + * + *

Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -630,7 +653,9 @@ public TopicInner createOrUpdate( } /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -675,7 +700,9 @@ private Mono>> deleteWithResponseAsync(String resource } /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -719,7 +746,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -738,7 +767,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -759,7 +790,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -770,11 +803,13 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName) { - return beginDeleteAsync(resourceGroupName, topicName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, topicName).getSyncPoller(); } /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -786,11 +821,13 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String topicName, Context context) { - return beginDeleteAsync(resourceGroupName, topicName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, topicName, context).getSyncPoller(); } /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -805,7 +842,9 @@ private Mono deleteAsync(String resourceGroupName, String topicName) { } /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -823,7 +862,9 @@ private Mono deleteAsync(String resourceGroupName, String topicName, Conte } /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -837,7 +878,9 @@ public void delete(String resourceGroupName, String topicName) { } /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -852,7 +895,9 @@ public void delete(String resourceGroupName, String topicName, Context context) } /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -908,7 +953,9 @@ private Mono>> updateWithResponseAsync( } /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -962,7 +1009,9 @@ private Mono>> updateWithResponseAsync( } /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -984,7 +1033,9 @@ private PollerFlux, TopicInner> beginUpdateAsync( } /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1008,7 +1059,9 @@ private PollerFlux, TopicInner> beginUpdateAsync( } /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1021,11 +1074,13 @@ private PollerFlux, TopicInner> beginUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicInner> beginUpdate( String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters) { - return beginUpdateAsync(resourceGroupName, topicName, topicUpdateParameters).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, topicName, topicUpdateParameters).getSyncPoller(); } /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1039,11 +1094,13 @@ public SyncPoller, TopicInner> beginUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicInner> beginUpdate( String resourceGroupName, String topicName, TopicUpdateParameters topicUpdateParameters, Context context) { - return beginUpdateAsync(resourceGroupName, topicName, topicUpdateParameters, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, topicName, topicUpdateParameters, context).getSyncPoller(); } /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1062,7 +1119,9 @@ private Mono updateAsync( } /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1082,7 +1141,9 @@ private Mono updateAsync( } /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1098,7 +1159,9 @@ public TopicInner update(String resourceGroupName, String topicName, TopicUpdate } /** - * Asynchronously updates a topic with the specified parameters. + * Update a topic. + * + *

Asynchronously updates a topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1116,7 +1179,9 @@ public TopicInner update( } /** - * List all the topics under an Azure subscription. + * List topics under an Azure subscription. + * + *

List all the topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1172,7 +1237,9 @@ private Mono> listSinglePageAsync(String filter, Integ } /** - * List all the topics under an Azure subscription. + * List topics under an Azure subscription. + * + *

List all the topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1226,7 +1293,9 @@ private Mono> listSinglePageAsync(String filter, Integ } /** - * List all the topics under an Azure subscription. + * List topics under an Azure subscription. + * + *

List all the topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1248,7 +1317,9 @@ private PagedFlux listAsync(String filter, Integer top) { } /** - * List all the topics under an Azure subscription. + * List topics under an Azure subscription. + * + *

List all the topics under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1263,7 +1334,9 @@ private PagedFlux listAsync() { } /** - * List all the topics under an Azure subscription. + * List topics under an Azure subscription. + * + *

List all the topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1287,7 +1360,9 @@ private PagedFlux listAsync(String filter, Integer top, Context cont } /** - * List all the topics under an Azure subscription. + * List topics under an Azure subscription. + * + *

List all the topics under an Azure subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1301,7 +1376,9 @@ public PagedIterable list() { } /** - * List all the topics under an Azure subscription. + * List topics under an Azure subscription. + * + *

List all the topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -1323,7 +1400,9 @@ public PagedIterable list(String filter, Integer top, Context contex } /** - * List all the topics under a resource group. + * List topics under a resource group. + * + *

List all the topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1386,7 +1465,9 @@ private Mono> listByResourceGroupSinglePageAsync( } /** - * List all the topics under a resource group. + * List topics under a resource group. + * + *

List all the topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1447,7 +1528,9 @@ private Mono> listByResourceGroupSinglePageAsync( } /** - * List all the topics under a resource group. + * List topics under a resource group. + * + *

List all the topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1471,7 +1554,9 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName, } /** - * List all the topics under a resource group. + * List topics under a resource group. + * + *

List all the topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1489,7 +1574,9 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName) } /** - * List all the topics under a resource group. + * List topics under a resource group. + * + *

List all the topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1515,7 +1602,9 @@ private PagedFlux listByResourceGroupAsync( } /** - * List all the topics under a resource group. + * List topics under a resource group. + * + *

List all the topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1531,7 +1620,9 @@ public PagedIterable listByResourceGroup(String resourceGroupName) { } /** - * List all the topics under a resource group. + * List topics under a resource group. + * + *

List all the topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -1555,7 +1646,9 @@ public PagedIterable listByResourceGroup( } /** - * List the two keys used to publish to a topic. + * List keys for a topic. + * + *

List the two keys used to publish to a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1603,7 +1696,9 @@ private Mono> listSharedAccessKeysWithRespo } /** - * List the two keys used to publish to a topic. + * List keys for a topic. + * + *

List the two keys used to publish to a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1649,7 +1744,9 @@ private Mono> listSharedAccessKeysWithRespo } /** - * List the two keys used to publish to a topic. + * List keys for a topic. + * + *

List the two keys used to publish to a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1665,39 +1762,45 @@ private Mono listSharedAccessKeysAsync(String resour } /** - * List the two keys used to publish to a topic. + * List keys for a topic. + * + *

List the two keys used to publish to a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. + * @param context The context to associate with this operation. * @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 shared access keys of the Topic. + * @return shared access keys of the Topic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String topicName) { - return listSharedAccessKeysAsync(resourceGroupName, topicName).block(); + public Response listSharedAccessKeysWithResponse( + String resourceGroupName, String topicName, Context context) { + return listSharedAccessKeysWithResponseAsync(resourceGroupName, topicName, context).block(); } /** - * List the two keys used to publish to a topic. + * List keys for a topic. + * + *

List the two keys used to publish to a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. - * @param context The context to associate with this operation. * @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 shared access keys of the Topic along with {@link Response}. + * @return shared access keys of the Topic. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSharedAccessKeysWithResponse( - String resourceGroupName, String topicName, Context context) { - return listSharedAccessKeysWithResponseAsync(resourceGroupName, topicName, context).block(); + public TopicSharedAccessKeysInner listSharedAccessKeys(String resourceGroupName, String topicName) { + return listSharedAccessKeysWithResponse(resourceGroupName, topicName, Context.NONE).getValue(); } /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1753,7 +1856,9 @@ private Mono>> regenerateKeyWithResponseAsync( } /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1807,7 +1912,9 @@ private Mono>> regenerateKeyWithResponseAsync( } /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1833,7 +1940,9 @@ private PollerFlux, TopicSharedAccessKeys } /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1861,7 +1970,9 @@ private PollerFlux, TopicSharedAccessKeys } /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1874,11 +1985,13 @@ private PollerFlux, TopicSharedAccessKeys @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicSharedAccessKeysInner> beginRegenerateKey( String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { - return beginRegenerateKeyAsync(resourceGroupName, topicName, regenerateKeyRequest).getSyncPoller(); + return this.beginRegenerateKeyAsync(resourceGroupName, topicName, regenerateKeyRequest).getSyncPoller(); } /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1892,11 +2005,15 @@ public SyncPoller, TopicSharedAccessKeysI @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TopicSharedAccessKeysInner> beginRegenerateKey( String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest, Context context) { - return beginRegenerateKeyAsync(resourceGroupName, topicName, regenerateKeyRequest, context).getSyncPoller(); + return this + .beginRegenerateKeyAsync(resourceGroupName, topicName, regenerateKeyRequest, context) + .getSyncPoller(); } /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1915,7 +2032,9 @@ private Mono regenerateKeyAsync( } /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1935,7 +2054,9 @@ private Mono regenerateKeyAsync( } /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1952,7 +2073,9 @@ public TopicSharedAccessKeysInner regenerateKey( } /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -1970,7 +2093,9 @@ public TopicSharedAccessKeysInner regenerateKey( } /** - * List event types for a topic. + * List topic event types. + * + *

List event types for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -2035,7 +2160,9 @@ private Mono> listEventTypesSinglePageAsync( } /** - * List event types for a topic. + * List topic event types. + * + *

List event types for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -2102,7 +2229,9 @@ private Mono> listEventTypesSinglePageAsync( } /** - * List event types for a topic. + * List topic event types. + * + *

List event types for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -2121,7 +2250,9 @@ private PagedFlux listEventTypesAsync( } /** - * List event types for a topic. + * List topic event types. + * + *

List event types for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -2147,7 +2278,9 @@ private PagedFlux listEventTypesAsync( } /** - * List event types for a topic. + * List topic event types. + * + *

List event types for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -2166,7 +2299,9 @@ public PagedIterable listEventTypes( } /** - * List event types for a topic. + * List topic event types. + * + *

List event types for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -2192,7 +2327,8 @@ public PagedIterable listEventTypes( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -2229,7 +2365,8 @@ private Mono> listBySubscriptionNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2266,7 +2403,8 @@ private Mono> listBySubscriptionNextSinglePageAsync(St /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -2303,7 +2441,8 @@ private Mono> listByResourceGroupNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsImpl.java index 212bdfaf07dd..395ecbf8ab24 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/TopicsImpl.java @@ -31,15 +31,6 @@ public TopicsImpl(TopicsClient innerClient, com.azure.resourcemanager.eventgrid. this.serviceManager = serviceManager; } - public Topic getByResourceGroup(String resourceGroupName, String topicName) { - TopicInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, topicName); - if (inner != null) { - return new TopicImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String topicName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, topicName, context); @@ -54,6 +45,15 @@ public Response getByResourceGroupWithResponse(String resourceGroupName, } } + public Topic getByResourceGroup(String resourceGroupName, String topicName) { + TopicInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, topicName); + if (inner != null) { + return new TopicImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String topicName) { this.serviceClient().delete(resourceGroupName, topicName); } @@ -84,15 +84,6 @@ public PagedIterable listByResourceGroup( return Utils.mapPage(inner, inner1 -> new TopicImpl(inner1, this.manager())); } - public TopicSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String topicName) { - TopicSharedAccessKeysInner inner = this.serviceClient().listSharedAccessKeys(resourceGroupName, topicName); - if (inner != null) { - return new TopicSharedAccessKeysImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listSharedAccessKeysWithResponse( String resourceGroupName, String topicName, Context context) { Response inner = @@ -108,6 +99,15 @@ public Response listSharedAccessKeysWithResponse( } } + public TopicSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String topicName) { + TopicSharedAccessKeysInner inner = this.serviceClient().listSharedAccessKeys(resourceGroupName, topicName); + if (inner != null) { + return new TopicSharedAccessKeysImpl(inner, this.manager()); + } else { + return null; + } + } + public TopicSharedAccessKeys regenerateKey( String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest) { TopicSharedAccessKeysInner inner = diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java index c92f9f41f3f6..3e595b35b94d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnerImpl.java @@ -54,6 +54,10 @@ public PartnerDetails partnerTopicDetails() { return this.innerModel().partnerTopicDetails(); } + public PartnerDetails partnerDestinationDetails() { + return this.innerModel().partnerDestinationDetails(); + } + public VerifiedPartnerProvisioningState provisioningState() { return this.innerModel().provisioningState(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersClientImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersClientImpl.java index 373311e3720a..d6e2a926e079 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersClientImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersClientImpl.java @@ -55,7 +55,7 @@ public final class VerifiedPartnersClientImpl implements VerifiedPartnersClient */ @Host("{$host}") @ServiceInterface(name = "EventGridManagementC") - private interface VerifiedPartnersService { + public interface VerifiedPartnersService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.EventGrid/verifiedPartners/{verifiedPartnerName}") @ExpectedResponses({200}) @@ -91,7 +91,9 @@ Mono> listNext( } /** - * Get properties of a verified partner. + * Get a verified partner. + * + *

Get properties of a verified partner. * * @param verifiedPartnerName Name of the verified partner. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,7 +128,9 @@ private Mono> getWithResponseAsync(String verifie } /** - * Get properties of a verified partner. + * Get a verified partner. + * + *

Get properties of a verified partner. * * @param verifiedPartnerName Name of the verified partner. * @param context The context to associate with this operation. @@ -154,7 +158,9 @@ private Mono> getWithResponseAsync(String verifie } /** - * Get properties of a verified partner. + * Get a verified partner. + * + *

Get properties of a verified partner. * * @param verifiedPartnerName Name of the verified partner. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -168,36 +174,42 @@ private Mono getAsync(String verifiedPartnerName) { } /** - * Get properties of a verified partner. + * Get a verified partner. + * + *

Get properties of a verified partner. * * @param verifiedPartnerName Name of the verified partner. + * @param context The context to associate with this operation. * @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 properties of a verified partner. + * @return properties of a verified partner along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VerifiedPartnerInner get(String verifiedPartnerName) { - return getAsync(verifiedPartnerName).block(); + public Response getWithResponse(String verifiedPartnerName, Context context) { + return getWithResponseAsync(verifiedPartnerName, context).block(); } /** - * Get properties of a verified partner. + * Get a verified partner. + * + *

Get properties of a verified partner. * * @param verifiedPartnerName Name of the verified partner. - * @param context The context to associate with this operation. * @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 properties of a verified partner along with {@link Response}. + * @return properties of a verified partner. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String verifiedPartnerName, Context context) { - return getWithResponseAsync(verifiedPartnerName, context).block(); + public VerifiedPartnerInner get(String verifiedPartnerName) { + return getWithResponse(verifiedPartnerName, Context.NONE).getValue(); } /** - * Get a list of all verified partners. + * List all verified partners. + * + *

Get a list of all verified partners. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -239,7 +251,9 @@ private Mono> listSinglePageAsync(String fil } /** - * Get a list of all verified partners. + * List all verified partners. + * + *

Get a list of all verified partners. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -280,7 +294,9 @@ private Mono> listSinglePageAsync(String fil } /** - * Get a list of all verified partners. + * List all verified partners. + * + *

Get a list of all verified partners. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -301,7 +317,9 @@ private PagedFlux listAsync(String filter, Integer top) { } /** - * Get a list of all verified partners. + * List all verified partners. + * + *

Get a list of all verified partners. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -315,7 +333,9 @@ private PagedFlux listAsync() { } /** - * Get a list of all verified partners. + * List all verified partners. + * + *

Get a list of all verified partners. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -338,7 +358,9 @@ private PagedFlux listAsync(String filter, Integer top, Co } /** - * Get a list of all verified partners. + * List all verified partners. + * + *

Get a list of all verified partners. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -352,7 +374,9 @@ public PagedIterable list() { } /** - * Get a list of all verified partners. + * List all verified partners. + * + *

Get a list of all verified partners. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -376,7 +400,8 @@ public PagedIterable list(String filter, Integer top, Cont /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @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. @@ -412,7 +437,8 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersImpl.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersImpl.java index 9a3b453524f4..6389402e4051 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersImpl.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/implementation/VerifiedPartnersImpl.java @@ -27,15 +27,6 @@ public VerifiedPartnersImpl( this.serviceManager = serviceManager; } - public VerifiedPartner get(String verifiedPartnerName) { - VerifiedPartnerInner inner = this.serviceClient().get(verifiedPartnerName); - if (inner != null) { - return new VerifiedPartnerImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String verifiedPartnerName, Context context) { Response inner = this.serviceClient().getWithResponse(verifiedPartnerName, context); if (inner != null) { @@ -49,6 +40,15 @@ public Response getWithResponse(String verifiedPartnerName, Con } } + public VerifiedPartner get(String verifiedPartnerName) { + VerifiedPartnerInner inner = this.serviceClient().get(verifiedPartnerName); + if (inner != null) { + return new VerifiedPartnerImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); return Utils.mapPage(inner, inner1 -> new VerifiedPartnerImpl(inner1, this.manager())); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilter.java index 25bc0c73aa91..09b0301d3970 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilter.java @@ -51,6 +51,10 @@ public class AdvancedFilter { @JsonProperty(value = "key") private String key; + /** Creates an instance of AdvancedFilter class. */ + public AdvancedFilter() { + } + /** * Get the key property: The field/property in the event based on which you want to filter. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilterOperatorType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilterOperatorType.java index 529f7a86db76..321af1061a76 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilterOperatorType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AdvancedFilterOperatorType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AdvancedFilterOperatorType. */ +/** The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ public final class AdvancedFilterOperatorType extends ExpandableStringEnum { /** Static value NumberIn for AdvancedFilterOperatorType. */ public static final AdvancedFilterOperatorType NUMBER_IN = fromString("NumberIn"); @@ -68,6 +68,15 @@ public final class AdvancedFilterOperatorType extends ExpandableStringEnum { + /** Static value ClientCertificateSubject for AlternativeAuthenticationNameSource. */ + public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_SUBJECT = + fromString("ClientCertificateSubject"); + + /** Static value ClientCertificateDns for AlternativeAuthenticationNameSource. */ + public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_DNS = fromString("ClientCertificateDns"); + + /** Static value ClientCertificateUri for AlternativeAuthenticationNameSource. */ + public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_URI = fromString("ClientCertificateUri"); + + /** Static value ClientCertificateIp for AlternativeAuthenticationNameSource. */ + public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_IP = fromString("ClientCertificateIp"); + + /** Static value ClientCertificateEmail for AlternativeAuthenticationNameSource. */ + public static final AlternativeAuthenticationNameSource CLIENT_CERTIFICATE_EMAIL = + fromString("ClientCertificateEmail"); + + /** + * Creates a new instance of AlternativeAuthenticationNameSource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlternativeAuthenticationNameSource() { + } + + /** + * Creates or finds a AlternativeAuthenticationNameSource from its string representation. + * + * @param name a name to look for. + * @return the corresponding AlternativeAuthenticationNameSource. + */ + @JsonCreator + public static AlternativeAuthenticationNameSource fromString(String name) { + return fromString(name, AlternativeAuthenticationNameSource.class); + } + + /** + * Gets known AlternativeAuthenticationNameSource values. + * + * @return known AlternativeAuthenticationNameSource values. + */ + public static Collection values() { + return values(AlternativeAuthenticationNameSource.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureADPartnerClientAuthentication.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureADPartnerClientAuthentication.java new file mode 100644 index 000000000000..604ac0b507bc --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureADPartnerClientAuthentication.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.AzureADPartnerClientAuthenticationProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Azure Active Directory Partner Client Authentication. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "clientAuthenticationType") +@JsonTypeName("AzureAD") +@Fluent +public final class AzureADPartnerClientAuthentication extends PartnerClientAuthentication { + /* + * AzureAD ClientAuthentication Properties + */ + @JsonProperty(value = "properties") + private AzureADPartnerClientAuthenticationProperties innerProperties; + + /** Creates an instance of AzureADPartnerClientAuthentication class. */ + public AzureADPartnerClientAuthentication() { + } + + /** + * Get the innerProperties property: AzureAD ClientAuthentication Properties. + * + * @return the innerProperties value. + */ + private AzureADPartnerClientAuthenticationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the azureActiveDirectoryTenantId property: The Azure Active Directory Tenant ID to get the access token that + * will be included as the bearer token in delivery requests. + * + * @return the azureActiveDirectoryTenantId value. + */ + public String azureActiveDirectoryTenantId() { + return this.innerProperties() == null ? null : this.innerProperties().azureActiveDirectoryTenantId(); + } + + /** + * Set the azureActiveDirectoryTenantId property: The Azure Active Directory Tenant ID to get the access token that + * will be included as the bearer token in delivery requests. + * + * @param azureActiveDirectoryTenantId the azureActiveDirectoryTenantId value to set. + * @return the AzureADPartnerClientAuthentication object itself. + */ + public AzureADPartnerClientAuthentication withAzureActiveDirectoryTenantId(String azureActiveDirectoryTenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new AzureADPartnerClientAuthenticationProperties(); + } + this.innerProperties().withAzureActiveDirectoryTenantId(azureActiveDirectoryTenantId); + return this; + } + + /** + * Get the azureActiveDirectoryApplicationIdOrUri property: The Azure Active Directory Application ID or URI to get + * the access token that will be included as the bearer token in delivery requests. + * + * @return the azureActiveDirectoryApplicationIdOrUri value. + */ + public String azureActiveDirectoryApplicationIdOrUri() { + return this.innerProperties() == null ? null : this.innerProperties().azureActiveDirectoryApplicationIdOrUri(); + } + + /** + * Set the azureActiveDirectoryApplicationIdOrUri property: The Azure Active Directory Application ID or URI to get + * the access token that will be included as the bearer token in delivery requests. + * + * @param azureActiveDirectoryApplicationIdOrUri the azureActiveDirectoryApplicationIdOrUri value to set. + * @return the AzureADPartnerClientAuthentication object itself. + */ + public AzureADPartnerClientAuthentication withAzureActiveDirectoryApplicationIdOrUri( + String azureActiveDirectoryApplicationIdOrUri) { + if (this.innerProperties() == null) { + this.innerProperties = new AzureADPartnerClientAuthenticationProperties(); + } + this.innerProperties().withAzureActiveDirectoryApplicationIdOrUri(azureActiveDirectoryApplicationIdOrUri); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureFunctionEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureFunctionEventSubscriptionDestination.java index 87b842db6fd1..2ac574baff06 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureFunctionEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/AzureFunctionEventSubscriptionDestination.java @@ -22,6 +22,10 @@ public final class AzureFunctionEventSubscriptionDestination extends EventSubscr @JsonProperty(value = "properties") private AzureFunctionEventSubscriptionDestinationProperties innerProperties; + /** Creates an instance of AzureFunctionEventSubscriptionDestination class. */ + public AzureFunctionEventSubscriptionDestination() { + } + /** * Get the innerProperties property: Azure Function Properties of the event subscription destination. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsAdvancedFilter.java index 7388e60cb219..03d0faa57b0e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsAdvancedFilter.java @@ -20,6 +20,10 @@ public final class BoolEqualsAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "value") private Boolean value; + /** Creates an instance of BoolEqualsAdvancedFilter class. */ + public BoolEqualsAdvancedFilter() { + } + /** * Get the value property: The boolean filter value. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsFilter.java new file mode 100644 index 000000000000..4370d9db3e55 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/BoolEqualsFilter.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** BoolEquals Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("BoolEquals") +@Fluent +public final class BoolEqualsFilter extends Filter { + /* + * The boolean filter value. + */ + @JsonProperty(value = "value") + private Boolean value; + + /** Creates an instance of BoolEqualsFilter class. */ + public BoolEqualsFilter() { + } + + /** + * Get the value property: The boolean filter value. + * + * @return the value value. + */ + public Boolean value() { + return this.value; + } + + /** + * Set the value property: The boolean filter value. + * + * @param value the value value to set. + * @return the BoolEqualsFilter object itself. + */ + public BoolEqualsFilter withValue(Boolean value) { + this.value = value; + return this; + } + + /** {@inheritDoc} */ + @Override + public BoolEqualsFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificate.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificate.java new file mode 100644 index 000000000000..baeccb486f43 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificate.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of CaCertificate. */ +public interface CaCertificate { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: The system metadata relating to the CaCertificate resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the description property: Description for the CA Certificate resource. + * + * @return the description value. + */ + String description(); + + /** + * Gets the encodedCertificate property: Base64 encoded PEM (Privacy Enhanced Mail) format certificate data. + * + * @return the encodedCertificate value. + */ + String encodedCertificate(); + + /** + * Gets the issueTimeInUtc property: Certificate issue time in UTC. This is a read-only field. + * + * @return the issueTimeInUtc value. + */ + OffsetDateTime issueTimeInUtc(); + + /** + * Gets the expiryTimeInUtc property: Certificate expiry time in UTC. This is a read-only field. + * + * @return the expiryTimeInUtc value. + */ + OffsetDateTime expiryTimeInUtc(); + + /** + * Gets the provisioningState property: Provisioning state of the CA Certificate resource. + * + * @return the provisioningState value. + */ + CaCertificateProvisioningState provisioningState(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateInner object. + * + * @return the inner object. + */ + CaCertificateInner innerModel(); + + /** The entirety of the CaCertificate definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The CaCertificate definition stages. */ + interface DefinitionStages { + /** The first stage of the CaCertificate definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the CaCertificate definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, namespaceName. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @return the next definition stage. + */ + WithCreate withExistingNamespace(String resourceGroupName, String namespaceName); + } + /** + * The stage of the CaCertificate definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithDescription, DefinitionStages.WithEncodedCertificate { + /** + * Executes the create request. + * + * @return the created resource. + */ + CaCertificate create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CaCertificate create(Context context); + } + /** The stage of the CaCertificate definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: Description for the CA Certificate resource.. + * + * @param description Description for the CA Certificate resource. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the CaCertificate definition allowing to specify encodedCertificate. */ + interface WithEncodedCertificate { + /** + * Specifies the encodedCertificate property: Base64 encoded PEM (Privacy Enhanced Mail) format certificate + * data.. + * + * @param encodedCertificate Base64 encoded PEM (Privacy Enhanced Mail) format certificate data. + * @return the next definition stage. + */ + WithCreate withEncodedCertificate(String encodedCertificate); + } + } + /** + * Begins update for the CaCertificate resource. + * + * @return the stage of resource update. + */ + CaCertificate.Update update(); + + /** The template for CaCertificate update. */ + interface Update extends UpdateStages.WithDescription, UpdateStages.WithEncodedCertificate { + /** + * Executes the update request. + * + * @return the updated resource. + */ + CaCertificate apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + CaCertificate apply(Context context); + } + /** The CaCertificate update stages. */ + interface UpdateStages { + /** The stage of the CaCertificate update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: Description for the CA Certificate resource.. + * + * @param description Description for the CA Certificate resource. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the CaCertificate update allowing to specify encodedCertificate. */ + interface WithEncodedCertificate { + /** + * Specifies the encodedCertificate property: Base64 encoded PEM (Privacy Enhanced Mail) format certificate + * data.. + * + * @param encodedCertificate Base64 encoded PEM (Privacy Enhanced Mail) format certificate data. + * @return the next definition stage. + */ + Update withEncodedCertificate(String encodedCertificate); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + CaCertificate refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + CaCertificate refresh(Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificateProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificateProvisioningState.java new file mode 100644 index 000000000000..48ded0b22242 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificateProvisioningState.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the CA Certificate resource. */ +public final class CaCertificateProvisioningState extends ExpandableStringEnum { + /** Static value Creating for CaCertificateProvisioningState. */ + public static final CaCertificateProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for CaCertificateProvisioningState. */ + public static final CaCertificateProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for CaCertificateProvisioningState. */ + public static final CaCertificateProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for CaCertificateProvisioningState. */ + public static final CaCertificateProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for CaCertificateProvisioningState. */ + public static final CaCertificateProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for CaCertificateProvisioningState. */ + public static final CaCertificateProvisioningState FAILED = fromString("Failed"); + + /** Static value Deleted for CaCertificateProvisioningState. */ + public static final CaCertificateProvisioningState DELETED = fromString("Deleted"); + + /** + * Creates a new instance of CaCertificateProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CaCertificateProvisioningState() { + } + + /** + * Creates or finds a CaCertificateProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CaCertificateProvisioningState. + */ + @JsonCreator + public static CaCertificateProvisioningState fromString(String name) { + return fromString(name, CaCertificateProvisioningState.class); + } + + /** + * Gets known CaCertificateProvisioningState values. + * + * @return known CaCertificateProvisioningState values. + */ + public static Collection values() { + return values(CaCertificateProvisioningState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificates.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificates.java new file mode 100644 index 000000000000..746ef3366fcb --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificates.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of CaCertificates. */ +public interface CaCertificates { + /** + * Get a CA certificate. + * + *

Get properties of a CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 properties of a CA certificate along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String namespaceName, String caCertificateName, Context context); + + /** + * Get a CA certificate. + * + *

Get properties of a CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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 properties of a CA certificate. + */ + CaCertificate get(String resourceGroupName, String namespaceName, String caCertificateName); + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String caCertificateName); + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param caCertificateName Name of the CA certificate. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String caCertificateName, Context context); + + /** + * List all CA certificates under a namespace. + * + *

Get all the CA certificates under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List all CA certificates under a namespace. + * + *

Get all the CA certificates under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the CA certificates under a namespace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); + + /** + * Get a CA certificate. + * + *

Get properties of a CA certificate. + * + * @param id the resource ID. + * @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 properties of a CA certificate along with {@link Response}. + */ + CaCertificate getById(String id); + + /** + * Get a CA certificate. + * + *

Get properties of a CA certificate. + * + * @param id the resource ID. + * @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 properties of a CA certificate along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete a CA certificate. + * + *

Delete an existing CA certificate. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new CaCertificate resource. + * + * @param name resource name. + * @return the first stage of the new CaCertificate definition. + */ + CaCertificate.DefinitionStages.Blank define(String name); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificatesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificatesListResult.java new file mode 100644 index 000000000000..74aaf2a7b007 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/CaCertificatesListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.CaCertificateInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Result of the List CA Certificate operation. */ +@Fluent +public final class CaCertificatesListResult { + /* + * A collection of CA Certificate. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link for the next page of CA Certificate. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of CaCertificatesListResult class. */ + public CaCertificatesListResult() { + } + + /** + * Get the value property: A collection of CA Certificate. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of CA Certificate. + * + * @param value the value value to set. + * @return the CaCertificatesListResult object itself. + */ + public CaCertificatesListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link for the next page of CA Certificate. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link for the next page of CA Certificate. + * + * @param nextLink the nextLink value to set. + * @return the CaCertificatesListResult object itself. + */ + public CaCertificatesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channel.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channel.java index a426164ea140..481f3789ad4c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channel.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channel.java @@ -55,6 +55,15 @@ public interface Channel { */ PartnerTopicInfo partnerTopicInfo(); + /** + * Gets the partnerDestinationInfo property: This property should be populated when channelType is + * PartnerDestination and represents information about the partner destination resource corresponding to the + * channel. + * + * @return the partnerDestinationInfo value. + */ + PartnerDestinationInfo partnerDestinationInfo(); + /** * Gets the messageForActivation property: Context or helpful message that can be used during the approval process * by the subscriber. @@ -126,6 +135,7 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithChannelType, DefinitionStages.WithPartnerTopicInfo, + DefinitionStages.WithPartnerDestinationInfo, DefinitionStages.WithMessageForActivation, DefinitionStages.WithProvisioningState, DefinitionStages.WithReadinessState, @@ -168,6 +178,19 @@ interface WithPartnerTopicInfo { */ WithCreate withPartnerTopicInfo(PartnerTopicInfo partnerTopicInfo); } + /** The stage of the Channel definition allowing to specify partnerDestinationInfo. */ + interface WithPartnerDestinationInfo { + /** + * Specifies the partnerDestinationInfo property: This property should be populated when channelType is + * PartnerDestination and represents information about the partner destination resource corresponding to the + * channel.. + * + * @param partnerDestinationInfo This property should be populated when channelType is PartnerDestination + * and represents information about the partner destination resource corresponding to the channel. + * @return the next definition stage. + */ + WithCreate withPartnerDestinationInfo(PartnerDestinationInfo partnerDestinationInfo); + } /** The stage of the Channel definition allowing to specify messageForActivation. */ interface WithMessageForActivation { /** @@ -226,6 +249,7 @@ interface WithExpirationTimeIfNotActivatedUtc { interface Update extends UpdateStages.WithChannelType, UpdateStages.WithPartnerTopicInfo, + UpdateStages.WithPartnerDestinationInfo, UpdateStages.WithMessageForActivation, UpdateStages.WithProvisioningState, UpdateStages.WithReadinessState, @@ -270,6 +294,19 @@ interface WithPartnerTopicInfo { */ Update withPartnerTopicInfo(PartnerTopicInfo partnerTopicInfo); } + /** The stage of the Channel update allowing to specify partnerDestinationInfo. */ + interface WithPartnerDestinationInfo { + /** + * Specifies the partnerDestinationInfo property: This property should be populated when channelType is + * PartnerDestination and represents information about the partner destination resource corresponding to the + * channel.. + * + * @param partnerDestinationInfo This property should be populated when channelType is PartnerDestination + * and represents information about the partner destination resource corresponding to the channel. + * @return the next definition stage. + */ + Update withPartnerDestinationInfo(PartnerDestinationInfo partnerDestinationInfo); + } /** The stage of the Channel update allowing to specify messageForActivation. */ interface WithMessageForActivation { /** @@ -333,22 +370,26 @@ interface WithExpirationTimeIfNotActivatedUtc { Channel refresh(Context context); /** - * Get the full endpoint URL of a partner destination channel. + * Get full URL of partner destination channel. * + *

Get the full endpoint URL of a partner destination channel. + * + * @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 the full endpoint URL of a partner destination channel. + * @return the full endpoint URL of a partner destination channel along with {@link Response}. */ - EventSubscriptionFullUrl getFullUrl(); + Response getFullUrlWithResponse(Context context); /** - * Get the full endpoint URL of a partner destination channel. + * Get full URL of partner destination channel. + * + *

Get the full endpoint URL of a partner destination channel. * - * @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 the full endpoint URL of a partner destination channel along with {@link Response}. + * @return the full endpoint URL of a partner destination channel. */ - Response getFullUrlWithResponse(Context context); + EventSubscriptionFullUrl getFullUrl(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelProvisioningState.java index d1e15cad2aeb..e38bf948922d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ChannelProvisioningState. */ +/** Provisioning state of the channel. */ public final class ChannelProvisioningState extends ExpandableStringEnum { /** Static value Creating for ChannelProvisioningState. */ public static final ChannelProvisioningState CREATING = fromString("Creating"); @@ -32,6 +32,19 @@ public final class ChannelProvisioningState extends ExpandableStringEnum { /** Static value PartnerTopic for ChannelType. */ public static final ChannelType PARTNER_TOPIC = fromString("PartnerTopic"); + /** Static value PartnerDestination for ChannelType. */ + public static final ChannelType PARTNER_DESTINATION = fromString("PartnerDestination"); + + /** + * Creates a new instance of ChannelType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ChannelType() { + } + /** * Creates or finds a ChannelType from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelUpdateParameters.java index f0c9801d6c43..cf9d4cd46c4b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelUpdateParameters.java @@ -18,6 +18,10 @@ public final class ChannelUpdateParameters { @JsonProperty(value = "properties") private ChannelUpdateParametersProperties innerProperties; + /** Creates an instance of ChannelUpdateParameters class. */ + public ChannelUpdateParameters() { + } + /** * Get the innerProperties property: Properties of the channel update parameters. * @@ -54,6 +58,31 @@ public ChannelUpdateParameters withExpirationTimeIfNotActivatedUtc(OffsetDateTim return this; } + /** + * Get the partnerDestinationInfo property: Partner destination properties which can be updated if the channel is of + * type PartnerDestination. + * + * @return the partnerDestinationInfo value. + */ + public PartnerUpdateDestinationInfo partnerDestinationInfo() { + return this.innerProperties() == null ? null : this.innerProperties().partnerDestinationInfo(); + } + + /** + * Set the partnerDestinationInfo property: Partner destination properties which can be updated if the channel is of + * type PartnerDestination. + * + * @param partnerDestinationInfo the partnerDestinationInfo value to set. + * @return the ChannelUpdateParameters object itself. + */ + public ChannelUpdateParameters withPartnerDestinationInfo(PartnerUpdateDestinationInfo partnerDestinationInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new ChannelUpdateParametersProperties(); + } + this.innerProperties().withPartnerDestinationInfo(partnerDestinationInfo); + return this; + } + /** * Get the partnerTopicInfo property: Partner topic properties which can be updated if the channel is of type * PartnerTopic. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channels.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channels.java index 40927a767e9d..c9f138386869 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channels.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Channels.java @@ -11,35 +11,41 @@ /** Resource collection API of Channels. */ public interface Channels { /** - * Get properties of a channel. + * Get a channel. + * + *

Get properties of a channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. + * @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 properties of a channel. + * @return properties of a channel along with {@link Response}. */ - Channel get(String resourceGroupName, String partnerNamespaceName, String channelName); + Response getWithResponse( + String resourceGroupName, String partnerNamespaceName, String channelName, Context context); /** - * Get properties of a channel. + * Get a channel. + * + *

Get properties of a channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. - * @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 properties of a channel along with {@link Response}. + * @return properties of a channel. */ - Response getWithResponse( - String resourceGroupName, String partnerNamespaceName, String channelName, Context context); + Channel get(String resourceGroupName, String partnerNamespaceName, String channelName); /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -51,7 +57,9 @@ Response getWithResponse( void delete(String resourceGroupName, String partnerNamespaceName, String channelName); /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -64,44 +72,50 @@ Response getWithResponse( void delete(String resourceGroupName, String partnerNamespaceName, String channelName, Context context); /** - * Synchronously updates a channel with the specified parameters. + * Update a Channel. + * + *

Synchronously updates a channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelUpdateParameters Channel update information. + * @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 the {@link Response}. */ - void update( + Response updateWithResponse( String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters); + ChannelUpdateParameters channelUpdateParameters, + Context context); /** - * Synchronously updates a channel with the specified parameters. + * Update a Channel. + * + *

Synchronously updates a channel with the specified parameters. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the channel. * @param channelUpdateParameters Channel update information. - * @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 the {@link Response}. */ - Response updateWithResponse( + void update( String resourceGroupName, String partnerNamespaceName, String channelName, - ChannelUpdateParameters channelUpdateParameters, - Context context); + ChannelUpdateParameters channelUpdateParameters); /** - * List all the channels in a partner namespace. + * List channels. + * + *

List all the channels in a partner namespace. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -113,7 +127,9 @@ Response updateWithResponse( PagedIterable listByPartnerNamespace(String resourceGroupName, String partnerNamespaceName); /** - * List all the channels in a partner namespace. + * List channels. + * + *

List all the channels in a partner namespace. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -135,35 +151,41 @@ PagedIterable listByPartnerNamespace( String resourceGroupName, String partnerNamespaceName, String filter, Integer top, Context context); /** - * Get the full endpoint URL of a partner destination channel. + * Get full URL of partner destination channel. + * + *

Get the full endpoint URL of a partner destination channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the Channel. + * @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 the full endpoint URL of a partner destination channel. + * @return the full endpoint URL of a partner destination channel along with {@link Response}. */ - EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String partnerNamespaceName, String channelName); + Response getFullUrlWithResponse( + String resourceGroupName, String partnerNamespaceName, String channelName, Context context); /** - * Get the full endpoint URL of a partner destination channel. + * Get full URL of partner destination channel. + * + *

Get the full endpoint URL of a partner destination channel. * * @param resourceGroupName The name of the resource group within the partners subscription. * @param partnerNamespaceName Name of the partner namespace. * @param channelName Name of the Channel. - * @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 the full endpoint URL of a partner destination channel along with {@link Response}. + * @return the full endpoint URL of a partner destination channel. */ - Response getFullUrlWithResponse( - String resourceGroupName, String partnerNamespaceName, String channelName, Context context); + EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String partnerNamespaceName, String channelName); /** - * Get properties of a channel. + * Get a channel. + * + *

Get properties of a channel. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -174,7 +196,9 @@ Response getFullUrlWithResponse( Channel getById(String id); /** - * Get properties of a channel. + * Get a channel. + * + *

Get properties of a channel. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -186,7 +210,9 @@ Response getFullUrlWithResponse( Response getByIdWithResponse(String id, Context context); /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -196,7 +222,9 @@ Response getFullUrlWithResponse( void deleteById(String id); /** - * Delete an existing channel. + * Delete a channel. + * + *

Delete an existing channel. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelsListResult.java index eb5fa58d8567..2ea9be33c6ae 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ChannelsListResult.java @@ -24,6 +24,10 @@ public final class ChannelsListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of ChannelsListResult class. */ + public ChannelsListResult() { + } + /** * Get the value property: A collection of Channels. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Client.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Client.java new file mode 100644 index 000000000000..43079769d698 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Client.java @@ -0,0 +1,332 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientInner; +import java.util.Map; + +/** An immutable client-side representation of Client. */ +public interface Client { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: The system metadata relating to the Client resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the description property: Description for the Client resource. + * + * @return the description value. + */ + String description(); + + /** + * Gets the authenticationName property: The name presented by the client for authentication. The default value is + * the name of the resource. + * + * @return the authenticationName value. + */ + String authenticationName(); + + /** + * Gets the authentication property: Authentication information for the client. + * + * @return the authentication value. + */ + ClientAuthentication authentication(); + + /** + * Gets the clientCertificateAuthentication property: The client certificate authentication information. + * + * @return the clientCertificateAuthentication value. + */ + ClientCertificateAuthentication clientCertificateAuthentication(); + + /** + * Gets the state property: Indicates if the client is enabled or not. Default value is Enabled. + * + * @return the state value. + */ + ClientState state(); + + /** + * Gets the attributes property: Attributes for the client. Supported values are int, bool, string, string[]. + * Example: "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }. + * + * @return the attributes value. + */ + Map attributes(); + + /** + * Gets the provisioningState property: Provisioning state of the Client resource. + * + * @return the provisioningState value. + */ + ClientProvisioningState provisioningState(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.ClientInner object. + * + * @return the inner object. + */ + ClientInner innerModel(); + + /** The entirety of the Client definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The Client definition stages. */ + interface DefinitionStages { + /** The first stage of the Client definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the Client definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, namespaceName. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @return the next definition stage. + */ + WithCreate withExistingNamespace(String resourceGroupName, String namespaceName); + } + /** + * The stage of the Client definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithDescription, + DefinitionStages.WithAuthenticationName, + DefinitionStages.WithAuthentication, + DefinitionStages.WithClientCertificateAuthentication, + DefinitionStages.WithState, + DefinitionStages.WithAttributes { + /** + * Executes the create request. + * + * @return the created resource. + */ + Client create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Client create(Context context); + } + /** The stage of the Client definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: Description for the Client resource.. + * + * @param description Description for the Client resource. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the Client definition allowing to specify authenticationName. */ + interface WithAuthenticationName { + /** + * Specifies the authenticationName property: The name presented by the client for authentication. The + * default value is the name of the resource.. + * + * @param authenticationName The name presented by the client for authentication. The default value is the + * name of the resource. + * @return the next definition stage. + */ + WithCreate withAuthenticationName(String authenticationName); + } + /** The stage of the Client definition allowing to specify authentication. */ + interface WithAuthentication { + /** + * Specifies the authentication property: Authentication information for the client.. + * + * @param authentication Authentication information for the client. + * @return the next definition stage. + */ + WithCreate withAuthentication(ClientAuthentication authentication); + } + /** The stage of the Client definition allowing to specify clientCertificateAuthentication. */ + interface WithClientCertificateAuthentication { + /** + * Specifies the clientCertificateAuthentication property: The client certificate authentication + * information.. + * + * @param clientCertificateAuthentication The client certificate authentication information. + * @return the next definition stage. + */ + WithCreate withClientCertificateAuthentication( + ClientCertificateAuthentication clientCertificateAuthentication); + } + /** The stage of the Client definition allowing to specify state. */ + interface WithState { + /** + * Specifies the state property: Indicates if the client is enabled or not. Default value is Enabled.. + * + * @param state Indicates if the client is enabled or not. Default value is Enabled. + * @return the next definition stage. + */ + WithCreate withState(ClientState state); + } + /** The stage of the Client definition allowing to specify attributes. */ + interface WithAttributes { + /** + * Specifies the attributes property: Attributes for the client. Supported values are int, bool, string, + * string[]. Example: "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }. + * + * @param attributes Attributes for the client. Supported values are int, bool, string, string[]. Example: + * "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }. + * @return the next definition stage. + */ + WithCreate withAttributes(Map attributes); + } + } + /** + * Begins update for the Client resource. + * + * @return the stage of resource update. + */ + Client.Update update(); + + /** The template for Client update. */ + interface Update + extends UpdateStages.WithDescription, + UpdateStages.WithAuthenticationName, + UpdateStages.WithAuthentication, + UpdateStages.WithClientCertificateAuthentication, + UpdateStages.WithState, + UpdateStages.WithAttributes { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Client apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Client apply(Context context); + } + /** The Client update stages. */ + interface UpdateStages { + /** The stage of the Client update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: Description for the Client resource.. + * + * @param description Description for the Client resource. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the Client update allowing to specify authenticationName. */ + interface WithAuthenticationName { + /** + * Specifies the authenticationName property: The name presented by the client for authentication. The + * default value is the name of the resource.. + * + * @param authenticationName The name presented by the client for authentication. The default value is the + * name of the resource. + * @return the next definition stage. + */ + Update withAuthenticationName(String authenticationName); + } + /** The stage of the Client update allowing to specify authentication. */ + interface WithAuthentication { + /** + * Specifies the authentication property: Authentication information for the client.. + * + * @param authentication Authentication information for the client. + * @return the next definition stage. + */ + Update withAuthentication(ClientAuthentication authentication); + } + /** The stage of the Client update allowing to specify clientCertificateAuthentication. */ + interface WithClientCertificateAuthentication { + /** + * Specifies the clientCertificateAuthentication property: The client certificate authentication + * information.. + * + * @param clientCertificateAuthentication The client certificate authentication information. + * @return the next definition stage. + */ + Update withClientCertificateAuthentication(ClientCertificateAuthentication clientCertificateAuthentication); + } + /** The stage of the Client update allowing to specify state. */ + interface WithState { + /** + * Specifies the state property: Indicates if the client is enabled or not. Default value is Enabled.. + * + * @param state Indicates if the client is enabled or not. Default value is Enabled. + * @return the next definition stage. + */ + Update withState(ClientState state); + } + /** The stage of the Client update allowing to specify attributes. */ + interface WithAttributes { + /** + * Specifies the attributes property: Attributes for the client. Supported values are int, bool, string, + * string[]. Example: "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }. + * + * @param attributes Attributes for the client. Supported values are int, bool, string, string[]. Example: + * "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }. + * @return the next definition stage. + */ + Update withAttributes(Map attributes); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Client refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Client refresh(Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientAuthentication.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientAuthentication.java new file mode 100644 index 000000000000..68797f3ec823 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientAuthentication.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Authentication properties for the client. */ +@Fluent +public final class ClientAuthentication { + /* + * The self signed certificate's thumbprints data used for authentication. + */ + @JsonProperty(value = "certificateThumbprint") + private ClientCertificateThumbprint certificateThumbprint; + + /* + * The CA certificate subject name used for authentication. + */ + @JsonProperty(value = "certificateSubject") + private ClientCertificateSubjectDistinguishedName certificateSubject; + + /** Creates an instance of ClientAuthentication class. */ + public ClientAuthentication() { + } + + /** + * Get the certificateThumbprint property: The self signed certificate's thumbprints data used for authentication. + * + * @return the certificateThumbprint value. + */ + public ClientCertificateThumbprint certificateThumbprint() { + return this.certificateThumbprint; + } + + /** + * Set the certificateThumbprint property: The self signed certificate's thumbprints data used for authentication. + * + * @param certificateThumbprint the certificateThumbprint value to set. + * @return the ClientAuthentication object itself. + */ + public ClientAuthentication withCertificateThumbprint(ClientCertificateThumbprint certificateThumbprint) { + this.certificateThumbprint = certificateThumbprint; + return this; + } + + /** + * Get the certificateSubject property: The CA certificate subject name used for authentication. + * + * @return the certificateSubject value. + */ + public ClientCertificateSubjectDistinguishedName certificateSubject() { + return this.certificateSubject; + } + + /** + * Set the certificateSubject property: The CA certificate subject name used for authentication. + * + * @param certificateSubject the certificateSubject value to set. + * @return the ClientAuthentication object itself. + */ + public ClientAuthentication withCertificateSubject(ClientCertificateSubjectDistinguishedName certificateSubject) { + this.certificateSubject = certificateSubject; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (certificateThumbprint() != null) { + certificateThumbprint().validate(); + } + if (certificateSubject() != null) { + certificateSubject().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientAuthenticationSettings.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientAuthenticationSettings.java new file mode 100644 index 000000000000..5c4b8fa648a8 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientAuthenticationSettings.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Client authentication settings for namespace resource. */ +@Fluent +public final class ClientAuthenticationSettings { + /* + * Alternative authentication name sources related to client authentication settings for namespace resource. + */ + @JsonProperty(value = "alternativeAuthenticationNameSources") + private List alternativeAuthenticationNameSources; + + /** Creates an instance of ClientAuthenticationSettings class. */ + public ClientAuthenticationSettings() { + } + + /** + * Get the alternativeAuthenticationNameSources property: Alternative authentication name sources related to client + * authentication settings for namespace resource. + * + * @return the alternativeAuthenticationNameSources value. + */ + public List alternativeAuthenticationNameSources() { + return this.alternativeAuthenticationNameSources; + } + + /** + * Set the alternativeAuthenticationNameSources property: Alternative authentication name sources related to client + * authentication settings for namespace resource. + * + * @param alternativeAuthenticationNameSources the alternativeAuthenticationNameSources value to set. + * @return the ClientAuthenticationSettings object itself. + */ + public ClientAuthenticationSettings withAlternativeAuthenticationNameSources( + List alternativeAuthenticationNameSources) { + this.alternativeAuthenticationNameSources = alternativeAuthenticationNameSources; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateAuthentication.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateAuthentication.java new file mode 100644 index 000000000000..551a0e310ec7 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateAuthentication.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The certificate authentication properties for the client. */ +@Fluent +public final class ClientCertificateAuthentication { + /* + * The validation scheme used to authenticate the client. Default value is SubjectMatchesAuthenticationName. + */ + @JsonProperty(value = "validationScheme") + private ClientCertificateValidationScheme validationScheme; + + /* + * The list of thumbprints that are allowed during client authentication. This property is required only if the + * validationScheme is 'ThumbprintMatch'. + */ + @JsonProperty(value = "allowedThumbprints") + private List allowedThumbprints; + + /** Creates an instance of ClientCertificateAuthentication class. */ + public ClientCertificateAuthentication() { + } + + /** + * Get the validationScheme property: The validation scheme used to authenticate the client. Default value is + * SubjectMatchesAuthenticationName. + * + * @return the validationScheme value. + */ + public ClientCertificateValidationScheme validationScheme() { + return this.validationScheme; + } + + /** + * Set the validationScheme property: The validation scheme used to authenticate the client. Default value is + * SubjectMatchesAuthenticationName. + * + * @param validationScheme the validationScheme value to set. + * @return the ClientCertificateAuthentication object itself. + */ + public ClientCertificateAuthentication withValidationScheme(ClientCertificateValidationScheme validationScheme) { + this.validationScheme = validationScheme; + return this; + } + + /** + * Get the allowedThumbprints property: The list of thumbprints that are allowed during client authentication. This + * property is required only if the validationScheme is 'ThumbprintMatch'. + * + * @return the allowedThumbprints value. + */ + public List allowedThumbprints() { + return this.allowedThumbprints; + } + + /** + * Set the allowedThumbprints property: The list of thumbprints that are allowed during client authentication. This + * property is required only if the validationScheme is 'ThumbprintMatch'. + * + * @param allowedThumbprints the allowedThumbprints value to set. + * @return the ClientCertificateAuthentication object itself. + */ + public ClientCertificateAuthentication withAllowedThumbprints(List allowedThumbprints) { + this.allowedThumbprints = allowedThumbprints; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateSubjectDistinguishedName.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateSubjectDistinguishedName.java new file mode 100644 index 000000000000..b3b5013e038c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateSubjectDistinguishedName.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * CA certificate subject distinguished name information used by service to authenticate clients. For more information, + * see + * https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x500distinguishedname?view=net-6.0#remarks. + */ +@Fluent +public final class ClientCertificateSubjectDistinguishedName { + /* + * The common name field in the subject name. The allowed limit is 64 characters and it should be specified. + */ + @JsonProperty(value = "commonName") + private String commonName; + + /* + * The organization field in the subject name. If present, the allowed limit is 64 characters. + */ + @JsonProperty(value = "organization") + private String organization; + + /* + * The organization unit field in the subject name. If present, the allowed limit is 32 characters. + */ + @JsonProperty(value = "organizationUnit") + private String organizationUnit; + + /* + * The country code field in the subject name. If present, the country code should be represented by two-letter + * code defined in ISO 2166-1 (alpha-2). For example: 'US'. + */ + @JsonProperty(value = "countryCode") + private String countryCode; + + /** Creates an instance of ClientCertificateSubjectDistinguishedName class. */ + public ClientCertificateSubjectDistinguishedName() { + } + + /** + * Get the commonName property: The common name field in the subject name. The allowed limit is 64 characters and it + * should be specified. + * + * @return the commonName value. + */ + public String commonName() { + return this.commonName; + } + + /** + * Set the commonName property: The common name field in the subject name. The allowed limit is 64 characters and it + * should be specified. + * + * @param commonName the commonName value to set. + * @return the ClientCertificateSubjectDistinguishedName object itself. + */ + public ClientCertificateSubjectDistinguishedName withCommonName(String commonName) { + this.commonName = commonName; + return this; + } + + /** + * Get the organization property: The organization field in the subject name. If present, the allowed limit is 64 + * characters. + * + * @return the organization value. + */ + public String organization() { + return this.organization; + } + + /** + * Set the organization property: The organization field in the subject name. If present, the allowed limit is 64 + * characters. + * + * @param organization the organization value to set. + * @return the ClientCertificateSubjectDistinguishedName object itself. + */ + public ClientCertificateSubjectDistinguishedName withOrganization(String organization) { + this.organization = organization; + return this; + } + + /** + * Get the organizationUnit property: The organization unit field in the subject name. If present, the allowed limit + * is 32 characters. + * + * @return the organizationUnit value. + */ + public String organizationUnit() { + return this.organizationUnit; + } + + /** + * Set the organizationUnit property: The organization unit field in the subject name. If present, the allowed limit + * is 32 characters. + * + * @param organizationUnit the organizationUnit value to set. + * @return the ClientCertificateSubjectDistinguishedName object itself. + */ + public ClientCertificateSubjectDistinguishedName withOrganizationUnit(String organizationUnit) { + this.organizationUnit = organizationUnit; + return this; + } + + /** + * Get the countryCode property: The country code field in the subject name. If present, the country code should be + * represented by two-letter code defined in ISO 2166-1 (alpha-2). For example: 'US'. + * + * @return the countryCode value. + */ + public String countryCode() { + return this.countryCode; + } + + /** + * Set the countryCode property: The country code field in the subject name. If present, the country code should be + * represented by two-letter code defined in ISO 2166-1 (alpha-2). For example: 'US'. + * + * @param countryCode the countryCode value to set. + * @return the ClientCertificateSubjectDistinguishedName object itself. + */ + public ClientCertificateSubjectDistinguishedName withCountryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateThumbprint.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateThumbprint.java new file mode 100644 index 000000000000..c82af9d4ef87 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateThumbprint.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Thumbprints are used by the service to validate the device permission when authentication is done using self signed + * certificate. + */ +@Fluent +public final class ClientCertificateThumbprint { + /* + * The primary thumbprint used for validation. + */ + @JsonProperty(value = "primary") + private String primary; + + /* + * The secondary thumbprint used for validation. + */ + @JsonProperty(value = "secondary") + private String secondary; + + /** Creates an instance of ClientCertificateThumbprint class. */ + public ClientCertificateThumbprint() { + } + + /** + * Get the primary property: The primary thumbprint used for validation. + * + * @return the primary value. + */ + public String primary() { + return this.primary; + } + + /** + * Set the primary property: The primary thumbprint used for validation. + * + * @param primary the primary value to set. + * @return the ClientCertificateThumbprint object itself. + */ + public ClientCertificateThumbprint withPrimary(String primary) { + this.primary = primary; + return this; + } + + /** + * Get the secondary property: The secondary thumbprint used for validation. + * + * @return the secondary value. + */ + public String secondary() { + return this.secondary; + } + + /** + * Set the secondary property: The secondary thumbprint used for validation. + * + * @param secondary the secondary value to set. + * @return the ClientCertificateThumbprint object itself. + */ + public ClientCertificateThumbprint withSecondary(String secondary) { + this.secondary = secondary; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateValidationScheme.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateValidationScheme.java new file mode 100644 index 000000000000..6f4bff983442 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientCertificateValidationScheme.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The validation scheme used to authenticate the client. Default value is SubjectMatchesAuthenticationName. */ +public final class ClientCertificateValidationScheme extends ExpandableStringEnum { + /** Static value SubjectMatchesAuthenticationName for ClientCertificateValidationScheme. */ + public static final ClientCertificateValidationScheme SUBJECT_MATCHES_AUTHENTICATION_NAME = + fromString("SubjectMatchesAuthenticationName"); + + /** Static value DnsMatchesAuthenticationName for ClientCertificateValidationScheme. */ + public static final ClientCertificateValidationScheme DNS_MATCHES_AUTHENTICATION_NAME = + fromString("DnsMatchesAuthenticationName"); + + /** Static value UriMatchesAuthenticationName for ClientCertificateValidationScheme. */ + public static final ClientCertificateValidationScheme URI_MATCHES_AUTHENTICATION_NAME = + fromString("UriMatchesAuthenticationName"); + + /** Static value IpMatchesAuthenticationName for ClientCertificateValidationScheme. */ + public static final ClientCertificateValidationScheme IP_MATCHES_AUTHENTICATION_NAME = + fromString("IpMatchesAuthenticationName"); + + /** Static value EmailMatchesAuthenticationName for ClientCertificateValidationScheme. */ + public static final ClientCertificateValidationScheme EMAIL_MATCHES_AUTHENTICATION_NAME = + fromString("EmailMatchesAuthenticationName"); + + /** Static value ThumbprintMatch for ClientCertificateValidationScheme. */ + public static final ClientCertificateValidationScheme THUMBPRINT_MATCH = fromString("ThumbprintMatch"); + + /** + * Creates a new instance of ClientCertificateValidationScheme value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClientCertificateValidationScheme() { + } + + /** + * Creates or finds a ClientCertificateValidationScheme from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClientCertificateValidationScheme. + */ + @JsonCreator + public static ClientCertificateValidationScheme fromString(String name) { + return fromString(name, ClientCertificateValidationScheme.class); + } + + /** + * Gets known ClientCertificateValidationScheme values. + * + * @return known ClientCertificateValidationScheme values. + */ + public static Collection values() { + return values(ClientCertificateValidationScheme.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroup.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroup.java new file mode 100644 index 000000000000..6cf35b571d0b --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroup.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner; + +/** An immutable client-side representation of ClientGroup. */ +public interface ClientGroup { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: The system metadata relating to the ClientGroup resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the description property: Description for the Client Group resource. + * + * @return the description value. + */ + String description(); + + /** + * Gets the query property: The grouping query for the clients. Example : attributes.keyName IN ['a', 'b', 'c']. + * + * @return the query value. + */ + String query(); + + /** + * Gets the provisioningState property: Provisioning state of the ClientGroup resource. + * + * @return the provisioningState value. + */ + ClientGroupProvisioningState provisioningState(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner object. + * + * @return the inner object. + */ + ClientGroupInner innerModel(); + + /** The entirety of the ClientGroup definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The ClientGroup definition stages. */ + interface DefinitionStages { + /** The first stage of the ClientGroup definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the ClientGroup definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, namespaceName. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @return the next definition stage. + */ + WithCreate withExistingNamespace(String resourceGroupName, String namespaceName); + } + /** + * The stage of the ClientGroup definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithDescription, DefinitionStages.WithQuery { + /** + * Executes the create request. + * + * @return the created resource. + */ + ClientGroup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ClientGroup create(Context context); + } + /** The stage of the ClientGroup definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: Description for the Client Group resource.. + * + * @param description Description for the Client Group resource. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the ClientGroup definition allowing to specify query. */ + interface WithQuery { + /** + * Specifies the query property: The grouping query for the clients. Example : attributes.keyName IN ['a', + * 'b', 'c'].. + * + * @param query The grouping query for the clients. Example : attributes.keyName IN ['a', 'b', 'c']. + * @return the next definition stage. + */ + WithCreate withQuery(String query); + } + } + /** + * Begins update for the ClientGroup resource. + * + * @return the stage of resource update. + */ + ClientGroup.Update update(); + + /** The template for ClientGroup update. */ + interface Update extends UpdateStages.WithDescription, UpdateStages.WithQuery { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ClientGroup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ClientGroup apply(Context context); + } + /** The ClientGroup update stages. */ + interface UpdateStages { + /** The stage of the ClientGroup update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: Description for the Client Group resource.. + * + * @param description Description for the Client Group resource. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the ClientGroup update allowing to specify query. */ + interface WithQuery { + /** + * Specifies the query property: The grouping query for the clients. Example : attributes.keyName IN ['a', + * 'b', 'c'].. + * + * @param query The grouping query for the clients. Example : attributes.keyName IN ['a', 'b', 'c']. + * @return the next definition stage. + */ + Update withQuery(String query); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ClientGroup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ClientGroup refresh(Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupProvisioningState.java new file mode 100644 index 000000000000..4ceca6507a9f --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupProvisioningState.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the ClientGroup resource. */ +public final class ClientGroupProvisioningState extends ExpandableStringEnum { + /** Static value Creating for ClientGroupProvisioningState. */ + public static final ClientGroupProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for ClientGroupProvisioningState. */ + public static final ClientGroupProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ClientGroupProvisioningState. */ + public static final ClientGroupProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for ClientGroupProvisioningState. */ + public static final ClientGroupProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for ClientGroupProvisioningState. */ + public static final ClientGroupProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for ClientGroupProvisioningState. */ + public static final ClientGroupProvisioningState FAILED = fromString("Failed"); + + /** Static value Deleted for ClientGroupProvisioningState. */ + public static final ClientGroupProvisioningState DELETED = fromString("Deleted"); + + /** + * Creates a new instance of ClientGroupProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClientGroupProvisioningState() { + } + + /** + * Creates or finds a ClientGroupProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClientGroupProvisioningState. + */ + @JsonCreator + public static ClientGroupProvisioningState fromString(String name) { + return fromString(name, ClientGroupProvisioningState.class); + } + + /** + * Gets known ClientGroupProvisioningState values. + * + * @return known ClientGroupProvisioningState values. + */ + public static Collection values() { + return values(ClientGroupProvisioningState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroups.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroups.java new file mode 100644 index 000000000000..486ab8a8d4fe --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroups.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of ClientGroups. */ +public interface ClientGroups { + /** + * Get a client group. + * + *

Get properties of a client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 properties of a client group along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String namespaceName, String clientGroupName, Context context); + + /** + * Get a client group. + * + *

Get properties of a client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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 properties of a client group. + */ + ClientGroup get(String resourceGroupName, String namespaceName, String clientGroupName); + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String clientGroupName); + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientGroupName Name of the client group. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String clientGroupName, Context context); + + /** + * List all client groups under a namespace. + * + *

Get all the client groups under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the client groups under a namespace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List all client groups under a namespace. + * + *

Get all the client groups under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the client groups under a namespace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); + + /** + * Get a client group. + * + *

Get properties of a client group. + * + * @param id the resource ID. + * @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 properties of a client group along with {@link Response}. + */ + ClientGroup getById(String id); + + /** + * Get a client group. + * + *

Get properties of a client group. + * + * @param id the resource ID. + * @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 properties of a client group along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete a client group. + * + *

Delete an existing client group. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ClientGroup resource. + * + * @param name resource name. + * @return the first stage of the new ClientGroup definition. + */ + ClientGroup.DefinitionStages.Blank define(String name); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupsListResult.java new file mode 100644 index 000000000000..8216d6c29ee2 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientGroupsListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientGroupInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Result of the List Client Group operation. */ +@Fluent +public final class ClientGroupsListResult { + /* + * A collection of Client Group. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link for the next page of Client Group. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of ClientGroupsListResult class. */ + public ClientGroupsListResult() { + } + + /** + * Get the value property: A collection of Client Group. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of Client Group. + * + * @param value the value value to set. + * @return the ClientGroupsListResult object itself. + */ + public ClientGroupsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link for the next page of Client Group. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link for the next page of Client Group. + * + * @param nextLink the nextLink value to set. + * @return the ClientGroupsListResult object itself. + */ + public ClientGroupsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientProvisioningState.java new file mode 100644 index 000000000000..5d7a0003afe7 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientProvisioningState.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the Client resource. */ +public final class ClientProvisioningState extends ExpandableStringEnum { + /** Static value Creating for ClientProvisioningState. */ + public static final ClientProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for ClientProvisioningState. */ + public static final ClientProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ClientProvisioningState. */ + public static final ClientProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for ClientProvisioningState. */ + public static final ClientProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for ClientProvisioningState. */ + public static final ClientProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for ClientProvisioningState. */ + public static final ClientProvisioningState FAILED = fromString("Failed"); + + /** Static value Deleted for ClientProvisioningState. */ + public static final ClientProvisioningState DELETED = fromString("Deleted"); + + /** + * Creates a new instance of ClientProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClientProvisioningState() { + } + + /** + * Creates or finds a ClientProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClientProvisioningState. + */ + @JsonCreator + public static ClientProvisioningState fromString(String name) { + return fromString(name, ClientProvisioningState.class); + } + + /** + * Gets known ClientProvisioningState values. + * + * @return known ClientProvisioningState values. + */ + public static Collection values() { + return values(ClientProvisioningState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientState.java new file mode 100644 index 000000000000..0a6c79324551 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientState.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Indicates if the client is enabled or not. Default value is Enabled. */ +public final class ClientState extends ExpandableStringEnum { + /** Static value Enabled for ClientState. */ + public static final ClientState ENABLED = fromString("Enabled"); + + /** Static value Disabled for ClientState. */ + public static final ClientState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ClientState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClientState() { + } + + /** + * Creates or finds a ClientState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClientState. + */ + @JsonCreator + public static ClientState fromString(String name) { + return fromString(name, ClientState.class); + } + + /** + * Gets known ClientState values. + * + * @return known ClientState values. + */ + public static Collection values() { + return values(ClientState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Clients.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Clients.java new file mode 100644 index 000000000000..83bc7a21c1f5 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Clients.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of Clients. */ +public interface Clients { + /** + * Get a client. + * + *

Get properties of a client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 properties of a client along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String namespaceName, String clientName, Context context); + + /** + * Get a client. + * + *

Get properties of a client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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 properties of a client. + */ + Client get(String resourceGroupName, String namespaceName, String clientName); + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String clientName); + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param clientName Name of the client. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String clientName, Context context); + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); + + /** + * Get a client. + * + *

Get properties of a client. + * + * @param id the resource ID. + * @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 properties of a client along with {@link Response}. + */ + Client getById(String id); + + /** + * Get a client. + * + *

Get properties of a client. + * + * @param id the resource ID. + * @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 properties of a client along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete a client. + * + *

Delete an existing client. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Client resource. + * + * @param name resource name. + * @return the first stage of the new Client definition. + */ + Client.DefinitionStages.Blank define(String name); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientsListResult.java new file mode 100644 index 000000000000..fba45d9834d8 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ClientsListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.ClientInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Result of the List Client operation. */ +@Fluent +public final class ClientsListResult { + /* + * A collection of Client. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link for the next page of Client. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of ClientsListResult class. */ + public ClientsListResult() { + } + + /** + * Get the value property: A collection of Client. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of Client. + * + * @param value the value value to set. + * @return the ClientsListResult object itself. + */ + public ClientsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link for the next page of Client. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link for the next page of Client. + * + * @param nextLink the nextLink value to set. + * @return the ClientsListResult object itself. + */ + public ClientsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConnectionState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConnectionState.java index e69fea9176cb..d46794587fd9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConnectionState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ConnectionState.java @@ -28,6 +28,10 @@ public final class ConnectionState { @JsonProperty(value = "actionsRequired") private String actionsRequired; + /** Creates an instance of ConnectionState class. */ + public ConnectionState() { + } + /** * Get the status property: Status of the connection. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DataResidencyBoundary.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DataResidencyBoundary.java index b2bf043a701d..949b22be4193 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DataResidencyBoundary.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DataResidencyBoundary.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DataResidencyBoundary. */ +/** Data Residency Boundary of the resource. */ public final class DataResidencyBoundary extends ExpandableStringEnum { /** Static value WithinGeopair for DataResidencyBoundary. */ public static final DataResidencyBoundary WITHIN_GEOPAIR = fromString("WithinGeopair"); @@ -16,6 +16,15 @@ public final class DataResidencyBoundary extends ExpandableStringEnum { /** Static value StorageBlob for DeadLetterEndPointType. */ public static final DeadLetterEndPointType STORAGE_BLOB = fromString("StorageBlob"); + /** + * Creates a new instance of DeadLetterEndPointType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeadLetterEndPointType() { + } + /** * Creates or finds a DeadLetterEndPointType from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterWithResourceIdentity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterWithResourceIdentity.java index 0dd8a3741878..6f26a5719a54 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterWithResourceIdentity.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeadLetterWithResourceIdentity.java @@ -9,7 +9,7 @@ /** Information about the deadletter destination with resource identity. */ @Fluent -public class DeadLetterWithResourceIdentity { +public final class DeadLetterWithResourceIdentity { /* * The identity to use when dead-lettering events. */ @@ -17,15 +17,17 @@ public class DeadLetterWithResourceIdentity { private EventSubscriptionIdentity identity; /* - * Information about the destination where events have to be delivered for - * the event subscription. - * Uses the managed identity setup on the parent resource (namely, topic or - * domain) to acquire the authentication tokens being used during delivery - * / dead-lettering. + * Information about the destination where events have to be delivered for the event subscription. + * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication + * tokens being used during delivery / dead-lettering. */ @JsonProperty(value = "deadLetterDestination") private DeadLetterDestination deadLetterDestination; + /** Creates an instance of DeadLetterWithResourceIdentity class. */ + public DeadLetterWithResourceIdentity() { + } + /** * Get the identity property: The identity to use when dead-lettering events. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMapping.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMapping.java index 1591af341a64..70fa67b888da 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMapping.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMapping.java @@ -29,6 +29,10 @@ public class DeliveryAttributeMapping { @JsonProperty(value = "name") private String name; + /** Creates an instance of DeliveryAttributeMapping class. */ + public DeliveryAttributeMapping() { + } + /** * Get the name property: Name of the delivery attribute or header. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMappingType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMappingType.java index 1416952ba26e..b9c3481395b3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMappingType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryAttributeMappingType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DeliveryAttributeMappingType. */ +/** Type of the delivery attribute or header name. */ public final class DeliveryAttributeMappingType extends ExpandableStringEnum { /** Static value Static for DeliveryAttributeMappingType. */ public static final DeliveryAttributeMappingType STATIC = fromString("Static"); @@ -16,6 +16,15 @@ public final class DeliveryAttributeMappingType extends ExpandableStringEnum { + /** Static value Queue for DeliveryMode. */ + public static final DeliveryMode QUEUE = fromString("Queue"); + + /** + * Creates a new instance of DeliveryMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeliveryMode() { + } + + /** + * Creates or finds a DeliveryMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeliveryMode. + */ + @JsonCreator + public static DeliveryMode fromString(String name) { + return fromString(name, DeliveryMode.class); + } + + /** + * Gets known DeliveryMode values. + * + * @return known DeliveryMode values. + */ + public static Collection values() { + return values(DeliveryMode.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliverySchema.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliverySchema.java new file mode 100644 index 000000000000..1f2eae7dda6d --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliverySchema.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The event delivery schema for the event subscription. */ +public final class DeliverySchema extends ExpandableStringEnum { + /** Static value CloudEventSchemaV1_0 for DeliverySchema. */ + public static final DeliverySchema CLOUD_EVENT_SCHEMA_V1_0 = fromString("CloudEventSchemaV1_0"); + + /** + * Creates a new instance of DeliverySchema value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeliverySchema() { + } + + /** + * Creates or finds a DeliverySchema from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeliverySchema. + */ + @JsonCreator + public static DeliverySchema fromString(String name) { + return fromString(name, DeliverySchema.class); + } + + /** + * Gets known DeliverySchema values. + * + * @return known DeliverySchema values. + */ + public static Collection values() { + return values(DeliverySchema.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryWithResourceIdentity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryWithResourceIdentity.java index 7cd2fde0c606..9f417387cfcb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryWithResourceIdentity.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DeliveryWithResourceIdentity.java @@ -9,7 +9,7 @@ /** Information about the delivery for an event subscription with resource identity. */ @Fluent -public class DeliveryWithResourceIdentity { +public final class DeliveryWithResourceIdentity { /* * The identity to use when delivering events. */ @@ -17,14 +17,17 @@ public class DeliveryWithResourceIdentity { private EventSubscriptionIdentity identity; /* - * Information about the destination where events have to be delivered for - * the event subscription. - * Uses Azure Event Grid's identity to acquire the authentication tokens - * being used during delivery / dead-lettering. + * Information about the destination where events have to be delivered for the event subscription. + * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / + * dead-lettering. */ @JsonProperty(value = "destination") private EventSubscriptionDestination destination; + /** Creates an instance of DeliveryWithResourceIdentity class. */ + public DeliveryWithResourceIdentity() { + } + /** * Get the identity property: The identity to use when delivering events. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domain.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domain.java index 4b1601841355..17823d29d86a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domain.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domain.java @@ -50,11 +50,11 @@ public interface Domain { Map tags(); /** - * Gets the systemData property: The system metadata relating to the Event Grid Domain resource. + * Gets the sku property: The Sku pricing tier for the Event Grid Domain resource. * - * @return the systemData value. + * @return the sku value. */ - SystemData systemData(); + ResourceSku sku(); /** * Gets the identity property: Identity information for the Event Grid Domain resource. @@ -64,7 +64,14 @@ public interface Domain { IdentityInfo identity(); /** - * Gets the privateEndpointConnections property: List of private endpoint connections. + * Gets the systemData property: The system metadata relating to the Event Grid Domain resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the privateEndpointConnections property: The privateEndpointConnections property. * * @return the privateEndpointConnections value. */ @@ -77,6 +84,14 @@ public interface Domain { */ DomainProvisioningState provisioningState(); + /** + * Gets the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @return the minimumTlsVersionAllowed value. + */ + TlsVersion minimumTlsVersionAllowed(); + /** * Gets the endpoint property: Endpoint for the Event Grid Domain Resource which is used for publishing the events. * @@ -92,6 +107,14 @@ public interface Domain { */ InputSchema inputSchema(); + /** + * Gets the eventTypeInfo property: Event Type Information for the domain. This information is provided by the + * publisher and can be used by the subscriber to view different types of events that are published. + * + * @return the eventTypeInfo value. + */ + EventTypeInfo eventTypeInfo(); + /** * Gets the inputSchemaMapping property: Information about the InputSchemaMapping which specified the info about * mapping event payload. @@ -244,8 +267,11 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, + DefinitionStages.WithSku, DefinitionStages.WithIdentity, + DefinitionStages.WithMinimumTlsVersionAllowed, DefinitionStages.WithInputSchema, + DefinitionStages.WithEventTypeInfo, DefinitionStages.WithInputSchemaMapping, DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithInboundIpRules, @@ -278,6 +304,16 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the Domain definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The Sku pricing tier for the Event Grid Domain resource.. + * + * @param sku The Sku pricing tier for the Event Grid Domain resource. + * @return the next definition stage. + */ + WithCreate withSku(ResourceSku sku); + } /** The stage of the Domain definition allowing to specify identity. */ interface WithIdentity { /** @@ -288,6 +324,17 @@ interface WithIdentity { */ WithCreate withIdentity(IdentityInfo identity); } + /** The stage of the Domain definition allowing to specify minimumTlsVersionAllowed. */ + interface WithMinimumTlsVersionAllowed { + /** + * Specifies the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish + * to this domain. + * + * @param minimumTlsVersionAllowed Minimum TLS version of the publisher allowed to publish to this domain. + * @return the next definition stage. + */ + WithCreate withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed); + } /** The stage of the Domain definition allowing to specify inputSchema. */ interface WithInputSchema { /** @@ -300,6 +347,18 @@ interface WithInputSchema { */ WithCreate withInputSchema(InputSchema inputSchema); } + /** The stage of the Domain definition allowing to specify eventTypeInfo. */ + interface WithEventTypeInfo { + /** + * Specifies the eventTypeInfo property: Event Type Information for the domain. This information is provided + * by the publisher and can be used by the subscriber to view different types of events that are published.. + * + * @param eventTypeInfo Event Type Information for the domain. This information is provided by the publisher + * and can be used by the subscriber to view different types of events that are published. + * @return the next definition stage. + */ + WithCreate withEventTypeInfo(EventTypeInfo eventTypeInfo); + } /** The stage of the Domain definition allowing to specify inputSchemaMapping. */ interface WithInputSchemaMapping { /** @@ -431,12 +490,15 @@ interface WithDataResidencyBoundary { interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, + UpdateStages.WithSku, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithInboundIpRules, + UpdateStages.WithMinimumTlsVersionAllowed, UpdateStages.WithDisableLocalAuth, UpdateStages.WithAutoCreateTopicWithFirstSubscription, UpdateStages.WithAutoDeleteTopicWithLastSubscription, - UpdateStages.WithDataResidencyBoundary { + UpdateStages.WithDataResidencyBoundary, + UpdateStages.WithEventTypeInfo { /** * Executes the update request. * @@ -474,19 +536,27 @@ interface WithIdentity { */ Update withIdentity(IdentityInfo identity); } + /** The stage of the Domain update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The Sku pricing tier for the domain.. + * + * @param sku The Sku pricing tier for the domain. + * @return the next definition stage. + */ + Update withSku(ResourceSku sku); + } /** The stage of the Domain update allowing to specify publicNetworkAccess. */ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: This determines if traffic is allowed over public network. By * default it is enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.DomainUpdateParameterProperties" - + ".InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.DomainUpdateParameterProperties.InboundIpRules" * />. * * @param publicNetworkAccess This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.DomainUpdateParameterProperties" - + ".InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.DomainUpdateParameterProperties.InboundIpRules" * />. * @return the next definition stage. */ @@ -504,6 +574,17 @@ interface WithInboundIpRules { */ Update withInboundIpRules(List inboundIpRules); } + /** The stage of the Domain update allowing to specify minimumTlsVersionAllowed. */ + interface WithMinimumTlsVersionAllowed { + /** + * Specifies the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish + * to this domain. + * + * @param minimumTlsVersionAllowed Minimum TLS version of the publisher allowed to publish to this domain. + * @return the next definition stage. + */ + Update withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed); + } /** The stage of the Domain update allowing to specify disableLocalAuth. */ interface WithDisableLocalAuth { /** @@ -584,6 +665,16 @@ interface WithDataResidencyBoundary { */ Update withDataResidencyBoundary(DataResidencyBoundary dataResidencyBoundary); } + /** The stage of the Domain update allowing to specify eventTypeInfo. */ + interface WithEventTypeInfo { + /** + * Specifies the eventTypeInfo property: The eventTypeInfo for the domain.. + * + * @param eventTypeInfo The eventTypeInfo for the domain. + * @return the next definition stage. + */ + Update withEventTypeInfo(EventTypeInfo eventTypeInfo); + } } /** * Refreshes the resource to sync with Azure. @@ -601,16 +692,9 @@ interface WithDataResidencyBoundary { Domain refresh(Context context); /** - * List the two keys used to publish to a domain. + * List keys for a domain. * - * @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 shared access keys of the Domain. - */ - DomainSharedAccessKeys listSharedAccessKeys(); - - /** - * List the two keys used to publish to a domain. + *

List the two keys used to publish to a domain. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -621,18 +705,20 @@ interface WithDataResidencyBoundary { Response listSharedAccessKeysWithResponse(Context context); /** - * Regenerate a shared access key for a domain. + * List keys for a domain. + * + *

List the two keys used to publish to a domain. * - * @param regenerateKeyRequest Request body to regenerate key. - * @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 shared access keys of the Domain. */ - DomainSharedAccessKeys regenerateKey(DomainRegenerateKeyRequest regenerateKeyRequest); + DomainSharedAccessKeys listSharedAccessKeys(); /** - * Regenerate a shared access key for a domain. + * Regenerate key for a domain. + * + *

Regenerate a shared access key for a domain. * * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -643,4 +729,17 @@ interface WithDataResidencyBoundary { */ Response regenerateKeyWithResponse( DomainRegenerateKeyRequest regenerateKeyRequest, Context context); + + /** + * Regenerate key for a domain. + * + *

Regenerate a shared access key for a domain. + * + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Domain. + */ + DomainSharedAccessKeys regenerateKey(DomainRegenerateKeyRequest regenerateKeyRequest); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainEventSubscriptions.java index ea32735047cd..96d4b727633c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainEventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainEventSubscriptions.java @@ -12,66 +12,76 @@ /** Resource collection API of DomainEventSubscriptions. */ public interface DomainEventSubscriptions { /** - * Get all delivery attributes for an event subscription for domain. + * Get delivery attributes for an event subscription for domain. + * + *

Get all delivery attributes for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription for domain. + * @return all delivery attributes for an event subscription for domain along with {@link Response}. */ - DeliveryAttributeListResult getDeliveryAttributes( - String resourceGroupName, String domainName, String eventSubscriptionName); + Response getDeliveryAttributesWithResponse( + String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** - * Get all delivery attributes for an event subscription for domain. + * Get delivery attributes for an event subscription for domain. + * + *

Get all delivery attributes for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription for domain along with {@link Response}. + * @return all delivery attributes for an event subscription for domain. */ - Response getDeliveryAttributesWithResponse( - String resourceGroupName, String domainName, String eventSubscriptionName, Context context); + DeliveryAttributeListResult getDeliveryAttributes( + String resourceGroupName, String domainName, String eventSubscriptionName); /** - * Get properties of an event subscription of a domain. + * Get an event subscription of a domain. + * + *

Get properties of an event subscription of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the partner topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a domain. + * @return properties of an event subscription of a domain along with {@link Response}. */ - EventSubscription get(String resourceGroupName, String domainName, String eventSubscriptionName); + Response getWithResponse( + String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** - * Get properties of an event subscription of a domain. + * Get an event subscription of a domain. + * + *

Get properties of an event subscription of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the partner topic. + * @param domainName Name of the domain. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. - * @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 properties of an event subscription of a domain along with {@link Response}. + * @return properties of an event subscription of a domain. */ - Response getWithResponse( - String resourceGroupName, String domainName, String eventSubscriptionName, Context context); + EventSubscription get(String resourceGroupName, String domainName, String eventSubscriptionName); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -90,7 +100,9 @@ EventSubscription createOrUpdate( EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Create or update an event subscription to a domain. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. @@ -111,7 +123,9 @@ EventSubscription createOrUpdate( Context context); /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -124,7 +138,9 @@ EventSubscription createOrUpdate( void delete(String resourceGroupName, String domainName, String eventSubscriptionName); /** - * Delete an existing event subscription for a domain. + * Delete an event subscription for a domain. + * + *

Delete an existing event subscription for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -138,7 +154,9 @@ EventSubscription createOrUpdate( void delete(String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -156,7 +174,9 @@ EventSubscription update( EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription for a topic. + * Update an event subscription for a domain. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -176,35 +196,41 @@ EventSubscription update( Context context); /** - * Get the full endpoint URL for an event subscription for domain. + * Get full URL of an event subscription for domain. + * + *

Get the full endpoint URL for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. + * @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 the full endpoint URL for an event subscription for domain. + * @return the full endpoint URL for an event subscription for domain along with {@link Response}. */ - EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String domainName, String eventSubscriptionName); + Response getFullUrlWithResponse( + String resourceGroupName, String domainName, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for an event subscription for domain. + * Get full URL of an event subscription for domain. + * + *

Get the full endpoint URL for an event subscription for domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. - * @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 the full endpoint URL for an event subscription for domain along with {@link Response}. + * @return the full endpoint URL for an event subscription for domain. */ - Response getFullUrlWithResponse( - String resourceGroupName, String domainName, String eventSubscriptionName, Context context); + EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String domainName, String eventSubscriptionName); /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific domain. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -216,7 +242,9 @@ Response getFullUrlWithResponse( PagedIterable list(String resourceGroupName, String domainName); /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific domain. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainProvisioningState.java index 212b0449ea85..e1b873c70a34 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DomainProvisioningState. */ +/** Provisioning state of the Event Grid Domain Resource. */ public final class DomainProvisioningState extends ExpandableStringEnum { /** Static value Creating for DomainProvisioningState. */ public static final DomainProvisioningState CREATING = fromString("Creating"); @@ -28,6 +28,15 @@ public final class DomainProvisioningState extends ExpandableStringEnumGet all delivery attributes for an event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. + * @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 properties of a nested event subscription for a domain topic. + * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. */ - EventSubscription get(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); + Response getDeliveryAttributesWithResponse( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); /** - * Get properties of a nested event subscription for a domain topic. + * Get delivery attributes for an event subscription for domain topic. + * + *

Get all delivery attributes for an event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @param eventSubscriptionName Name of the event subscription. - * @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 properties of a nested event subscription for a domain topic along with {@link Response}. + * @return all delivery attributes for an event subscription for domain topic. */ - Response getWithResponse( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); + DeliveryAttributeListResult getDeliveryAttributes( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Get a nested event subscription for domain topic. + * + *

Get properties of a nested event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 100 characters in length and use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @param eventSubscriptionName Name of the event subscription. + * @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 event Subscription. + * @return properties of a nested event subscription for a domain topic along with {@link Response}. */ - EventSubscription createOrUpdate( - String resourceGroupName, - String domainName, - String topicName, - String eventSubscriptionName, - EventSubscriptionInner eventSubscriptionInfo); + Response getWithResponse( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); /** - * Asynchronously creates a new event subscription or updates an existing event subscription. + * Get a nested event subscription for domain topic. + * + *

Get properties of a nested event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 100 characters in length and use alphanumeric letters only. - * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. - * @param context The context to associate with this operation. + * @param eventSubscriptionName Name of the event subscription. * @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 event Subscription. + * @return properties of a nested event subscription for a domain topic. */ - EventSubscription createOrUpdate( - String resourceGroupName, - String domainName, - String topicName, - String eventSubscriptionName, - EventSubscriptionInner eventSubscriptionInfo, - Context context); + EventSubscription get(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -100,7 +96,9 @@ EventSubscription createOrUpdate( void delete(String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); /** - * Delete a nested existing event subscription for a domain topic. + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -116,49 +114,27 @@ void delete( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); /** - * Update an existing event subscription for a domain topic. + * Get full URL of a nested event subscription for domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. - * @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 event Subscription. - */ - EventSubscription update( - String resourceGroupName, - String domainName, - String topicName, - String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); - - /** - * Update an existing event subscription for a domain topic. + *

Get the full endpoint URL for a nested event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @param topicName Name of the topic. - * @param eventSubscriptionName Name of the event subscription to be updated. - * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @param domainName Name of the top level domain. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. * @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 event Subscription. + * @return the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. */ - EventSubscription update( - String resourceGroupName, - String domainName, - String topicName, - String eventSubscriptionName, - EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, - Context context); + Response getFullUrlWithResponse( + String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for a nested event subscription for domain topic. + * Get full URL of a nested event subscription for domain topic. + * + *

Get the full endpoint URL for a nested event subscription for domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -173,23 +149,9 @@ EventSubscriptionFullUrl getFullUrl( String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); /** - * Get the full endpoint URL for a nested event subscription for domain topic. + * List all nested event subscriptions for a specific domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. - */ - Response getFullUrlWithResponse( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); - - /** - * List all event subscriptions that have been created for a specific domain topic. + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -202,7 +164,9 @@ Response getFullUrlWithResponse( PagedIterable list(String resourceGroupName, String domainName, String topicName); /** - * List all event subscriptions that have been created for a specific domain topic. + * List all nested event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -225,33 +189,62 @@ PagedIterable list( String resourceGroupName, String domainName, String topicName, String filter, Integer top, Context context); /** - * Get all delivery attributes for an event subscription for domain topic. + * Get a nested event subscription for domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + *

Get properties of a nested event subscription for a domain topic. + * + * @param id the resource ID. * @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 all delivery attributes for an event subscription for domain topic. + * @return properties of a nested event subscription for a domain topic along with {@link Response}. */ - DeliveryAttributeListResult getDeliveryAttributes( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName); + EventSubscription getById(String id); /** - * Get all delivery attributes for an event subscription for domain topic. + * Get a nested event subscription for domain topic. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + *

Get properties of a nested event subscription for a domain topic. + * + * @param id the resource ID. * @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 all delivery attributes for an event subscription for domain topic along with {@link Response}. + * @return properties of a nested event subscription for a domain topic along with {@link Response}. */ - Response getDeliveryAttributesWithResponse( - String resourceGroupName, String domainName, String topicName, String eventSubscriptionName, Context context); + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete a nested event subscription for a domain topic. + * + *

Delete a nested existing event subscription for a domain topic. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new EventSubscription resource. + * + * @param name resource name. + * @return the first stage of the new EventSubscription definition. + */ + EventSubscription.DefinitionStages.Blank define(String name); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicProvisioningState.java index 1b691f4a40fa..9e85d1809ba0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DomainTopicProvisioningState. */ +/** Provisioning state of the domain topic. */ public final class DomainTopicProvisioningState extends ExpandableStringEnum { /** Static value Creating for DomainTopicProvisioningState. */ public static final DomainTopicProvisioningState CREATING = fromString("Creating"); @@ -28,6 +28,15 @@ public final class DomainTopicProvisioningState extends ExpandableStringEnumGet properties of a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. + * @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 properties of a domain topic. + * @return properties of a domain topic along with {@link Response}. */ - DomainTopic get(String resourceGroupName, String domainName, String domainTopicName); + Response getWithResponse( + String resourceGroupName, String domainName, String domainTopicName, Context context); /** - * Get properties of a domain topic. + * Get a domain topic. + * + *

Get properties of a domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. * @param domainTopicName Name of the topic. - * @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 properties of a domain topic along with {@link Response}. + * @return properties of a domain topic. */ - Response getWithResponse( - String resourceGroupName, String domainName, String domainTopicName, Context context); + DomainTopic get(String resourceGroupName, String domainName, String domainTopicName); /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -52,7 +58,9 @@ Response getWithResponse( DomainTopic createOrUpdate(String resourceGroupName, String domainName, String domainTopicName); /** - * Asynchronously creates or updates a new domain topic with the specified parameters. + * Create or update a domain topic. + * + *

Asynchronously creates or updates a new domain topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -66,7 +74,9 @@ Response getWithResponse( DomainTopic createOrUpdate(String resourceGroupName, String domainName, String domainTopicName, Context context); /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -78,7 +88,9 @@ Response getWithResponse( void delete(String resourceGroupName, String domainName, String domainTopicName); /** - * Delete existing domain topic. + * Delete a domain topic. + * + *

Delete existing domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -91,7 +103,9 @@ Response getWithResponse( void delete(String resourceGroupName, String domainName, String domainTopicName, Context context); /** - * List all the topics in a domain. + * List domain topics. + * + *

List all the topics in a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Domain name. @@ -103,7 +117,9 @@ Response getWithResponse( PagedIterable listByDomain(String resourceGroupName, String domainName); /** - * List all the topics in a domain. + * List domain topics. + * + *

List all the topics in a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Domain name. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicsListResult.java index d6387f5ada4a..be0f5137f1cd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainTopicsListResult.java @@ -24,6 +24,10 @@ public final class DomainTopicsListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of DomainTopicsListResult class. */ + public DomainTopicsListResult() { + } + /** * Get the value property: A collection of Domain Topics. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainUpdateParameters.java index 356b8e20d97d..e6f6df7cb75c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainUpdateParameters.java @@ -33,6 +33,16 @@ public final class DomainUpdateParameters { @JsonProperty(value = "identity") private IdentityInfo identity; + /* + * The Sku pricing tier for the domain. + */ + @JsonProperty(value = "sku") + private ResourceSku sku; + + /** Creates an instance of DomainUpdateParameters class. */ + public DomainUpdateParameters() { + } + /** * Get the tags property: Tags of the domains resource. * @@ -82,6 +92,26 @@ public DomainUpdateParameters withIdentity(IdentityInfo identity) { return this; } + /** + * Get the sku property: The Sku pricing tier for the domain. + * + * @return the sku value. + */ + public ResourceSku sku() { + return this.sku; + } + + /** + * Set the sku property: The Sku pricing tier for the domain. + * + * @param sku the sku value to set. + * @return the DomainUpdateParameters object itself. + */ + public DomainUpdateParameters withSku(ResourceSku sku) { + this.sku = sku; + return this; + } + /** * Get the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso @@ -136,6 +166,31 @@ public DomainUpdateParameters withInboundIpRules(List inboundIpRu return this; } + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.innerProperties() == null ? null : this.innerProperties().minimumTlsVersionAllowed(); + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the DomainUpdateParameters object itself. + */ + public DomainUpdateParameters withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainUpdateParameterProperties(); + } + this.innerProperties().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + /** * Get the disableLocalAuth property: This boolean is used to enable or disable local auth. Default value is false. * When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to @@ -265,6 +320,29 @@ public DomainUpdateParameters withDataResidencyBoundary(DataResidencyBoundary da return this; } + /** + * Get the eventTypeInfo property: The eventTypeInfo for the domain. + * + * @return the eventTypeInfo value. + */ + public EventTypeInfo eventTypeInfo() { + return this.innerProperties() == null ? null : this.innerProperties().eventTypeInfo(); + } + + /** + * Set the eventTypeInfo property: The eventTypeInfo for the domain. + * + * @param eventTypeInfo the eventTypeInfo value to set. + * @return the DomainUpdateParameters object itself. + */ + public DomainUpdateParameters withEventTypeInfo(EventTypeInfo eventTypeInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainUpdateParameterProperties(); + } + this.innerProperties().withEventTypeInfo(eventTypeInfo); + return this; + } + /** * Validates the instance. * @@ -277,5 +355,8 @@ public void validate() { if (identity() != null) { identity().validate(); } + if (sku() != null) { + sku().validate(); + } } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domains.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domains.java index a92f8a0c8fc2..35ca6f2b36d6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domains.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domains.java @@ -11,32 +11,38 @@ /** Resource collection API of Domains. */ public interface Domains { /** - * Get properties of a domain. + * Get a domain. + * + *

Get properties of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. + * @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 properties of a domain. + * @return properties of a domain along with {@link Response}. */ - Domain getByResourceGroup(String resourceGroupName, String domainName); + Response getByResourceGroupWithResponse(String resourceGroupName, String domainName, Context context); /** - * Get properties of a domain. + * Get a domain. + * + *

Get properties of a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. - * @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 properties of a domain along with {@link Response}. + * @return properties of a domain. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String domainName, Context context); + Domain getByResourceGroup(String resourceGroupName, String domainName); /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -47,7 +53,9 @@ public interface Domains { void deleteByResourceGroup(String resourceGroupName, String domainName); /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -59,7 +67,9 @@ public interface Domains { void delete(String resourceGroupName, String domainName, Context context); /** - * List all the domains under an Azure subscription. + * List domains under an Azure subscription. + * + *

List all the domains under an Azure subscription. * * @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. @@ -68,7 +78,9 @@ public interface Domains { PagedIterable list(); /** - * List all the domains under an Azure subscription. + * List domains under an Azure subscription. + * + *

List all the domains under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -87,7 +99,9 @@ public interface Domains { PagedIterable list(String filter, Integer top, Context context); /** - * List all the domains under a resource group. + * List domains under a resource group. + * + *

List all the domains under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,7 +112,9 @@ public interface Domains { PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the domains under a resource group. + * List domains under a resource group. + * + *

List all the domains under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -118,19 +134,9 @@ public interface Domains { PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context); /** - * List the two keys used to publish to a domain. + * List keys for a domain. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain. - * @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 shared access keys of the Domain. - */ - DomainSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String domainName); - - /** - * List the two keys used to publish to a domain. + *

List the two keys used to publish to a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -144,21 +150,23 @@ Response listSharedAccessKeysWithResponse( String resourceGroupName, String domainName, Context context); /** - * Regenerate a shared access key for a domain. + * List keys for a domain. + * + *

List the two keys used to publish to a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. - * @param regenerateKeyRequest Request body to regenerate key. * @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 shared access keys of the Domain. */ - DomainSharedAccessKeys regenerateKey( - String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest); + DomainSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String domainName); /** - * Regenerate a shared access key for a domain. + * Regenerate key for a domain. + * + *

Regenerate a shared access key for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain. @@ -173,7 +181,25 @@ Response regenerateKeyWithResponse( String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest, Context context); /** - * Get properties of a domain. + * Regenerate key for a domain. + * + *

Regenerate a shared access key for a domain. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the domain. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Domain. + */ + DomainSharedAccessKeys regenerateKey( + String resourceGroupName, String domainName, DomainRegenerateKeyRequest regenerateKeyRequest); + + /** + * Get a domain. + * + *

Get properties of a domain. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,7 +210,9 @@ Response regenerateKeyWithResponse( Domain getById(String id); /** - * Get properties of a domain. + * Get a domain. + * + *

Get properties of a domain. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -196,7 +224,9 @@ Response regenerateKeyWithResponse( Response getByIdWithResponse(String id, Context context); /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -206,7 +236,9 @@ Response regenerateKeyWithResponse( void deleteById(String id); /** - * Delete existing domain. + * Delete a domain. + * + *

Delete existing domain. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainsListResult.java index 3a2cda2b82ca..a5d10788875d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DomainsListResult.java @@ -24,6 +24,10 @@ public final class DomainsListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of DomainsListResult class. */ + public DomainsListResult() { + } + /** * Get the value property: A collection of Domains. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicDeliveryAttributeMapping.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicDeliveryAttributeMapping.java index b3a3a44e039d..c82e31c9f963 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicDeliveryAttributeMapping.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicDeliveryAttributeMapping.java @@ -21,6 +21,10 @@ public final class DynamicDeliveryAttributeMapping extends DeliveryAttributeMapp @JsonProperty(value = "properties") private DynamicDeliveryAttributeMappingProperties innerProperties; + /** Creates an instance of DynamicDeliveryAttributeMapping class. */ + public DynamicDeliveryAttributeMapping() { + } + /** * Get the innerProperties property: Properties of dynamic delivery attribute mapping. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicRoutingEnrichment.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicRoutingEnrichment.java new file mode 100644 index 000000000000..aa4e0a959326 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/DynamicRoutingEnrichment.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DynamicRoutingEnrichment model. */ +@Fluent +public final class DynamicRoutingEnrichment { + /* + * Dynamic routing enrichment key. + */ + @JsonProperty(value = "key") + private String key; + + /* + * Dynamic routing enrichment value. + */ + @JsonProperty(value = "value") + private String value; + + /** Creates an instance of DynamicRoutingEnrichment class. */ + public DynamicRoutingEnrichment() { + } + + /** + * Get the key property: Dynamic routing enrichment key. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: Dynamic routing enrichment key. + * + * @param key the key value to set. + * @return the DynamicRoutingEnrichment object itself. + */ + public DynamicRoutingEnrichment withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the value property: Dynamic routing enrichment value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Dynamic routing enrichment value. + * + * @param value the value value to set. + * @return the DynamicRoutingEnrichment object itself. + */ + public DynamicRoutingEnrichment withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EndpointType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EndpointType.java index d4740d2a882e..a58544d455b3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EndpointType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EndpointType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EndpointType. */ +/** Type of the endpoint for the event subscription destination. */ public final class EndpointType extends ExpandableStringEnum { /** Static value WebHook for EndpointType. */ public static final EndpointType WEB_HOOK = fromString("WebHook"); @@ -31,6 +31,18 @@ public final class EndpointType extends ExpandableStringEnum { /** Static value AzureFunction for EndpointType. */ public static final EndpointType AZURE_FUNCTION = fromString("AzureFunction"); + /** Static value PartnerDestination for EndpointType. */ + public static final EndpointType PARTNER_DESTINATION = fromString("PartnerDestination"); + + /** + * Creates a new instance of EndpointType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EndpointType() { + } + /** * Creates or finds a EndpointType from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDefinitionKind.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDefinitionKind.java index 8d7fec095d82..4be9190f7a95 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDefinitionKind.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDefinitionKind.java @@ -8,11 +8,20 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EventDefinitionKind. */ +/** The kind of event type used. */ public final class EventDefinitionKind extends ExpandableStringEnum { /** Static value Inline for EventDefinitionKind. */ public static final EventDefinitionKind INLINE = fromString("Inline"); + /** + * Creates a new instance of EventDefinitionKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EventDefinitionKind() { + } + /** * Creates or finds a EventDefinitionKind from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDeliverySchema.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDeliverySchema.java index fda4bd90184e..1e9f075877cc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDeliverySchema.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventDeliverySchema.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EventDeliverySchema. */ +/** The event delivery schema for the event subscription. */ public final class EventDeliverySchema extends ExpandableStringEnum { /** Static value EventGridSchema for EventDeliverySchema. */ public static final EventDeliverySchema EVENT_GRID_SCHEMA = fromString("EventGridSchema"); @@ -19,6 +19,15 @@ public final class EventDeliverySchema extends ExpandableStringEnum { + /** Static value CloudEventSchemaV1_0 for EventInputSchema. */ + public static final EventInputSchema CLOUD_EVENT_SCHEMA_V1_0 = fromString("CloudEventSchemaV1_0"); + + /** + * Creates a new instance of EventInputSchema value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EventInputSchema() { + } + + /** + * Creates or finds a EventInputSchema from its string representation. + * + * @param name a name to look for. + * @return the corresponding EventInputSchema. + */ + @JsonCreator + public static EventInputSchema fromString(String name) { + return fromString(name, EventInputSchema.class); + } + + /** + * Gets known EventInputSchema values. + * + * @return known EventInputSchema values. + */ + public static Collection values() { + return values(EventInputSchema.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscription.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscription.java index 624a52000fd2..bc8800f8f46b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscription.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscription.java @@ -154,13 +154,14 @@ interface Blank extends WithParentResource { /** The stage of the EventSubscription definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, topicName. + * Specifies resourceGroupName, domainName, topicName. * * @param resourceGroupName The name of the resource group within the user's subscription. + * @param domainName Name of the top level domain. * @param topicName Name of the domain topic. * @return the next definition stage. */ - WithCreate withExistingTopic(String resourceGroupName, String topicName); + WithCreate withExistingTopic(String resourceGroupName, String domainName, String topicName); } /** * The stage of the EventSubscription definition which contains all the minimum required properties for the @@ -467,42 +468,50 @@ interface WithDeadLetterWithResourceIdentity { EventSubscription refresh(Context context); /** - * Get all delivery attributes for an event subscription for topic. + * Get delivery attributes for an event subscription for domain topic. * - * @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 all delivery attributes for an event subscription for topic. - */ - DeliveryAttributeListResult getDeliveryAttributes(); - - /** - * Get all delivery attributes for an event subscription for topic. + *

Get all delivery attributes for an event subscription for domain topic. * * @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 all delivery attributes for an event subscription for topic along with {@link Response}. + * @return all delivery attributes for an event subscription for domain topic along with {@link Response}. */ Response getDeliveryAttributesWithResponse(Context context); /** - * Get the full endpoint URL for an event subscription for topic. + * Get delivery attributes for an event subscription for domain topic. + * + *

Get all delivery attributes for an event subscription for domain topic. * * @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 full endpoint URL for an event subscription for topic. + * @return all delivery attributes for an event subscription for domain topic. */ - EventSubscriptionFullUrl getFullUrl(); + DeliveryAttributeListResult getDeliveryAttributes(); /** - * Get the full endpoint URL for an event subscription for topic. + * Get full URL of a nested event subscription for domain topic. + * + *

Get the full endpoint URL for a nested event subscription for domain topic. * * @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 the full endpoint URL for an event subscription for topic along with {@link Response}. + * @return the full endpoint URL for a nested event subscription for domain topic along with {@link Response}. */ Response getFullUrlWithResponse(Context context); + + /** + * Get full URL of a nested event subscription for domain topic. + * + *

Get the full endpoint URL for a nested event subscription for domain topic. + * + * @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 full endpoint URL for a nested event subscription for domain topic. + */ + EventSubscriptionFullUrl getFullUrl(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionDestination.java index 7a53b4d754ff..f1707fdec2d4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionDestination.java @@ -23,10 +23,15 @@ @JsonSubTypes.Type(name = "HybridConnection", value = HybridConnectionEventSubscriptionDestination.class), @JsonSubTypes.Type(name = "ServiceBusQueue", value = ServiceBusQueueEventSubscriptionDestination.class), @JsonSubTypes.Type(name = "ServiceBusTopic", value = ServiceBusTopicEventSubscriptionDestination.class), - @JsonSubTypes.Type(name = "AzureFunction", value = AzureFunctionEventSubscriptionDestination.class) + @JsonSubTypes.Type(name = "AzureFunction", value = AzureFunctionEventSubscriptionDestination.class), + @JsonSubTypes.Type(name = "PartnerDestination", value = PartnerEventSubscriptionDestination.class) }) @Immutable public class EventSubscriptionDestination { + /** Creates an instance of EventSubscriptionDestination class. */ + public EventSubscriptionDestination() { + } + /** * Validates the instance. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFilter.java index 0abcd796e0aa..c214a5b9b751 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionFilter.java @@ -12,8 +12,7 @@ @Fluent public final class EventSubscriptionFilter { /* - * An optional string to filter events for an event subscription based on a - * resource path prefix. + * An optional string to filter events for an event subscription based on a resource path prefix. * The format of this depends on the publisher of the events. * Wildcard characters are not supported in this path. */ @@ -21,43 +20,42 @@ public final class EventSubscriptionFilter { private String subjectBeginsWith; /* - * An optional string to filter events for an event subscription based on a - * resource path suffix. + * An optional string to filter events for an event subscription based on a resource path suffix. * Wildcard characters are not supported in this path. */ @JsonProperty(value = "subjectEndsWith") private String subjectEndsWith; /* - * A list of applicable event types that need to be part of the event - * subscription. If it is desired to subscribe to all default event types, - * set the IncludedEventTypes to null. + * A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe + * to all default event types, set the IncludedEventTypes to null. */ @JsonProperty(value = "includedEventTypes") private List includedEventTypes; /* - * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the - * filter + * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. */ @JsonProperty(value = "isSubjectCaseSensitive") private Boolean isSubjectCaseSensitive; /* - * Allows advanced filters to be evaluated against an array of values - * instead of expecting a singular value. + * Allows advanced filters to be evaluated against an array of values instead of expecting a singular value. */ @JsonProperty(value = "enableAdvancedFilteringOnArrays") private Boolean enableAdvancedFilteringOnArrays; /* - * An array of advanced filters that are used for filtering event - * subscriptions. + * An array of advanced filters that are used for filtering event subscriptions. */ @JsonProperty(value = "advancedFilters") private List advancedFilters; + /** Creates an instance of EventSubscriptionFilter class. */ + public EventSubscriptionFilter() { + } + /** * Get the subjectBeginsWith property: An optional string to filter events for an event subscription based on a * resource path prefix. The format of this depends on the publisher of the events. Wildcard characters are not diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentity.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentity.java index 541e7335257c..012aae4d42d7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentity.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentity.java @@ -9,11 +9,10 @@ /** The identity information with the event subscription. */ @Fluent -public class EventSubscriptionIdentity { +public final class EventSubscriptionIdentity { /* - * The type of managed identity used. The type 'SystemAssigned, - * UserAssigned' includes both an implicitly created identity and a set of - * user-assigned identities. The type 'None' will remove any identity. + * The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created + * identity and a set of user-assigned identities. The type 'None' will remove any identity. */ @JsonProperty(value = "type") private EventSubscriptionIdentityType type; @@ -24,6 +23,10 @@ public class EventSubscriptionIdentity { @JsonProperty(value = "userAssignedIdentity") private String userAssignedIdentity; + /** Creates an instance of EventSubscriptionIdentity class. */ + public EventSubscriptionIdentity() { + } + /** * Get the type property: The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both * an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identity. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentityType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentityType.java index e2857f578025..bac4a907a147 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentityType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionIdentityType.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EventSubscriptionIdentityType. */ +/** + * The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created + * identity and a set of user-assigned identities. The type 'None' will remove any identity. + */ public final class EventSubscriptionIdentityType extends ExpandableStringEnum { /** Static value SystemAssigned for EventSubscriptionIdentityType. */ public static final EventSubscriptionIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); @@ -16,6 +19,15 @@ public final class EventSubscriptionIdentityType extends ExpandableStringEnum { /** Static value Creating for EventSubscriptionProvisioningState. */ public static final EventSubscriptionProvisioningState CREATING = fromString("Creating"); @@ -31,6 +31,15 @@ public final class EventSubscriptionProvisioningState extends ExpandableStringEn /** Static value AwaitingManualAction for EventSubscriptionProvisioningState. */ public static final EventSubscriptionProvisioningState AWAITING_MANUAL_ACTION = fromString("AwaitingManualAction"); + /** + * Creates a new instance of EventSubscriptionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EventSubscriptionProvisioningState() { + } + /** * Creates or finds a EventSubscriptionProvisioningState from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionUpdateParameters.java index e74c4afe84b6..bca865b86e73 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionUpdateParameters.java @@ -13,20 +13,17 @@ @Fluent public final class EventSubscriptionUpdateParameters { /* - * Information about the destination where events have to be delivered for - * the event subscription. - * Uses Azure Event Grid's identity to acquire the authentication tokens - * being used during delivery / dead-lettering. + * Information about the destination where events have to be delivered for the event subscription. + * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / + * dead-lettering. */ @JsonProperty(value = "destination") private EventSubscriptionDestination destination; /* - * Information about the destination where events have to be delivered for - * the event subscription. - * Uses the managed identity setup on the parent resource (topic / domain) - * to acquire the authentication tokens being used during delivery / - * dead-lettering. + * Information about the destination where events have to be delivered for the event subscription. + * Uses the managed identity setup on the parent resource (topic / domain) to acquire the authentication tokens + * being used during delivery / dead-lettering. */ @JsonProperty(value = "deliveryWithResourceIdentity") private DeliveryWithResourceIdentity deliveryWithResourceIdentity; @@ -56,33 +53,34 @@ public final class EventSubscriptionUpdateParameters { private EventDeliverySchema eventDeliverySchema; /* - * The retry policy for events. This can be used to configure maximum - * number of delivery attempts and time to live for events. + * The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live + * for events. */ @JsonProperty(value = "retryPolicy") private RetryPolicy retryPolicy; /* - * The dead letter destination of the event subscription. Any event that - * cannot be delivered to its' destination is sent to the dead letter - * destination. - * Uses Azure Event Grid's identity to acquire the authentication tokens - * being used during delivery / dead-lettering. + * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is + * sent to the dead letter destination. + * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / + * dead-lettering. */ @JsonProperty(value = "deadLetterDestination") private DeadLetterDestination deadLetterDestination; /* - * The dead letter destination of the event subscription. Any event that - * cannot be delivered to its' destination is sent to the dead letter - * destination. - * Uses the managed identity setup on the parent resource (topic / domain) - * to acquire the authentication tokens being used during delivery / - * dead-lettering. + * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is + * sent to the dead letter destination. + * Uses the managed identity setup on the parent resource (topic / domain) to acquire the authentication tokens + * being used during delivery / dead-lettering. */ @JsonProperty(value = "deadLetterWithResourceIdentity") private DeadLetterWithResourceIdentity deadLetterWithResourceIdentity; + /** Creates an instance of EventSubscriptionUpdateParameters class. */ + public EventSubscriptionUpdateParameters() { + } + /** * Get the destination property: Information about the destination where events have to be delivered for the event * subscription. Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java index d067f34d4551..97efce4d27b7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java @@ -12,7 +12,9 @@ /** Resource collection API of EventSubscriptions. */ public interface EventSubscriptions { /** - * Get properties of an event subscription. + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -23,15 +25,40 @@ public interface EventSubscriptions { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * @param eventSubscriptionName Name of the event subscription. + * @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 properties of an event subscription. + * @return all delivery attributes for an event subscription along with {@link Response}. */ - EventSubscription get(String scope, String eventSubscriptionName); + Response getDeliveryAttributesWithResponse( + String scope, String eventSubscriptionName, Context context); /** - * Get properties of an event subscription. + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription. + */ + DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName); + + /** + * Get an event subscription. + * + *

Get properties of an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -51,8 +78,31 @@ public interface EventSubscriptions { Response getWithResponse(String scope, String eventSubscriptionName, Context context); /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Get an event subscription. + * + *

Get properties of an event subscription. + * + * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top + * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 properties of an event subscription. + */ + EventSubscription get(String scope, String eventSubscriptionName); + + /** + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -74,8 +124,10 @@ EventSubscription createOrUpdate( String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates a new event subscription or updates an existing event subscription based on the specified - * scope. + * Create or update an event subscription. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription based on the + * specified scope. * * @param scope The identifier of the resource to which the event subscription needs to be created or updated. The * scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider @@ -98,7 +150,9 @@ EventSubscription createOrUpdate( String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo, Context context); /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -116,7 +170,9 @@ EventSubscription createOrUpdate( void deleteByResourceGroup(String scope, String eventSubscriptionName); /** - * Delete an existing event subscription. + * Delete an event subscription. + * + *

Delete an existing event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -135,7 +191,9 @@ EventSubscription createOrUpdate( void delete(String scope, String eventSubscriptionName, Context context); /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -158,7 +216,9 @@ EventSubscription update( EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Asynchronously updates an existing event subscription. + * Update an event subscription. + * + *

Asynchronously updates an existing event subscription. * * @param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a * top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -183,7 +243,9 @@ EventSubscription update( Context context); /** - * Get the full endpoint URL for an event subscription. + * Get full URL of an event subscription. + * + *

Get the full endpoint URL for an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -194,15 +256,19 @@ EventSubscription update( * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * @param eventSubscriptionName Name of the event subscription. + * @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 the full endpoint URL for an event subscription. + * @return the full endpoint URL for an event subscription along with {@link Response}. */ - EventSubscriptionFullUrl getFullUrl(String scope, String eventSubscriptionName); + Response getFullUrlWithResponse( + String scope, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for an event subscription. + * Get full URL of an event subscription. + * + *

Get the full endpoint URL for an event subscription. * * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use @@ -213,17 +279,17 @@ EventSubscription update( * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * @param eventSubscriptionName Name of the event subscription. - * @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 the full endpoint URL for an event subscription along with {@link Response}. + * @return the full endpoint URL for an event subscription. */ - Response getFullUrlWithResponse( - String scope, String eventSubscriptionName, Context context); + EventSubscriptionFullUrl getFullUrl(String scope, String eventSubscriptionName); /** - * List all aggregated global event subscriptions under a specific Azure subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * + *

List all aggregated global event subscriptions under a specific Azure subscription. * * @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. @@ -232,7 +298,9 @@ Response getFullUrlWithResponse( PagedIterable list(); /** - * List all aggregated global event subscriptions under a specific Azure subscription. + * Get an aggregated list of all global event subscriptions under an Azure subscription. + * + *

List all aggregated global event subscriptions under a specific Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -251,7 +319,9 @@ Response getFullUrlWithResponse( PagedIterable list(String filter, Integer top, Context context); /** - * List all global event subscriptions under an Azure subscription for a topic type. + * List all global event subscriptions for a topic type. + * + *

List all global event subscriptions under an Azure subscription for a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -262,7 +332,9 @@ Response getFullUrlWithResponse( PagedIterable listGlobalBySubscriptionForTopicType(String topicTypeName); /** - * List all global event subscriptions under an Azure subscription for a topic type. + * List all global event subscriptions for a topic type. + * + *

List all global event subscriptions under an Azure subscription for a topic type. * * @param topicTypeName Name of the topic type. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -283,7 +355,9 @@ PagedIterable listGlobalBySubscriptionForTopicType( String topicTypeName, String filter, Integer top, Context context); /** - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription and resource group. + * + *

List all global event subscriptions under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -294,7 +368,9 @@ PagedIterable listGlobalBySubscriptionForTopicType( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all global event subscriptions under a specific Azure subscription and resource group. + * List all global event subscriptions under an Azure subscription and resource group. + * + *

List all global event subscriptions under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -315,7 +391,9 @@ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, Context context); /** - * List all global event subscriptions under a resource group for a specific topic type. + * List all global event subscriptions under a resource group for a topic type. + * + *

List all global event subscriptions under a resource group for a specific topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicTypeName Name of the topic type. @@ -328,7 +406,9 @@ PagedIterable listGlobalByResourceGroupForTopicType( String resourceGroupName, String topicTypeName); /** - * List all global event subscriptions under a resource group for a specific topic type. + * List all global event subscriptions under a resource group for a topic type. + * + *

List all global event subscriptions under a resource group for a specific topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicTypeName Name of the topic type. @@ -350,7 +430,9 @@ PagedIterable listGlobalByResourceGroupForTopicType( String resourceGroupName, String topicTypeName, String filter, Integer top, Context context); /** - * List all event subscriptions from the given location under a specific Azure subscription. + * List all regional event subscriptions under an Azure subscription. + * + *

List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -361,7 +443,9 @@ PagedIterable listGlobalByResourceGroupForTopicType( PagedIterable listRegionalBySubscription(String location); /** - * List all event subscriptions from the given location under a specific Azure subscription. + * List all regional event subscriptions under an Azure subscription. + * + *

List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -382,7 +466,9 @@ PagedIterable listRegionalBySubscription( String location, String filter, Integer top, Context context); /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all regional event subscriptions under an Azure subscription and resource group. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -394,7 +480,9 @@ PagedIterable listRegionalBySubscription( PagedIterable listRegionalByResourceGroup(String resourceGroupName, String location); /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group. + * List all regional event subscriptions under an Azure subscription and resource group. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -416,7 +504,9 @@ PagedIterable listRegionalByResourceGroup( String resourceGroupName, String location, String filter, Integer top, Context context); /** - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all regional event subscriptions under an Azure subscription for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and topic type. * * @param location Name of the location. * @param topicTypeName Name of the topic type. @@ -428,7 +518,9 @@ PagedIterable listRegionalByResourceGroup( PagedIterable listRegionalBySubscriptionForTopicType(String location, String topicTypeName); /** - * List all event subscriptions from the given location under a specific Azure subscription and topic type. + * List all regional event subscriptions under an Azure subscription for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and topic type. * * @param location Name of the location. * @param topicTypeName Name of the topic type. @@ -450,8 +542,10 @@ PagedIterable listRegionalBySubscriptionForTopicType( String location, String topicTypeName, String filter, Integer top, Context context); /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group + * and topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -465,8 +559,10 @@ PagedIterable listRegionalByResourceGroupForTopicType( String resourceGroupName, String location, String topicTypeName); /** - * List all event subscriptions from the given location under a specific Azure subscription and resource group and - * topic type. + * List all regional event subscriptions under an Azure subscription and resource group for a topic type. + * + *

List all event subscriptions from the given location under a specific Azure subscription and resource group + * and topic type. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param location Name of the location. @@ -489,7 +585,9 @@ PagedIterable listRegionalByResourceGroupForTopicType( String resourceGroupName, String location, String topicTypeName, String filter, Integer top, Context context); /** - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions. + * + *

List all event subscriptions that have been created for a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -504,7 +602,9 @@ PagedIterable listByResource( String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName); /** - * List all event subscriptions that have been created for a specific resource. + * List all event subscriptions. + * + *

List all event subscriptions that have been created for a specific resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -534,7 +634,9 @@ PagedIterable listByResource( Context context); /** - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -547,7 +649,9 @@ PagedIterable listByResource( PagedIterable listByDomainTopic(String resourceGroupName, String domainName, String topicName); /** - * List all event subscriptions that have been created for a specific domain topic. + * List all event subscriptions for a specific domain topic. + * + *

List all event subscriptions that have been created for a specific domain topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the top level domain. @@ -568,44 +672,4 @@ PagedIterable listByResource( */ PagedIterable listByDomainTopic( String resourceGroupName, String domainName, String topicName, String filter, Integer top, Context context); - - /** - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription. - */ - DeliveryAttributeListResult getDeliveryAttributes(String scope, String eventSubscriptionName); - - /** - * Get all delivery attributes for an event subscription. - * - * @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top - * level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * @param eventSubscriptionName Name of the event subscription. - * @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 all delivery attributes for an event subscription along with {@link Response}. - */ - Response getDeliveryAttributesWithResponse( - String scope, String eventSubscriptionName, Context context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionsListResult.java index 99b4aeca32b2..083c2729bb7e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptionsListResult.java @@ -24,6 +24,10 @@ public final class EventSubscriptionsListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of EventSubscriptionsListResult class. */ + public EventSubscriptionsListResult() { + } + /** * Get the value property: A collection of EventSubscriptions. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypeInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypeInfo.java index 1b323bc376f4..7bfeb73f62be 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypeInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypeInfo.java @@ -19,16 +19,20 @@ public final class EventTypeInfo { private EventDefinitionKind kind; /* - * A collection of inline event types for the resource. The inline event - * type keys are of type string which represents the name of the event. + * A collection of inline event types for the resource. The inline event type keys are of type string which + * represents the name of the event. * An example of a valid inline event name is "Contoso.OrderCreated". - * The inline event type values are of type InlineEventProperties and will - * contain additional information for every inline event type. + * The inline event type values are of type InlineEventProperties and will contain additional information for every + * inline event type. */ @JsonProperty(value = "inlineEventTypes") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map inlineEventTypes; + /** Creates an instance of EventTypeInfo class. */ + public EventTypeInfo() { + } + /** * Get the kind property: The kind of event type used. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypesListResult.java index 7bdaba8e6396..56fb25bd056b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypesListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventTypesListResult.java @@ -18,6 +18,10 @@ public final class EventTypesListResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of EventTypesListResult class. */ + public EventTypesListResult() { + } + /** * Get the value property: A collection of event types. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtendedLocation.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtendedLocation.java new file mode 100644 index 000000000000..c29974403cfb --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtendedLocation.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Definition of an Extended Location. */ +@Fluent +public final class ExtendedLocation { + /* + * Fully qualified name of the extended location. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Type of the extended location. + */ + @JsonProperty(value = "type") + private String type; + + /** Creates an instance of ExtendedLocation class. */ + public ExtendedLocation() { + } + + /** + * Get the name property: Fully qualified name of the extended location. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Fully qualified name of the extended location. + * + * @param name the name value to set. + * @return the ExtendedLocation object itself. + */ + public ExtendedLocation withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Type of the extended location. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Type of the extended location. + * + * @param type the type value to set. + * @return the ExtendedLocation object itself. + */ + public ExtendedLocation withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopics.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopics.java index a3e20cf90e36..e1605175f91c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopics.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ExtensionTopics.java @@ -10,7 +10,9 @@ /** Resource collection API of ExtensionTopics. */ public interface ExtensionTopics { /** - * Get the properties of an extension topic. + * Get properties of an extension topic. + * + *

Get the properties of an extension topic. * * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use @@ -18,15 +20,18 @@ public interface ExtensionTopics { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' * for Azure resource. + * @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 the properties of an extension topic. + * @return the properties of an extension topic along with {@link Response}. */ - ExtensionTopic get(String scope); + Response getWithResponse(String scope, Context context); /** - * Get the properties of an extension topic. + * Get properties of an extension topic. + * + *

Get the properties of an extension topic. * * @param scope The identifier of the resource to which extension topic is queried. The scope can be a subscription, * or a resource group, or a top level resource belonging to a resource provider namespace. For example, use @@ -34,11 +39,10 @@ public interface ExtensionTopics { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' * for Azure resource. - * @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 the properties of an extension topic along with {@link Response}. + * @return the properties of an extension topic. */ - Response getWithResponse(String scope, Context context); + ExtensionTopic get(String scope); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Filter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Filter.java new file mode 100644 index 000000000000..8dbc0c742fe0 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Filter.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * This is the base type that represents a filter. To configure a filter, do not directly instantiate an object of this + * class. Instead, instantiate an object of a derived class such as BoolEqualsFilter, NumberInFilter, StringEqualsFilter + * etc depending on the type of the key based on which you want to filter. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "operatorType", + defaultImpl = Filter.class) +@JsonTypeName("Filter") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "NumberIn", value = NumberInFilter.class), + @JsonSubTypes.Type(name = "NumberNotIn", value = NumberNotInFilter.class), + @JsonSubTypes.Type(name = "NumberLessThan", value = NumberLessThanFilter.class), + @JsonSubTypes.Type(name = "NumberGreaterThan", value = NumberGreaterThanFilter.class), + @JsonSubTypes.Type(name = "NumberLessThanOrEquals", value = NumberLessThanOrEqualsFilter.class), + @JsonSubTypes.Type(name = "NumberGreaterThanOrEquals", value = NumberGreaterThanOrEqualsFilter.class), + @JsonSubTypes.Type(name = "BoolEquals", value = BoolEqualsFilter.class), + @JsonSubTypes.Type(name = "StringIn", value = StringInFilter.class), + @JsonSubTypes.Type(name = "StringNotIn", value = StringNotInFilter.class), + @JsonSubTypes.Type(name = "StringBeginsWith", value = StringBeginsWithFilter.class), + @JsonSubTypes.Type(name = "StringEndsWith", value = StringEndsWithFilter.class), + @JsonSubTypes.Type(name = "StringContains", value = StringContainsFilter.class), + @JsonSubTypes.Type(name = "NumberInRange", value = NumberInRangeFilter.class), + @JsonSubTypes.Type(name = "NumberNotInRange", value = NumberNotInRangeFilter.class), + @JsonSubTypes.Type(name = "StringNotBeginsWith", value = StringNotBeginsWithFilter.class), + @JsonSubTypes.Type(name = "StringNotEndsWith", value = StringNotEndsWithFilter.class), + @JsonSubTypes.Type(name = "StringNotContains", value = StringNotContainsFilter.class), + @JsonSubTypes.Type(name = "IsNullOrUndefined", value = IsNullOrUndefinedFilter.class), + @JsonSubTypes.Type(name = "IsNotNull", value = IsNotNullFilter.class) +}) +@Fluent +public class Filter { + /* + * The field/property in the event based on which you want to filter. + */ + @JsonProperty(value = "key") + private String key; + + /** Creates an instance of Filter class. */ + public Filter() { + } + + /** + * Get the key property: The field/property in the event based on which you want to filter. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The field/property in the event based on which you want to filter. + * + * @param key the key value to set. + * @return the Filter object itself. + */ + public Filter withKey(String key) { + this.key = key; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FilterOperatorType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FilterOperatorType.java new file mode 100644 index 000000000000..d629220aec5c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FilterOperatorType.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others. */ +public final class FilterOperatorType extends ExpandableStringEnum { + /** Static value NumberIn for FilterOperatorType. */ + public static final FilterOperatorType NUMBER_IN = fromString("NumberIn"); + + /** Static value NumberNotIn for FilterOperatorType. */ + public static final FilterOperatorType NUMBER_NOT_IN = fromString("NumberNotIn"); + + /** Static value NumberLessThan for FilterOperatorType. */ + public static final FilterOperatorType NUMBER_LESS_THAN = fromString("NumberLessThan"); + + /** Static value NumberGreaterThan for FilterOperatorType. */ + public static final FilterOperatorType NUMBER_GREATER_THAN = fromString("NumberGreaterThan"); + + /** Static value NumberLessThanOrEquals for FilterOperatorType. */ + public static final FilterOperatorType NUMBER_LESS_THAN_OR_EQUALS = fromString("NumberLessThanOrEquals"); + + /** Static value NumberGreaterThanOrEquals for FilterOperatorType. */ + public static final FilterOperatorType NUMBER_GREATER_THAN_OR_EQUALS = fromString("NumberGreaterThanOrEquals"); + + /** Static value BoolEquals for FilterOperatorType. */ + public static final FilterOperatorType BOOL_EQUALS = fromString("BoolEquals"); + + /** Static value StringIn for FilterOperatorType. */ + public static final FilterOperatorType STRING_IN = fromString("StringIn"); + + /** Static value StringNotIn for FilterOperatorType. */ + public static final FilterOperatorType STRING_NOT_IN = fromString("StringNotIn"); + + /** Static value StringBeginsWith for FilterOperatorType. */ + public static final FilterOperatorType STRING_BEGINS_WITH = fromString("StringBeginsWith"); + + /** Static value StringEndsWith for FilterOperatorType. */ + public static final FilterOperatorType STRING_ENDS_WITH = fromString("StringEndsWith"); + + /** Static value StringContains for FilterOperatorType. */ + public static final FilterOperatorType STRING_CONTAINS = fromString("StringContains"); + + /** Static value NumberInRange for FilterOperatorType. */ + public static final FilterOperatorType NUMBER_IN_RANGE = fromString("NumberInRange"); + + /** Static value NumberNotInRange for FilterOperatorType. */ + public static final FilterOperatorType NUMBER_NOT_IN_RANGE = fromString("NumberNotInRange"); + + /** Static value StringNotBeginsWith for FilterOperatorType. */ + public static final FilterOperatorType STRING_NOT_BEGINS_WITH = fromString("StringNotBeginsWith"); + + /** Static value StringNotEndsWith for FilterOperatorType. */ + public static final FilterOperatorType STRING_NOT_ENDS_WITH = fromString("StringNotEndsWith"); + + /** Static value StringNotContains for FilterOperatorType. */ + public static final FilterOperatorType STRING_NOT_CONTAINS = fromString("StringNotContains"); + + /** Static value IsNullOrUndefined for FilterOperatorType. */ + public static final FilterOperatorType IS_NULL_OR_UNDEFINED = fromString("IsNullOrUndefined"); + + /** Static value IsNotNull for FilterOperatorType. */ + public static final FilterOperatorType IS_NOT_NULL = fromString("IsNotNull"); + + /** + * Creates a new instance of FilterOperatorType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FilterOperatorType() { + } + + /** + * Creates or finds a FilterOperatorType from its string representation. + * + * @param name a name to look for. + * @return the corresponding FilterOperatorType. + */ + @JsonCreator + public static FilterOperatorType fromString(String name) { + return fromString(name, FilterOperatorType.class); + } + + /** + * Gets known FilterOperatorType values. + * + * @return known FilterOperatorType values. + */ + public static Collection values() { + return values(FilterOperatorType.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FiltersConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FiltersConfiguration.java new file mode 100644 index 000000000000..bc59d4e4d033 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/FiltersConfiguration.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Filters configuration for the Event Subscription. */ +@Fluent +public final class FiltersConfiguration { + /* + * A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe + * to all default event types, set the IncludedEventTypes to null. + */ + @JsonProperty(value = "includedEventTypes") + private List includedEventTypes; + + /* + * An array of filters that are used for filtering event subscriptions. + */ + @JsonProperty(value = "filters") + private List filters; + + /** Creates an instance of FiltersConfiguration class. */ + public FiltersConfiguration() { + } + + /** + * Get the includedEventTypes property: A list of applicable event types that need to be part of the event + * subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null. + * + * @return the includedEventTypes value. + */ + public List includedEventTypes() { + return this.includedEventTypes; + } + + /** + * Set the includedEventTypes property: A list of applicable event types that need to be part of the event + * subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null. + * + * @param includedEventTypes the includedEventTypes value to set. + * @return the FiltersConfiguration object itself. + */ + public FiltersConfiguration withIncludedEventTypes(List includedEventTypes) { + this.includedEventTypes = includedEventTypes; + return this; + } + + /** + * Get the filters property: An array of filters that are used for filtering event subscriptions. + * + * @return the filters value. + */ + public List filters() { + return this.filters; + } + + /** + * Set the filters property: An array of filters that are used for filtering event subscriptions. + * + * @param filters the filters value to set. + * @return the FiltersConfiguration object itself. + */ + public FiltersConfiguration withFilters(List filters) { + this.filters = filters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filters() != null) { + filters().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/HybridConnectionEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/HybridConnectionEventSubscriptionDestination.java index 1329b5986044..41e77846b1ca 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/HybridConnectionEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/HybridConnectionEventSubscriptionDestination.java @@ -22,6 +22,10 @@ public final class HybridConnectionEventSubscriptionDestination extends EventSub @JsonProperty(value = "properties") private HybridConnectionEventSubscriptionDestinationProperties innerProperties; + /** Creates an instance of HybridConnectionEventSubscriptionDestination class. */ + public HybridConnectionEventSubscriptionDestination() { + } + /** * Get the innerProperties property: Hybrid connection Properties of the event subscription destination. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityInfo.java index 5a7661a620ca..62f350bae373 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityInfo.java @@ -13,9 +13,8 @@ @Fluent public final class IdentityInfo { /* - * The type of managed identity used. The type 'SystemAssigned, - * UserAssigned' includes both an implicitly created identity and a set of - * user-assigned identities. The type 'None' will remove any identity. + * The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created + * identity and a set of user-assigned identities. The type 'None' will remove any identity. */ @JsonProperty(value = "type") private IdentityType type; @@ -33,8 +32,8 @@ public final class IdentityInfo { private String tenantId; /* - * The list of user identities associated with the resource. The user - * identity dictionary key references will be ARM resource ids in the form: + * The list of user identities associated with the resource. The user identity dictionary key references will be + * ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * This property is currently not used and reserved for future usage. */ @@ -42,6 +41,10 @@ public final class IdentityInfo { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; + /** Creates an instance of IdentityInfo class. */ + public IdentityInfo() { + } + /** * Get the type property: The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both * an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identity. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityType.java index ba8beba02f43..03e921638079 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IdentityType.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for IdentityType. */ +/** + * The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created + * identity and a set of user-assigned identities. The type 'None' will remove any identity. + */ public final class IdentityType extends ExpandableStringEnum { /** Static value None for IdentityType. */ public static final IdentityType NONE = fromString("None"); @@ -22,6 +25,15 @@ public final class IdentityType extends ExpandableStringEnum { /** Static value SystemAssigned, UserAssigned for IdentityType. */ public static final IdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = fromString("SystemAssigned, UserAssigned"); + /** + * Creates a new instance of IdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IdentityType() { + } + /** * Creates or finds a IdentityType from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InboundIpRule.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InboundIpRule.java index 87999099805d..dfde7a15a932 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InboundIpRule.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InboundIpRule.java @@ -22,6 +22,10 @@ public final class InboundIpRule { @JsonProperty(value = "action") private IpActionType action; + /** Creates an instance of InboundIpRule class. */ + public InboundIpRule() { + } + /** * Get the ipMask property: IP Address in CIDR notation e.g., 10.0.0.0/8. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InlineEventProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InlineEventProperties.java index 46bde739e5b3..8295176cf1d5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InlineEventProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InlineEventProperties.java @@ -34,6 +34,10 @@ public final class InlineEventProperties { @JsonProperty(value = "dataSchemaUrl") private String dataSchemaUrl; + /** Creates an instance of InlineEventProperties class. */ + public InlineEventProperties() { + } + /** * Get the description property: The description for the inline event. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchema.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchema.java index 7401357e42c5..dd18ca37ce39 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchema.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchema.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for InputSchema. */ +/** + * This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain + * Resource. + */ public final class InputSchema extends ExpandableStringEnum { /** Static value EventGridSchema for InputSchema. */ public static final InputSchema EVENT_GRID_SCHEMA = fromString("EventGridSchema"); @@ -19,6 +22,15 @@ public final class InputSchema extends ExpandableStringEnum { /** Static value CloudEventSchemaV1_0 for InputSchema. */ public static final InputSchema CLOUD_EVENT_SCHEMA_V1_0 = fromString("CloudEventSchemaV1_0"); + /** + * Creates a new instance of InputSchema value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InputSchema() { + } + /** * Creates or finds a InputSchema from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMapping.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMapping.java index 15a03cadfdb0..3adc4a128729 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMapping.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMapping.java @@ -23,6 +23,10 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "Json", value = JsonInputSchemaMapping.class)}) @Immutable public class InputSchemaMapping { + /** Creates an instance of InputSchemaMapping class. */ + public InputSchemaMapping() { + } + /** * Validates the instance. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMappingType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMappingType.java index 0020c7a9cd9b..ff7132b9d23c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMappingType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/InputSchemaMappingType.java @@ -8,11 +8,20 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for InputSchemaMappingType. */ +/** Type of the custom mapping. */ public final class InputSchemaMappingType extends ExpandableStringEnum { /** Static value Json for InputSchemaMappingType. */ public static final InputSchemaMappingType JSON = fromString("Json"); + /** + * Creates a new instance of InputSchemaMappingType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InputSchemaMappingType() { + } + /** * Creates or finds a InputSchemaMappingType from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpActionType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpActionType.java index 261c315cccd2..967c4460110b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpActionType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IpActionType.java @@ -8,11 +8,20 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for IpActionType. */ +/** Action to perform based on the match or no match of the IpMask. */ public final class IpActionType extends ExpandableStringEnum { /** Static value Allow for IpActionType. */ public static final IpActionType ALLOW = fromString("Allow"); + /** + * Creates a new instance of IpActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IpActionType() { + } + /** * Creates or finds a IpActionType from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullAdvancedFilter.java index 5bf7a9c894b3..1298497d0ed8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullAdvancedFilter.java @@ -13,6 +13,10 @@ @JsonTypeName("IsNotNull") @Fluent public final class IsNotNullAdvancedFilter extends AdvancedFilter { + /** Creates an instance of IsNotNullAdvancedFilter class. */ + public IsNotNullAdvancedFilter() { + } + /** {@inheritDoc} */ @Override public IsNotNullAdvancedFilter withKey(String key) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullFilter.java new file mode 100644 index 000000000000..e2dd7bcc61a1 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNotNullFilter.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** IsNotNull Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("IsNotNull") +@Fluent +public final class IsNotNullFilter extends Filter { + /** Creates an instance of IsNotNullFilter class. */ + public IsNotNullFilter() { + } + + /** {@inheritDoc} */ + @Override + public IsNotNullFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedAdvancedFilter.java index 4adc14266637..cf1f38a1b435 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedAdvancedFilter.java @@ -13,6 +13,10 @@ @JsonTypeName("IsNullOrUndefined") @Fluent public final class IsNullOrUndefinedAdvancedFilter extends AdvancedFilter { + /** Creates an instance of IsNullOrUndefinedAdvancedFilter class. */ + public IsNullOrUndefinedAdvancedFilter() { + } + /** {@inheritDoc} */ @Override public IsNullOrUndefinedAdvancedFilter withKey(String key) { diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedFilter.java new file mode 100644 index 000000000000..155eaba255b3 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/IsNullOrUndefinedFilter.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** IsNullOrUndefined Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("IsNullOrUndefined") +@Fluent +public final class IsNullOrUndefinedFilter extends Filter { + /** Creates an instance of IsNullOrUndefinedFilter class. */ + public IsNullOrUndefinedFilter() { + } + + /** {@inheritDoc} */ + @Override + public IsNullOrUndefinedFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonField.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonField.java index 94b29d046a60..fd0180bd44ea 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonField.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonField.java @@ -15,12 +15,15 @@ @Fluent public final class JsonField { /* - * Name of a field in the input event schema that's to be used as the - * source of a mapping. + * Name of a field in the input event schema that's to be used as the source of a mapping. */ @JsonProperty(value = "sourceField") private String sourceField; + /** Creates an instance of JsonField class. */ + public JsonField() { + } + /** * Get the sourceField property: Name of a field in the input event schema that's to be used as the source of a * mapping. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonFieldWithDefault.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonFieldWithDefault.java index e1daa8f89a41..aba8700996f6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonFieldWithDefault.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonFieldWithDefault.java @@ -16,20 +16,22 @@ @Fluent public final class JsonFieldWithDefault { /* - * Name of a field in the input event schema that's to be used as the - * source of a mapping. + * Name of a field in the input event schema that's to be used as the source of a mapping. */ @JsonProperty(value = "sourceField") private String sourceField; /* - * The default value to be used for mapping when a SourceField is not - * provided or if there's no property with the specified name in the - * published JSON event payload. + * The default value to be used for mapping when a SourceField is not provided or if there's no property with the + * specified name in the published JSON event payload. */ @JsonProperty(value = "defaultValue") private String defaultValue; + /** Creates an instance of JsonFieldWithDefault class. */ + public JsonFieldWithDefault() { + } + /** * Get the sourceField property: Name of a field in the input event schema that's to be used as the source of a * mapping. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonInputSchemaMapping.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonInputSchemaMapping.java index 11edfb7e2898..328e1c24685f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonInputSchemaMapping.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonInputSchemaMapping.java @@ -24,6 +24,10 @@ public final class JsonInputSchemaMapping extends InputSchemaMapping { @JsonProperty(value = "properties") private JsonInputSchemaMappingProperties innerProperties; + /** Creates an instance of JsonInputSchemaMapping class. */ + public JsonInputSchemaMapping() { + } + /** * Get the innerProperties property: JSON Properties of the input schema mapping. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespace.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespace.java new file mode 100644 index 000000000000..620506f6b20c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespace.java @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner; +import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of Namespace. */ +public interface Namespace { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the sku property: Represents available Sku pricing tiers. + * + * @return the sku value. + */ + NamespaceSku sku(); + + /** + * Gets the identity property: Identity information for the Namespace resource. + * + * @return the identity value. + */ + IdentityInfo identity(); + + /** + * Gets the systemData property: The system metadata relating to the namespace resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the privateEndpointConnections property: The privateEndpointConnections property. + * + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + + /** + * Gets the provisioningState property: Provisioning state of the namespace resource. + * + * @return the provisioningState value. + */ + NamespaceProvisioningState provisioningState(); + + /** + * Gets the topicsConfiguration property: Topics configuration information for the namespace resource. + * + * @return the topicsConfiguration value. + */ + TopicsConfiguration topicsConfiguration(); + + /** + * Gets the topicSpacesConfiguration property: Topic spaces configuration information for the namespace resource. + * + * @return the topicSpacesConfiguration value. + */ + TopicSpacesConfiguration topicSpacesConfiguration(); + + /** + * Gets the isZoneRedundant property: Allows the user to specify if the service is zone-redundant. This is a + * required property and user needs to specify this value explicitly. Once specified, this property cannot be + * updated. + * + * @return the isZoneRedundant value. + */ + Boolean isZoneRedundant(); + + /** + * Gets the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it + * is enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceProperties.InboundIpRules" + * />. + * + * @return the publicNetworkAccess value. + */ + PublicNetworkAccess publicNetworkAccess(); + + /** + * Gets the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of all IPs. + * Note: These are considered only if PublicNetworkAccess is enabled. + * + * @return the inboundIpRules value. + */ + List inboundIpRules(); + + /** + * Gets the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * namespace. Only TLS version 1.2 is supported. + * + * @return the minimumTlsVersionAllowed value. + */ + TlsVersion minimumTlsVersionAllowed(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner object. + * + * @return the inner object. + */ + NamespaceInner innerModel(); + + /** The entirety of the Namespace definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The Namespace definition stages. */ + interface DefinitionStages { + /** The first stage of the Namespace definition. */ + interface Blank extends WithLocation { + } + /** The stage of the Namespace definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the Namespace definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the Namespace definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithSku, + DefinitionStages.WithIdentity, + DefinitionStages.WithPrivateEndpointConnections, + DefinitionStages.WithTopicsConfiguration, + DefinitionStages.WithTopicSpacesConfiguration, + DefinitionStages.WithIsZoneRedundant, + DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithInboundIpRules, + DefinitionStages.WithMinimumTlsVersionAllowed { + /** + * Executes the create request. + * + * @return the created resource. + */ + Namespace create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Namespace create(Context context); + } + /** The stage of the Namespace definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the Namespace definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: Represents available Sku pricing tiers.. + * + * @param sku Represents available Sku pricing tiers. + * @return the next definition stage. + */ + WithCreate withSku(NamespaceSku sku); + } + /** The stage of the Namespace definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Identity information for the Namespace resource.. + * + * @param identity Identity information for the Namespace resource. + * @return the next definition stage. + */ + WithCreate withIdentity(IdentityInfo identity); + } + /** The stage of the Namespace definition allowing to specify privateEndpointConnections. */ + interface WithPrivateEndpointConnections { + /** + * Specifies the privateEndpointConnections property: The privateEndpointConnections property.. + * + * @param privateEndpointConnections The privateEndpointConnections property. + * @return the next definition stage. + */ + WithCreate withPrivateEndpointConnections(List privateEndpointConnections); + } + /** The stage of the Namespace definition allowing to specify topicsConfiguration. */ + interface WithTopicsConfiguration { + /** + * Specifies the topicsConfiguration property: Topics configuration information for the namespace resource. + * + * @param topicsConfiguration Topics configuration information for the namespace resource. + * @return the next definition stage. + */ + WithCreate withTopicsConfiguration(TopicsConfiguration topicsConfiguration); + } + /** The stage of the Namespace definition allowing to specify topicSpacesConfiguration. */ + interface WithTopicSpacesConfiguration { + /** + * Specifies the topicSpacesConfiguration property: Topic spaces configuration information for the namespace + * resource. + * + * @param topicSpacesConfiguration Topic spaces configuration information for the namespace resource. + * @return the next definition stage. + */ + WithCreate withTopicSpacesConfiguration(TopicSpacesConfiguration topicSpacesConfiguration); + } + /** The stage of the Namespace definition allowing to specify isZoneRedundant. */ + interface WithIsZoneRedundant { + /** + * Specifies the isZoneRedundant property: Allows the user to specify if the service is zone-redundant. This + * is a required property and user needs to specify this value explicitly. Once specified, this property + * cannot be updated.. + * + * @param isZoneRedundant Allows the user to specify if the service is zone-redundant. This is a required + * property and user needs to specify this value explicitly. Once specified, this property cannot be + * updated. + * @return the next definition stage. + */ + WithCreate withIsZoneRedundant(Boolean isZoneRedundant); + } + /** The stage of the Namespace definition allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: This determines if traffic is allowed over public network. By + * default it is enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceProperties.InboundIpRules" + * />. + * + * @param publicNetworkAccess This determines if traffic is allowed over public network. By default it is + * enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceProperties.InboundIpRules" + * />. + * @return the next definition stage. + */ + WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } + /** The stage of the Namespace definition allowing to specify inboundIpRules. */ + interface WithInboundIpRules { + /** + * Specifies the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of + * all IPs. Note: These are considered only if PublicNetworkAccess is enabled.. + * + * @param inboundIpRules This can be used to restrict traffic from specific IPs instead of all IPs. Note: + * These are considered only if PublicNetworkAccess is enabled. + * @return the next definition stage. + */ + WithCreate withInboundIpRules(List inboundIpRules); + } + /** The stage of the Namespace definition allowing to specify minimumTlsVersionAllowed. */ + interface WithMinimumTlsVersionAllowed { + /** + * Specifies the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish + * to this namespace. Only TLS version 1.2 is supported.. + * + * @param minimumTlsVersionAllowed Minimum TLS version of the publisher allowed to publish to this + * namespace. Only TLS version 1.2 is supported. + * @return the next definition stage. + */ + WithCreate withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed); + } + } + /** + * Begins update for the Namespace resource. + * + * @return the stage of resource update. + */ + Namespace.Update update(); + + /** The template for Namespace update. */ + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithIdentity, + UpdateStages.WithSku, + UpdateStages.WithTopicSpacesConfiguration, + UpdateStages.WithPublicNetworkAccess, + UpdateStages.WithInboundIpRules { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Namespace apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Namespace apply(Context context); + } + /** The Namespace update stages. */ + interface UpdateStages { + /** The stage of the Namespace update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Tags of the namespace resource.. + * + * @param tags Tags of the namespace resource. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the Namespace update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Namespace resource identity information.. + * + * @param identity Namespace resource identity information. + * @return the next definition stage. + */ + Update withIdentity(IdentityInfo identity); + } + /** The stage of the Namespace update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: Represents available Sku pricing tiers.. + * + * @param sku Represents available Sku pricing tiers. + * @return the next definition stage. + */ + Update withSku(NamespaceSku sku); + } + /** The stage of the Namespace update allowing to specify topicSpacesConfiguration. */ + interface WithTopicSpacesConfiguration { + /** + * Specifies the topicSpacesConfiguration property: Topic spaces configuration properties that can be + * updated.. + * + * @param topicSpacesConfiguration Topic spaces configuration properties that can be updated. + * @return the next definition stage. + */ + Update withTopicSpacesConfiguration(UpdateTopicSpacesConfigurationInfo topicSpacesConfiguration); + } + /** The stage of the Namespace update allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: This determines if traffic is allowed over public network. By + * default it is enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceUpdateParameterProperties.InboundIpRules" + * />. + * + * @param publicNetworkAccess This determines if traffic is allowed over public network. By default it is + * enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceUpdateParameterProperties.InboundIpRules" + * />. + * @return the next definition stage. + */ + Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } + /** The stage of the Namespace update allowing to specify inboundIpRules. */ + interface WithInboundIpRules { + /** + * Specifies the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of + * all IPs. Note: These are considered only if PublicNetworkAccess is enabled.. + * + * @param inboundIpRules This can be used to restrict traffic from specific IPs instead of all IPs. Note: + * These are considered only if PublicNetworkAccess is enabled. + * @return the next definition stage. + */ + Update withInboundIpRules(List inboundIpRules); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Namespace refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Namespace refresh(Context context); + + /** + * List keys for a namespace. + * + *

List the two keys used to publish to a namespace. + * + * @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 shared access keys of the Namespace along with {@link Response}. + */ + Response listSharedAccessKeysWithResponse(Context context); + + /** + * List keys for a namespace. + * + *

List the two keys used to publish to a namespace. + * + * @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 shared access keys of the Namespace. + */ + NamespaceSharedAccessKeys listSharedAccessKeys(); + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Namespace. + */ + NamespaceSharedAccessKeys regenerateKey(NamespaceRegenerateKeyRequest regenerateKeyRequest); + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Namespace. + */ + NamespaceSharedAccessKeys regenerateKey(NamespaceRegenerateKeyRequest regenerateKeyRequest, Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceProvisioningState.java new file mode 100644 index 000000000000..ca45ede925fa --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the namespace resource. */ +public final class NamespaceProvisioningState extends ExpandableStringEnum { + /** Static value Creating for NamespaceProvisioningState. */ + public static final NamespaceProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for NamespaceProvisioningState. */ + public static final NamespaceProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for NamespaceProvisioningState. */ + public static final NamespaceProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for NamespaceProvisioningState. */ + public static final NamespaceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for NamespaceProvisioningState. */ + public static final NamespaceProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for NamespaceProvisioningState. */ + public static final NamespaceProvisioningState FAILED = fromString("Failed"); + + /** Static value Deleted for NamespaceProvisioningState. */ + public static final NamespaceProvisioningState DELETED = fromString("Deleted"); + + /** Static value DeleteFailed for NamespaceProvisioningState. */ + public static final NamespaceProvisioningState DELETE_FAILED = fromString("DeleteFailed"); + + /** Static value CreateFailed for NamespaceProvisioningState. */ + public static final NamespaceProvisioningState CREATE_FAILED = fromString("CreateFailed"); + + /** Static value UpdatedFailed for NamespaceProvisioningState. */ + public static final NamespaceProvisioningState UPDATED_FAILED = fromString("UpdatedFailed"); + + /** + * Creates a new instance of NamespaceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NamespaceProvisioningState() { + } + + /** + * Creates or finds a NamespaceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding NamespaceProvisioningState. + */ + @JsonCreator + public static NamespaceProvisioningState fromString(String name) { + return fromString(name, NamespaceProvisioningState.class); + } + + /** + * Gets known NamespaceProvisioningState values. + * + * @return known NamespaceProvisioningState values. + */ + public static Collection values() { + return values(NamespaceProvisioningState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceRegenerateKeyRequest.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceRegenerateKeyRequest.java new file mode 100644 index 000000000000..ec343c97d113 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceRegenerateKeyRequest.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Namespace regenerate share access key request. */ +@Fluent +public final class NamespaceRegenerateKeyRequest { + /* + * Key name to regenerate key1 or key2. + */ + @JsonProperty(value = "keyName", required = true) + private String keyName; + + /** Creates an instance of NamespaceRegenerateKeyRequest class. */ + public NamespaceRegenerateKeyRequest() { + } + + /** + * Get the keyName property: Key name to regenerate key1 or key2. + * + * @return the keyName value. + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the keyName property: Key name to regenerate key1 or key2. + * + * @param keyName the keyName value to set. + * @return the NamespaceRegenerateKeyRequest object itself. + */ + public NamespaceRegenerateKeyRequest withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property keyName in model NamespaceRegenerateKeyRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NamespaceRegenerateKeyRequest.class); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSharedAccessKeys.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSharedAccessKeys.java new file mode 100644 index 000000000000..41f80d610fd7 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSharedAccessKeys.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceSharedAccessKeysInner; + +/** An immutable client-side representation of NamespaceSharedAccessKeys. */ +public interface NamespaceSharedAccessKeys { + /** + * Gets the key1 property: Shared access key1 for the namespace. + * + * @return the key1 value. + */ + String key1(); + + /** + * Gets the key2 property: Shared access key2 for the namespace. + * + * @return the key2 value. + */ + String key2(); + + /** + * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.NamespaceSharedAccessKeysInner object. + * + * @return the inner object. + */ + NamespaceSharedAccessKeysInner innerModel(); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSku.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSku.java new file mode 100644 index 000000000000..f62b64cacbdb --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceSku.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Represents available Sku pricing tiers. */ +@Fluent +public final class NamespaceSku { + /* + * The name of the SKU. + */ + @JsonProperty(value = "name") + private SkuName name; + + /* + * Specifies the number of Throughput Units that defines the capacity for the namespace. The property default value + * is + * 1 which signifies 1 Throughput Unit = 1MB/s ingress and 2MB/s egress per namespace. Min capacity is 1 and + * max allowed capacity is 20. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** Creates an instance of NamespaceSku class. */ + public NamespaceSku() { + } + + /** + * Get the name property: The name of the SKU. + * + * @return the name value. + */ + public SkuName name() { + return this.name; + } + + /** + * Set the name property: The name of the SKU. + * + * @param name the name value to set. + * @return the NamespaceSku object itself. + */ + public NamespaceSku withName(SkuName name) { + this.name = name; + return this; + } + + /** + * Get the capacity property: Specifies the number of Throughput Units that defines the capacity for the namespace. + * The property default value is 1 which signifies 1 Throughput Unit = 1MB/s ingress and 2MB/s egress per namespace. + * Min capacity is 1 and max allowed capacity is 20. + * + * @return the capacity value. + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity property: Specifies the number of Throughput Units that defines the capacity for the namespace. + * The property default value is 1 which signifies 1 Throughput Unit = 1MB/s ingress and 2MB/s egress per namespace. + * Min capacity is 1 and max allowed capacity is 20. + * + * @param capacity the capacity value to set. + * @return the NamespaceSku object itself. + */ + public NamespaceSku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopic.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopic.java new file mode 100644 index 000000000000..6835a1a9540c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopic.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner; + +/** An immutable client-side representation of NamespaceTopic. */ +public interface NamespaceTopic { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: The system metadata relating to namespace topic resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of the namespace topic. + * + * @return the provisioningState value. + */ + NamespaceTopicProvisioningState provisioningState(); + + /** + * Gets the publisherType property: Publisher type of the namespace topic. + * + * @return the publisherType value. + */ + PublisherType publisherType(); + + /** + * Gets the inputSchema property: This determines the format that is expected for incoming events published to the + * topic. + * + * @return the inputSchema value. + */ + EventInputSchema inputSchema(); + + /** + * Gets the eventRetentionInDays property: Event retention for the namespace topic expressed in days. The property + * default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1 + * day. + * + * @return the eventRetentionInDays value. + */ + Integer eventRetentionInDays(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner object. + * + * @return the inner object. + */ + NamespaceTopicInner innerModel(); + + /** The entirety of the NamespaceTopic definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The NamespaceTopic definition stages. */ + interface DefinitionStages { + /** The first stage of the NamespaceTopic definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the NamespaceTopic definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, namespaceName. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @return the next definition stage. + */ + WithCreate withExistingNamespace(String resourceGroupName, String namespaceName); + } + /** + * The stage of the NamespaceTopic definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithPublisherType, + DefinitionStages.WithInputSchema, + DefinitionStages.WithEventRetentionInDays { + /** + * Executes the create request. + * + * @return the created resource. + */ + NamespaceTopic create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NamespaceTopic create(Context context); + } + /** The stage of the NamespaceTopic definition allowing to specify publisherType. */ + interface WithPublisherType { + /** + * Specifies the publisherType property: Publisher type of the namespace topic.. + * + * @param publisherType Publisher type of the namespace topic. + * @return the next definition stage. + */ + WithCreate withPublisherType(PublisherType publisherType); + } + /** The stage of the NamespaceTopic definition allowing to specify inputSchema. */ + interface WithInputSchema { + /** + * Specifies the inputSchema property: This determines the format that is expected for incoming events + * published to the topic.. + * + * @param inputSchema This determines the format that is expected for incoming events published to the + * topic. + * @return the next definition stage. + */ + WithCreate withInputSchema(EventInputSchema inputSchema); + } + /** The stage of the NamespaceTopic definition allowing to specify eventRetentionInDays. */ + interface WithEventRetentionInDays { + /** + * Specifies the eventRetentionInDays property: Event retention for the namespace topic expressed in days. + * The property default value is 1 day. Min event retention duration value is 1 day and max event retention + * duration value is 1 day.. + * + * @param eventRetentionInDays Event retention for the namespace topic expressed in days. The property + * default value is 1 day. Min event retention duration value is 1 day and max event retention duration + * value is 1 day. + * @return the next definition stage. + */ + WithCreate withEventRetentionInDays(Integer eventRetentionInDays); + } + } + /** + * Begins update for the NamespaceTopic resource. + * + * @return the stage of resource update. + */ + NamespaceTopic.Update update(); + + /** The template for NamespaceTopic update. */ + interface Update extends UpdateStages.WithEventRetentionInDays { + /** + * Executes the update request. + * + * @return the updated resource. + */ + NamespaceTopic apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + NamespaceTopic apply(Context context); + } + /** The NamespaceTopic update stages. */ + interface UpdateStages { + /** The stage of the NamespaceTopic update allowing to specify eventRetentionInDays. */ + interface WithEventRetentionInDays { + /** + * Specifies the eventRetentionInDays property: Event retention for the namespace topic expressed in days. + * The property default value is 1 day. Min event retention duration value is 1 day and max event retention + * duration value is 1 day.. + * + * @param eventRetentionInDays Event retention for the namespace topic expressed in days. The property + * default value is 1 day. Min event retention duration value is 1 day and max event retention duration + * value is 1 day. + * @return the next definition stage. + */ + Update withEventRetentionInDays(Integer eventRetentionInDays); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + NamespaceTopic refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + NamespaceTopic refresh(Context context); + + /** + * List keys for a namespace topic. + * + *

List the two keys used to publish to a namespace topic. + * + * @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 shared access keys of the Topic along with {@link Response}. + */ + Response listSharedAccessKeysWithResponse(Context context); + + /** + * List keys for a namespace topic. + * + *

List the two keys used to publish to a namespace topic. + * + * @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 shared access keys of the Topic. + */ + TopicSharedAccessKeys listSharedAccessKeys(); + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Topic. + */ + TopicSharedAccessKeys regenerateKey(TopicRegenerateKeyRequest regenerateKeyRequest); + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Topic. + */ + TopicSharedAccessKeys regenerateKey(TopicRegenerateKeyRequest regenerateKeyRequest, Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptions.java new file mode 100644 index 000000000000..cfb162c5a445 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicEventSubscriptions.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of NamespaceTopicEventSubscriptions. */ +public interface NamespaceTopicEventSubscriptions { + /** + * Get an event subscription of a namespace topic. + * + *

Get properties of an event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a namespace topic along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context); + + /** + * Get an event subscription of a namespace topic. + * + *

Get properties of an event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a namespace topic. + */ + Subscription get(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName); + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String topicName, String eventSubscriptionName); + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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. + */ + void delete( + String resourceGroupName, + String namespaceName, + String topicName, + String eventSubscriptionName, + Context context); + + /** + * List event subscriptions of a namespace topic. + * + *

List event subscriptions that belong to a specific namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @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 result of the List event subscriptions operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespaceTopic(String resourceGroupName, String namespaceName, String topicName); + + /** + * List event subscriptions of a namespace topic. + * + *

List event subscriptions that belong to a specific namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List event subscriptions operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespaceTopic( + String resourceGroupName, String namespaceName, String topicName, String filter, Integer top, Context context); + + /** + * Get an event subscription of a namespace topic. + * + *

Get properties of an event subscription of a namespace topic. + * + * @param id the resource ID. + * @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 properties of an event subscription of a namespace topic along with {@link Response}. + */ + Subscription getById(String id); + + /** + * Get an event subscription of a namespace topic. + * + *

Get properties of an event subscription of a namespace topic. + * + * @param id the resource ID. + * @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 properties of an event subscription of a namespace topic along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete an event subscription of a namespace topic. + * + *

Delete an existing event subscription of a namespace topic. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Subscription resource. + * + * @param name resource name. + * @return the first stage of the new Subscription definition. + */ + Subscription.DefinitionStages.Blank define(String name); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicProvisioningState.java new file mode 100644 index 000000000000..c39cacecb245 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the namespace topic. */ +public final class NamespaceTopicProvisioningState extends ExpandableStringEnum { + /** Static value Creating for NamespaceTopicProvisioningState. */ + public static final NamespaceTopicProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for NamespaceTopicProvisioningState. */ + public static final NamespaceTopicProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for NamespaceTopicProvisioningState. */ + public static final NamespaceTopicProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for NamespaceTopicProvisioningState. */ + public static final NamespaceTopicProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for NamespaceTopicProvisioningState. */ + public static final NamespaceTopicProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for NamespaceTopicProvisioningState. */ + public static final NamespaceTopicProvisioningState FAILED = fromString("Failed"); + + /** Static value Deleted for NamespaceTopicProvisioningState. */ + public static final NamespaceTopicProvisioningState DELETED = fromString("Deleted"); + + /** Static value DeleteFailed for NamespaceTopicProvisioningState. */ + public static final NamespaceTopicProvisioningState DELETE_FAILED = fromString("DeleteFailed"); + + /** Static value CreateFailed for NamespaceTopicProvisioningState. */ + public static final NamespaceTopicProvisioningState CREATE_FAILED = fromString("CreateFailed"); + + /** Static value UpdatedFailed for NamespaceTopicProvisioningState. */ + public static final NamespaceTopicProvisioningState UPDATED_FAILED = fromString("UpdatedFailed"); + + /** + * Creates a new instance of NamespaceTopicProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NamespaceTopicProvisioningState() { + } + + /** + * Creates or finds a NamespaceTopicProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding NamespaceTopicProvisioningState. + */ + @JsonCreator + public static NamespaceTopicProvisioningState fromString(String name) { + return fromString(name, NamespaceTopicProvisioningState.class); + } + + /** + * Gets known NamespaceTopicProvisioningState values. + * + * @return known NamespaceTopicProvisioningState values. + */ + public static Collection values() { + return values(NamespaceTopicProvisioningState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicUpdateParameters.java new file mode 100644 index 000000000000..2560e8100604 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicUpdateParameters.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicUpdateParameterProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of the namespace topic update. */ +@Fluent +public final class NamespaceTopicUpdateParameters { + /* + * Properties of the namespace topic resource. + */ + @JsonProperty(value = "properties") + private NamespaceTopicUpdateParameterProperties innerProperties; + + /** Creates an instance of NamespaceTopicUpdateParameters class. */ + public NamespaceTopicUpdateParameters() { + } + + /** + * Get the innerProperties property: Properties of the namespace topic resource. + * + * @return the innerProperties value. + */ + private NamespaceTopicUpdateParameterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the eventRetentionInDays property: Event retention for the namespace topic expressed in days. The property + * default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1 + * day. + * + * @return the eventRetentionInDays value. + */ + public Integer eventRetentionInDays() { + return this.innerProperties() == null ? null : this.innerProperties().eventRetentionInDays(); + } + + /** + * Set the eventRetentionInDays property: Event retention for the namespace topic expressed in days. The property + * default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1 + * day. + * + * @param eventRetentionInDays the eventRetentionInDays value to set. + * @return the NamespaceTopicUpdateParameters object itself. + */ + public NamespaceTopicUpdateParameters withEventRetentionInDays(Integer eventRetentionInDays) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceTopicUpdateParameterProperties(); + } + this.innerProperties().withEventRetentionInDays(eventRetentionInDays); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopics.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopics.java new file mode 100644 index 000000000000..9945e374a6b9 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopics.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of NamespaceTopics. */ +public interface NamespaceTopics { + /** + * Get a namespace topic. + * + *

Get properties of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @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 properties of a namespace topic along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String namespaceName, String topicName, Context context); + + /** + * Get a namespace topic. + * + *

Get properties of a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @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 properties of a namespace topic. + */ + NamespaceTopic get(String resourceGroupName, String namespaceName, String topicName); + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String topicName); + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String topicName, Context context); + + /** + * List namespace topics under a namespace. + * + *

List all the namespace topics under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 result of the List namespace topics operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List namespace topics under a namespace. + * + *

List all the namespace topics under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List namespace topics operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); + + /** + * List keys for a namespace topic. + * + *

List the two keys used to publish to a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 shared access keys of the Topic along with {@link Response}. + */ + Response listSharedAccessKeysWithResponse( + String resourceGroupName, String namespaceName, String topicName, Context context); + + /** + * List keys for a namespace topic. + * + *

List the two keys used to publish to a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @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 shared access keys of the Topic. + */ + TopicSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String namespaceName, String topicName); + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Topic. + */ + TopicSharedAccessKeys regenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest); + + /** + * Regenerate key for a namespace topic. + * + *

Regenerate a shared access key for a namespace topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the topic. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Topic. + */ + TopicSharedAccessKeys regenerateKey( + String resourceGroupName, + String namespaceName, + String topicName, + TopicRegenerateKeyRequest regenerateKeyRequest, + Context context); + + /** + * Get a namespace topic. + * + *

Get properties of a namespace topic. + * + * @param id the resource ID. + * @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 properties of a namespace topic along with {@link Response}. + */ + NamespaceTopic getById(String id); + + /** + * Get a namespace topic. + * + *

Get properties of a namespace topic. + * + * @param id the resource ID. + * @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 properties of a namespace topic along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete a namespace topic. + * + *

Delete existing namespace topic. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new NamespaceTopic resource. + * + * @param name resource name. + * @return the first stage of the new NamespaceTopic definition. + */ + NamespaceTopic.DefinitionStages.Blank define(String name); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicsListResult.java new file mode 100644 index 000000000000..38064083400e --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceTopicsListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceTopicInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Result of the List namespace topics operation. */ +@Fluent +public final class NamespaceTopicsListResult { + /* + * A collection of namespace topics. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link for the next page of namespace topics. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of NamespaceTopicsListResult class. */ + public NamespaceTopicsListResult() { + } + + /** + * Get the value property: A collection of namespace topics. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of namespace topics. + * + * @param value the value value to set. + * @return the NamespaceTopicsListResult object itself. + */ + public NamespaceTopicsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link for the next page of namespace topics. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link for the next page of namespace topics. + * + * @param nextLink the nextLink value to set. + * @return the NamespaceTopicsListResult object itself. + */ + public NamespaceTopicsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceUpdateParameters.java new file mode 100644 index 000000000000..cfbac8b51934 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespaceUpdateParameters.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceUpdateParameterProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Properties to update namespace. */ +@Fluent +public final class NamespaceUpdateParameters { + /* + * Tags of the namespace resource. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * Namespace resource identity information. + */ + @JsonProperty(value = "identity") + private IdentityInfo identity; + + /* + * Represents available Sku pricing tiers. + */ + @JsonProperty(value = "sku") + private NamespaceSku sku; + + /* + * Properties of the namespace resource. + */ + @JsonProperty(value = "properties") + private NamespaceUpdateParameterProperties innerProperties; + + /** Creates an instance of NamespaceUpdateParameters class. */ + public NamespaceUpdateParameters() { + } + + /** + * Get the tags property: Tags of the namespace resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Tags of the namespace resource. + * + * @param tags the tags value to set. + * @return the NamespaceUpdateParameters object itself. + */ + public NamespaceUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the identity property: Namespace resource identity information. + * + * @return the identity value. + */ + public IdentityInfo identity() { + return this.identity; + } + + /** + * Set the identity property: Namespace resource identity information. + * + * @param identity the identity value to set. + * @return the NamespaceUpdateParameters object itself. + */ + public NamespaceUpdateParameters withIdentity(IdentityInfo identity) { + this.identity = identity; + return this; + } + + /** + * Get the sku property: Represents available Sku pricing tiers. + * + * @return the sku value. + */ + public NamespaceSku sku() { + return this.sku; + } + + /** + * Set the sku property: Represents available Sku pricing tiers. + * + * @param sku the sku value to set. + * @return the NamespaceUpdateParameters object itself. + */ + public NamespaceUpdateParameters withSku(NamespaceSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the innerProperties property: Properties of the namespace resource. + * + * @return the innerProperties value. + */ + private NamespaceUpdateParameterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the topicSpacesConfiguration property: Topic spaces configuration properties that can be updated. + * + * @return the topicSpacesConfiguration value. + */ + public UpdateTopicSpacesConfigurationInfo topicSpacesConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().topicSpacesConfiguration(); + } + + /** + * Set the topicSpacesConfiguration property: Topic spaces configuration properties that can be updated. + * + * @param topicSpacesConfiguration the topicSpacesConfiguration value to set. + * @return the NamespaceUpdateParameters object itself. + */ + public NamespaceUpdateParameters withTopicSpacesConfiguration( + UpdateTopicSpacesConfigurationInfo topicSpacesConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceUpdateParameterProperties(); + } + this.innerProperties().withTopicSpacesConfiguration(topicSpacesConfiguration); + return this; + } + + /** + * Get the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is + * enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceUpdateParameterProperties.InboundIpRules" + * />. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is + * enabled. You can further restrict to specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceUpdateParameterProperties.InboundIpRules" + * />. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the NamespaceUpdateParameters object itself. + */ + public NamespaceUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceUpdateParameterProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** + * Get the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of all IPs. Note: + * These are considered only if PublicNetworkAccess is enabled. + * + * @return the inboundIpRules value. + */ + public List inboundIpRules() { + return this.innerProperties() == null ? null : this.innerProperties().inboundIpRules(); + } + + /** + * Set the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of all IPs. Note: + * These are considered only if PublicNetworkAccess is enabled. + * + * @param inboundIpRules the inboundIpRules value to set. + * @return the NamespaceUpdateParameters object itself. + */ + public NamespaceUpdateParameters withInboundIpRules(List inboundIpRules) { + if (this.innerProperties() == null) { + this.innerProperties = new NamespaceUpdateParameterProperties(); + } + this.innerProperties().withInboundIpRules(inboundIpRules); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (sku() != null) { + sku().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespaces.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespaces.java new file mode 100644 index 000000000000..0a775b7e6e60 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Namespaces.java @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of Namespaces. */ +public interface Namespaces { + /** + * Get a namespace. + * + *

Get properties of a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 properties of a namespace along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String namespaceName, Context context); + + /** + * Get a namespace. + * + *

Get properties of a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 properties of a namespace. + */ + Namespace getByResourceGroup(String resourceGroupName, String namespaceName); + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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. + */ + void deleteByResourceGroup(String resourceGroupName, String namespaceName); + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, Context context); + + /** + * List namespaces under an Azure subscription. + * + *

List all the namespaces under an Azure subscription. + * + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List namespaces under an Azure subscription. + * + *

List all the namespaces under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String filter, Integer top, Context context); + + /** + * List namespaces under a resource group. + * + *

List all the namespaces under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List namespaces under a resource group. + * + *

List all the namespaces under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Namespaces operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context); + + /** + * List keys for a namespace. + * + *

List the two keys used to publish to a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 shared access keys of the Namespace along with {@link Response}. + */ + Response listSharedAccessKeysWithResponse( + String resourceGroupName, String namespaceName, Context context); + + /** + * List keys for a namespace. + * + *

List the two keys used to publish to a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 shared access keys of the Namespace. + */ + NamespaceSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String namespaceName); + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Namespace. + */ + NamespaceSharedAccessKeys regenerateKey( + String resourceGroupName, String namespaceName, NamespaceRegenerateKeyRequest regenerateKeyRequest); + + /** + * Regenerate key for a namespace. + * + *

Regenerate a shared access key for a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the Namespace. + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the Namespace. + */ + NamespaceSharedAccessKeys regenerateKey( + String resourceGroupName, + String namespaceName, + NamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context); + + /** + * Get a namespace. + * + *

Get properties of a namespace. + * + * @param id the resource ID. + * @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 properties of a namespace along with {@link Response}. + */ + Namespace getById(String id); + + /** + * Get a namespace. + * + *

Get properties of a namespace. + * + * @param id the resource ID. + * @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 properties of a namespace along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete a namespace. + * + *

Delete existing namespace. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Namespace resource. + * + * @param name resource name. + * @return the first stage of the new Namespace definition. + */ + Namespace.DefinitionStages.Blank define(String name); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespacesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespacesListResult.java new file mode 100644 index 000000000000..a32b12761939 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NamespacesListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.NamespaceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Result of the List Namespaces operation. */ +@Fluent +public final class NamespacesListResult { + /* + * A collection of namespaces. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link for the next page of namespaces. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of NamespacesListResult class. */ + public NamespacesListResult() { + } + + /** + * Get the value property: A collection of namespaces. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of namespaces. + * + * @param value the value value to set. + * @return the NamespacesListResult object itself. + */ + public NamespacesListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link for the next page of namespaces. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link for the next page of namespaces. + * + * @param nextLink the nextLink value to set. + * @return the NamespacesListResult object itself. + */ + public NamespacesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanAdvancedFilter.java index a202a747157d..2cae4d61da26 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanAdvancedFilter.java @@ -20,6 +20,10 @@ public final class NumberGreaterThanAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "value") private Double value; + /** Creates an instance of NumberGreaterThanAdvancedFilter class. */ + public NumberGreaterThanAdvancedFilter() { + } + /** * Get the value property: The filter value. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanFilter.java new file mode 100644 index 000000000000..9e5296ad78fe --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanFilter.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** NumberGreaterThan Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberGreaterThan") +@Fluent +public final class NumberGreaterThanFilter extends Filter { + /* + * The filter value. + */ + @JsonProperty(value = "value") + private Double value; + + /** Creates an instance of NumberGreaterThanFilter class. */ + public NumberGreaterThanFilter() { + } + + /** + * Get the value property: The filter value. + * + * @return the value value. + */ + public Double value() { + return this.value; + } + + /** + * Set the value property: The filter value. + * + * @param value the value value to set. + * @return the NumberGreaterThanFilter object itself. + */ + public NumberGreaterThanFilter withValue(Double value) { + this.value = value; + return this; + } + + /** {@inheritDoc} */ + @Override + public NumberGreaterThanFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsAdvancedFilter.java index 8b7c58af7052..801a7b930f06 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsAdvancedFilter.java @@ -20,6 +20,10 @@ public final class NumberGreaterThanOrEqualsAdvancedFilter extends AdvancedFilte @JsonProperty(value = "value") private Double value; + /** Creates an instance of NumberGreaterThanOrEqualsAdvancedFilter class. */ + public NumberGreaterThanOrEqualsAdvancedFilter() { + } + /** * Get the value property: The filter value. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsFilter.java new file mode 100644 index 000000000000..eda3a1c68981 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberGreaterThanOrEqualsFilter.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** NumberGreaterThanOrEquals Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberGreaterThanOrEquals") +@Fluent +public final class NumberGreaterThanOrEqualsFilter extends Filter { + /* + * The filter value. + */ + @JsonProperty(value = "value") + private Double value; + + /** Creates an instance of NumberGreaterThanOrEqualsFilter class. */ + public NumberGreaterThanOrEqualsFilter() { + } + + /** + * Get the value property: The filter value. + * + * @return the value value. + */ + public Double value() { + return this.value; + } + + /** + * Set the value property: The filter value. + * + * @param value the value value to set. + * @return the NumberGreaterThanOrEqualsFilter object itself. + */ + public NumberGreaterThanOrEqualsFilter withValue(Double value) { + this.value = value; + return this; + } + + /** {@inheritDoc} */ + @Override + public NumberGreaterThanOrEqualsFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInAdvancedFilter.java index 82cf70375147..34512cf0a7e6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInAdvancedFilter.java @@ -21,6 +21,10 @@ public final class NumberInAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List values; + /** Creates an instance of NumberInAdvancedFilter class. */ + public NumberInAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInFilter.java new file mode 100644 index 000000000000..923849a0400c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** NumberIn Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberIn") +@Fluent +public final class NumberInFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** Creates an instance of NumberInFilter class. */ + public NumberInFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the NumberInFilter object itself. + */ + public NumberInFilter withValues(List values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public NumberInFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeAdvancedFilter.java index 08aa08988e6c..a0921d0b30c1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeAdvancedFilter.java @@ -21,6 +21,10 @@ public final class NumberInRangeAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List> values; + /** Creates an instance of NumberInRangeAdvancedFilter class. */ + public NumberInRangeAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeFilter.java new file mode 100644 index 000000000000..b03629fcf8e7 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberInRangeFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** NumberInRange Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberInRange") +@Fluent +public final class NumberInRangeFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List> values; + + /** Creates an instance of NumberInRangeFilter class. */ + public NumberInRangeFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List> values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the NumberInRangeFilter object itself. + */ + public NumberInRangeFilter withValues(List> values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public NumberInRangeFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanAdvancedFilter.java index 24663e8433c2..77504a13fabd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanAdvancedFilter.java @@ -20,6 +20,10 @@ public final class NumberLessThanAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "value") private Double value; + /** Creates an instance of NumberLessThanAdvancedFilter class. */ + public NumberLessThanAdvancedFilter() { + } + /** * Get the value property: The filter value. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanFilter.java new file mode 100644 index 000000000000..64beac8d8ba0 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanFilter.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** NumberLessThan Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberLessThan") +@Fluent +public final class NumberLessThanFilter extends Filter { + /* + * The filter value. + */ + @JsonProperty(value = "value") + private Double value; + + /** Creates an instance of NumberLessThanFilter class. */ + public NumberLessThanFilter() { + } + + /** + * Get the value property: The filter value. + * + * @return the value value. + */ + public Double value() { + return this.value; + } + + /** + * Set the value property: The filter value. + * + * @param value the value value to set. + * @return the NumberLessThanFilter object itself. + */ + public NumberLessThanFilter withValue(Double value) { + this.value = value; + return this; + } + + /** {@inheritDoc} */ + @Override + public NumberLessThanFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsAdvancedFilter.java index f77e3a08e309..0c24be8a6909 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsAdvancedFilter.java @@ -20,6 +20,10 @@ public final class NumberLessThanOrEqualsAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "value") private Double value; + /** Creates an instance of NumberLessThanOrEqualsAdvancedFilter class. */ + public NumberLessThanOrEqualsAdvancedFilter() { + } + /** * Get the value property: The filter value. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsFilter.java new file mode 100644 index 000000000000..678dd6e63c14 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberLessThanOrEqualsFilter.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** NumberLessThanOrEquals Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberLessThanOrEquals") +@Fluent +public final class NumberLessThanOrEqualsFilter extends Filter { + /* + * The filter value. + */ + @JsonProperty(value = "value") + private Double value; + + /** Creates an instance of NumberLessThanOrEqualsFilter class. */ + public NumberLessThanOrEqualsFilter() { + } + + /** + * Get the value property: The filter value. + * + * @return the value value. + */ + public Double value() { + return this.value; + } + + /** + * Set the value property: The filter value. + * + * @param value the value value to set. + * @return the NumberLessThanOrEqualsFilter object itself. + */ + public NumberLessThanOrEqualsFilter withValue(Double value) { + this.value = value; + return this; + } + + /** {@inheritDoc} */ + @Override + public NumberLessThanOrEqualsFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInAdvancedFilter.java index 23d73b32a8e1..d5998ded9efc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInAdvancedFilter.java @@ -21,6 +21,10 @@ public final class NumberNotInAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List values; + /** Creates an instance of NumberNotInAdvancedFilter class. */ + public NumberNotInAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInFilter.java new file mode 100644 index 000000000000..fcd9e2193727 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** NumberNotIn Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberNotIn") +@Fluent +public final class NumberNotInFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** Creates an instance of NumberNotInFilter class. */ + public NumberNotInFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the NumberNotInFilter object itself. + */ + public NumberNotInFilter withValues(List values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public NumberNotInFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeAdvancedFilter.java index 1c5fb184bd03..f5d1a2681ae4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeAdvancedFilter.java @@ -21,6 +21,10 @@ public final class NumberNotInRangeAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List> values; + /** Creates an instance of NumberNotInRangeAdvancedFilter class. */ + public NumberNotInRangeAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeFilter.java new file mode 100644 index 000000000000..2434cc73d7aa --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/NumberNotInRangeFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** NumberNotInRange Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("NumberNotInRange") +@Fluent +public final class NumberNotInRangeFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List> values; + + /** Creates an instance of NumberNotInRangeFilter class. */ + public NumberNotInRangeFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List> values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the NumberNotInRangeFilter object itself. + */ + public NumberNotInRangeFilter withValues(List> values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public NumberNotInRangeFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationInfo.java index 9ae6fc475deb..e2077d1cd100 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationInfo.java @@ -34,6 +34,10 @@ public final class OperationInfo { @JsonProperty(value = "description") private String description; + /** Creates an instance of OperationInfo class. */ + public OperationInfo() { + } + /** * Get the provider property: Name of the provider. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operations.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operations.java index b03d1b7969de..2a02c91d1ec0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operations.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Operations.java @@ -10,7 +10,9 @@ /** Resource collection API of Operations. */ public interface Operations { /** - * List the available operations supported by the Microsoft.EventGrid resource provider. + * List available operations. + * + *

List the available operations supported by the Microsoft.EventGrid resource provider. * * @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. @@ -19,7 +21,9 @@ public interface Operations { PagedIterable list(); /** - * List the available operations supported by the Microsoft.EventGrid resource provider. + * List available operations. + * + *

List the available operations supported by the Microsoft.EventGrid resource provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationsListResult.java index 93ccd84c14f1..44f031bd7258 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/OperationsListResult.java @@ -18,6 +18,10 @@ public final class OperationsListResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of OperationsListResult class. */ + public OperationsListResult() { + } + /** * Get the value property: A collection of operations. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Partner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Partner.java index 1dab1e788fb7..4b0612abfd02 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Partner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Partner.java @@ -25,19 +25,20 @@ public final class Partner { private String partnerName; /* - * Expiration time of the partner authorization. If this timer expires, any - * request from this partner to create, update or delete resources in - * subscriber's - * context will fail. If specified, the allowed values are between 1 to the - * value of defaultMaximumExpirationTimeInDays specified in - * PartnerConfiguration. - * If not specified, the default value will be the value of - * defaultMaximumExpirationTimeInDays specified in PartnerConfiguration or - * 7 if this value is not specified. + * Expiration time of the partner authorization. If this timer expires, any request from this partner to create, + * update or delete resources in subscriber's + * context will fail. If specified, the allowed values are between 1 to the value of + * defaultMaximumExpirationTimeInDays specified in PartnerConfiguration. + * If not specified, the default value will be the value of defaultMaximumExpirationTimeInDays specified in + * PartnerConfiguration or 7 if this value is not specified. */ @JsonProperty(value = "authorizationExpirationTimeInUtc") private OffsetDateTime authorizationExpirationTimeInUtc; + /** Creates an instance of Partner class. */ + public Partner() { + } + /** * Get the partnerRegistrationImmutableId property: The immutableId of the corresponding partner registration. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerAuthorization.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerAuthorization.java index 844c53289946..9c5f6d4b2829 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerAuthorization.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerAuthorization.java @@ -12,10 +12,9 @@ @Fluent public final class PartnerAuthorization { /* - * Time used to validate the authorization expiration time for each - * authorized partner. If DefaultMaximumExpirationTimeInDays is - * not specified, the default is 7 days. Otherwise, allowed values are - * between 1 and 365 days. + * Time used to validate the authorization expiration time for each authorized partner. If + * DefaultMaximumExpirationTimeInDays is + * not specified, the default is 7 days. Otherwise, allowed values are between 1 and 365 days. */ @JsonProperty(value = "defaultMaximumExpirationTimeInDays") private Integer defaultMaximumExpirationTimeInDays; @@ -26,6 +25,10 @@ public final class PartnerAuthorization { @JsonProperty(value = "authorizedPartnersList") private List authorizedPartnersList; + /** Creates an instance of PartnerAuthorization class. */ + public PartnerAuthorization() { + } + /** * Get the defaultMaximumExpirationTimeInDays property: Time used to validate the authorization expiration time for * each authorized partner. If DefaultMaximumExpirationTimeInDays is not specified, the default is 7 days. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthentication.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthentication.java new file mode 100644 index 000000000000..1df1f2eab029 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthentication.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Partner client authentication. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "clientAuthenticationType", + defaultImpl = PartnerClientAuthentication.class) +@JsonTypeName("PartnerClientAuthentication") +@JsonSubTypes({@JsonSubTypes.Type(name = "AzureAD", value = AzureADPartnerClientAuthentication.class)}) +@Immutable +public class PartnerClientAuthentication { + /** Creates an instance of PartnerClientAuthentication class. */ + public PartnerClientAuthentication() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthenticationType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthenticationType.java new file mode 100644 index 000000000000..f52efba3c98b --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerClientAuthenticationType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of client authentication. */ +public final class PartnerClientAuthenticationType extends ExpandableStringEnum { + /** Static value AzureAD for PartnerClientAuthenticationType. */ + public static final PartnerClientAuthenticationType AZURE_AD = fromString("AzureAD"); + + /** + * Creates a new instance of PartnerClientAuthenticationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PartnerClientAuthenticationType() { + } + + /** + * Creates or finds a PartnerClientAuthenticationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PartnerClientAuthenticationType. + */ + @JsonCreator + public static PartnerClientAuthenticationType fromString(String name) { + return fromString(name, PartnerClientAuthenticationType.class); + } + + /** + * Gets known PartnerClientAuthenticationType values. + * + * @return known PartnerClientAuthenticationType values. + */ + public static Collection values() { + return values(PartnerClientAuthenticationType.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationProvisioningState.java index fe3e305dce31..8ec670e943b5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PartnerConfigurationProvisioningState. */ +/** Provisioning state of the partner configuration. */ public final class PartnerConfigurationProvisioningState extends ExpandableStringEnum { /** Static value Creating for PartnerConfigurationProvisioningState. */ @@ -29,6 +29,15 @@ public final class PartnerConfigurationProvisioningState /** Static value Failed for PartnerConfigurationProvisioningState. */ public static final PartnerConfigurationProvisioningState FAILED = fromString("Failed"); + /** + * Creates a new instance of PartnerConfigurationProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PartnerConfigurationProvisioningState() { + } + /** * Creates or finds a PartnerConfigurationProvisioningState from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationUpdateParameters.java index 688aa1d111d8..1b01b92e472a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationUpdateParameters.java @@ -26,6 +26,10 @@ public final class PartnerConfigurationUpdateParameters { @JsonProperty(value = "properties") private PartnerConfigurationUpdateParameterProperties innerProperties; + /** Creates an instance of PartnerConfigurationUpdateParameters class. */ + public PartnerConfigurationUpdateParameters() { + } + /** * Get the tags property: Tags of the partner configuration resource. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurations.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurations.java index 83cb33f0f0a4..37803cd338f9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurations.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurations.java @@ -12,30 +12,36 @@ /** Resource collection API of PartnerConfigurations. */ public interface PartnerConfigurations { /** - * Get properties of a partner configuration. + * Get a partner configuration. + * + *

Get properties of a partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. + * @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 properties of a partner configuration. + * @return properties of a partner configuration along with {@link Response}. */ - PartnerConfiguration getByResourceGroup(String resourceGroupName); + Response getByResourceGroupWithResponse(String resourceGroupName, Context context); /** - * Get properties of a partner configuration. + * Get a partner configuration. + * + *

Get properties of a partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @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 properties of a partner configuration along with {@link Response}. + * @return properties of a partner configuration. */ - Response getByResourceGroupWithResponse(String resourceGroupName, Context context); + PartnerConfiguration getByResourceGroup(String resourceGroupName); /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -47,7 +53,9 @@ public interface PartnerConfigurations { PartnerConfiguration createOrUpdate(String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo); /** - * Synchronously creates or updates a partner configuration with the specified parameters. + * Create or update a partner configuration. + * + *

Synchronously creates or updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationInfo Partner configuration information. @@ -61,7 +69,9 @@ PartnerConfiguration createOrUpdate( String resourceGroupName, PartnerConfigurationInner partnerConfigurationInfo, Context context); /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -71,7 +81,9 @@ PartnerConfiguration createOrUpdate( void delete(String resourceGroupName); /** - * Delete existing partner configuration. + * Delete a partner configuration. + * + *

Delete existing partner configuration. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -82,7 +94,9 @@ PartnerConfiguration createOrUpdate( void delete(String resourceGroupName, Context context); /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -95,7 +109,9 @@ PartnerConfiguration update( String resourceGroupName, PartnerConfigurationUpdateParameters partnerConfigurationUpdateParameters); /** - * Synchronously updates a partner configuration with the specified parameters. + * Update a partner configuration. + * + *

Synchronously updates a partner configuration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerConfigurationUpdateParameters Partner configuration update information. @@ -111,7 +127,9 @@ PartnerConfiguration update( Context context); /** - * List all the partner configurations under a resource group. + * List partner configurations under a resource group. + * + *

List all the partner configurations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,7 +140,9 @@ PartnerConfiguration update( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the partner configurations under a resource group. + * List partner configurations under a resource group. + * + *

List all the partner configurations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param context The context to associate with this operation. @@ -134,7 +154,9 @@ PartnerConfiguration update( PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List all the partner configurations under an Azure subscription. + * List partner configurations under an Azure subscription. + * + *

List all the partner configurations under an Azure subscription. * * @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. @@ -143,7 +165,9 @@ PartnerConfiguration update( PagedIterable list(); /** - * List all the partner configurations under an Azure subscription. + * List partner configurations under an Azure subscription. + * + *

List all the partner configurations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -162,19 +186,9 @@ PartnerConfiguration update( PagedIterable list(String filter, Integer top, Context context); /** - * Authorize a single partner either by partner registration immutable Id or by partner name. + * Authorize a partner. * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerInfo The information of the partner to be authorized. - * @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 partner configuration information. - */ - PartnerConfiguration authorizePartner(String resourceGroupName, Partner partnerInfo); - - /** - * Authorize a single partner either by partner registration immutable Id or by partner name. + *

Authorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be authorized. @@ -188,19 +202,23 @@ Response authorizePartnerWithResponse( String resourceGroupName, Partner partnerInfo, Context context); /** - * Unauthorize a single partner either by partner registration immutable Id or by partner name. + * Authorize a partner. + * + *

Authorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param partnerInfo The information of the partner to be unauthorized. + * @param partnerInfo The information of the partner to be authorized. * @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 partner configuration information. */ - PartnerConfiguration unauthorizePartner(String resourceGroupName, Partner partnerInfo); + PartnerConfiguration authorizePartner(String resourceGroupName, Partner partnerInfo); /** - * Unauthorize a single partner either by partner registration immutable Id or by partner name. + * Unauthorize a partner. + * + *

Unauthorize a single partner either by partner registration immutable Id or by partner name. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerInfo The information of the partner to be unauthorized. @@ -212,4 +230,18 @@ Response authorizePartnerWithResponse( */ Response unauthorizePartnerWithResponse( String resourceGroupName, Partner partnerInfo, Context context); + + /** + * Unauthorize a partner. + * + *

Unauthorize a single partner either by partner registration immutable Id or by partner name. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerInfo The information of the partner to be unauthorized. + * @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 partner configuration information. + */ + PartnerConfiguration unauthorizePartner(String resourceGroupName, Partner partnerInfo); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationsListResult.java index 1ad5b8a59539..b17f9f77c5ef 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerConfigurationsListResult.java @@ -24,6 +24,10 @@ public final class PartnerConfigurationsListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of PartnerConfigurationsListResult class. */ + public PartnerConfigurationsListResult() { + } + /** * Get the value property: A collection of partner configurations. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestination.java new file mode 100644 index 000000000000..40099927c22a --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestination.java @@ -0,0 +1,359 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; +import java.time.OffsetDateTime; +import java.util.Map; +import java.util.UUID; + +/** An immutable client-side representation of PartnerDestination. */ +public interface PartnerDestination { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: The system metadata relating to Partner Destination resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner registration. + * + * @return the partnerRegistrationImmutableId value. + */ + UUID partnerRegistrationImmutableId(); + + /** + * Gets the endpointServiceContext property: Endpoint context associated with this partner destination. + * + * @return the endpointServiceContext value. + */ + String endpointServiceContext(); + + /** + * Gets the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If this timer + * expires and the partner destination was never activated, the partner destination and corresponding channel are + * deleted. + * + * @return the expirationTimeIfNotActivatedUtc value. + */ + OffsetDateTime expirationTimeIfNotActivatedUtc(); + + /** + * Gets the provisioningState property: Provisioning state of the partner destination. + * + * @return the provisioningState value. + */ + PartnerDestinationProvisioningState provisioningState(); + + /** + * Gets the activationState property: Activation state of the partner destination. + * + * @return the activationState value. + */ + PartnerDestinationActivationState activationState(); + + /** + * Gets the endpointBaseUrl property: Endpoint Base URL of the partner destination. + * + * @return the endpointBaseUrl value. + */ + String endpointBaseUrl(); + + /** + * Gets the messageForActivation property: Context or helpful message that can be used during the approval process. + * + * @return the messageForActivation value. + */ + String messageForActivation(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner object. + * + * @return the inner object. + */ + PartnerDestinationInner innerModel(); + + /** The entirety of the PartnerDestination definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The PartnerDestination definition stages. */ + interface DefinitionStages { + /** The first stage of the PartnerDestination definition. */ + interface Blank extends WithLocation { + } + /** The stage of the PartnerDestination definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + /** The stage of the PartnerDestination definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the PartnerDestination definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithPartnerRegistrationImmutableId, + DefinitionStages.WithEndpointServiceContext, + DefinitionStages.WithExpirationTimeIfNotActivatedUtc, + DefinitionStages.WithActivationState, + DefinitionStages.WithEndpointBaseUrl, + DefinitionStages.WithMessageForActivation { + /** + * Executes the create request. + * + * @return the created resource. + */ + PartnerDestination create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PartnerDestination create(Context context); + } + /** The stage of the PartnerDestination definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the PartnerDestination definition allowing to specify partnerRegistrationImmutableId. */ + interface WithPartnerRegistrationImmutableId { + /** + * Specifies the partnerRegistrationImmutableId property: The immutable Id of the corresponding partner + * registration.. + * + * @param partnerRegistrationImmutableId The immutable Id of the corresponding partner registration. + * @return the next definition stage. + */ + WithCreate withPartnerRegistrationImmutableId(UUID partnerRegistrationImmutableId); + } + /** The stage of the PartnerDestination definition allowing to specify endpointServiceContext. */ + interface WithEndpointServiceContext { + /** + * Specifies the endpointServiceContext property: Endpoint context associated with this partner + * destination.. + * + * @param endpointServiceContext Endpoint context associated with this partner destination. + * @return the next definition stage. + */ + WithCreate withEndpointServiceContext(String endpointServiceContext); + } + /** The stage of the PartnerDestination definition allowing to specify expirationTimeIfNotActivatedUtc. */ + interface WithExpirationTimeIfNotActivatedUtc { + /** + * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the partner destination. If + * this timer expires and the partner destination was never activated, the partner destination and + * corresponding channel are deleted.. + * + * @param expirationTimeIfNotActivatedUtc Expiration time of the partner destination. If this timer expires + * and the partner destination was never activated, the partner destination and corresponding channel + * are deleted. + * @return the next definition stage. + */ + WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc); + } + /** The stage of the PartnerDestination definition allowing to specify activationState. */ + interface WithActivationState { + /** + * Specifies the activationState property: Activation state of the partner destination.. + * + * @param activationState Activation state of the partner destination. + * @return the next definition stage. + */ + WithCreate withActivationState(PartnerDestinationActivationState activationState); + } + /** The stage of the PartnerDestination definition allowing to specify endpointBaseUrl. */ + interface WithEndpointBaseUrl { + /** + * Specifies the endpointBaseUrl property: Endpoint Base URL of the partner destination. + * + * @param endpointBaseUrl Endpoint Base URL of the partner destination. + * @return the next definition stage. + */ + WithCreate withEndpointBaseUrl(String endpointBaseUrl); + } + /** The stage of the PartnerDestination definition allowing to specify messageForActivation. */ + interface WithMessageForActivation { + /** + * Specifies the messageForActivation property: Context or helpful message that can be used during the + * approval process.. + * + * @param messageForActivation Context or helpful message that can be used during the approval process. + * @return the next definition stage. + */ + WithCreate withMessageForActivation(String messageForActivation); + } + } + /** + * Begins update for the PartnerDestination resource. + * + * @return the stage of resource update. + */ + PartnerDestination.Update update(); + + /** The template for PartnerDestination update. */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PartnerDestination apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PartnerDestination apply(Context context); + } + /** The PartnerDestination update stages. */ + interface UpdateStages { + /** The stage of the PartnerDestination update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Tags of the Partner Destination resource.. + * + * @param tags Tags of the Partner Destination resource. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PartnerDestination refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PartnerDestination refresh(Context context); + + /** + * Activate a partner destination. + * + *

Activate a newly created partner destination. + * + * @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 event Grid Partner Destination along with {@link Response}. + */ + Response activateWithResponse(Context context); + + /** + * Activate a partner destination. + * + *

Activate a newly created partner destination. + * + * @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 event Grid Partner Destination. + */ + PartnerDestination activate(); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationActivationState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationActivationState.java new file mode 100644 index 000000000000..bba0b4a5def6 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationActivationState.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Activation state of the partner destination. */ +public final class PartnerDestinationActivationState extends ExpandableStringEnum { + /** Static value NeverActivated for PartnerDestinationActivationState. */ + public static final PartnerDestinationActivationState NEVER_ACTIVATED = fromString("NeverActivated"); + + /** Static value Activated for PartnerDestinationActivationState. */ + public static final PartnerDestinationActivationState ACTIVATED = fromString("Activated"); + + /** + * Creates a new instance of PartnerDestinationActivationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PartnerDestinationActivationState() { + } + + /** + * Creates or finds a PartnerDestinationActivationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PartnerDestinationActivationState. + */ + @JsonCreator + public static PartnerDestinationActivationState fromString(String name) { + return fromString(name, PartnerDestinationActivationState.class); + } + + /** + * Gets known PartnerDestinationActivationState values. + * + * @return known PartnerDestinationActivationState values. + */ + public static Collection values() { + return values(PartnerDestinationActivationState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationInfo.java new file mode 100644 index 000000000000..d67d08ee22a6 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationInfo.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** Properties of the corresponding partner destination of a Channel. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "endpointType", + defaultImpl = PartnerDestinationInfo.class) +@JsonTypeName("PartnerDestinationInfo") +@JsonSubTypes({@JsonSubTypes.Type(name = "WebHook", value = WebhookPartnerDestinationInfo.class)}) +@Fluent +public class PartnerDestinationInfo { + /* + * Azure subscription ID of the subscriber. The partner destination associated with the channel will be + * created under this Azure subscription. + */ + @JsonProperty(value = "azureSubscriptionId") + private String azureSubscriptionId; + + /* + * Azure Resource Group of the subscriber. The partner destination associated with the channel will be + * created under this resource group. + */ + @JsonProperty(value = "resourceGroupName") + private String resourceGroupName; + + /* + * Name of the partner destination associated with the channel. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Additional context of the partner destination endpoint. + */ + @JsonProperty(value = "endpointServiceContext") + private String endpointServiceContext; + + /* + * Change history of the resource move. + */ + @JsonProperty(value = "resourceMoveChangeHistory") + private List resourceMoveChangeHistory; + + /** Creates an instance of PartnerDestinationInfo class. */ + public PartnerDestinationInfo() { + } + + /** + * Get the azureSubscriptionId property: Azure subscription ID of the subscriber. The partner destination associated + * with the channel will be created under this Azure subscription. + * + * @return the azureSubscriptionId value. + */ + public String azureSubscriptionId() { + return this.azureSubscriptionId; + } + + /** + * Set the azureSubscriptionId property: Azure subscription ID of the subscriber. The partner destination associated + * with the channel will be created under this Azure subscription. + * + * @param azureSubscriptionId the azureSubscriptionId value to set. + * @return the PartnerDestinationInfo object itself. + */ + public PartnerDestinationInfo withAzureSubscriptionId(String azureSubscriptionId) { + this.azureSubscriptionId = azureSubscriptionId; + return this; + } + + /** + * Get the resourceGroupName property: Azure Resource Group of the subscriber. The partner destination associated + * with the channel will be created under this resource group. + * + * @return the resourceGroupName value. + */ + public String resourceGroupName() { + return this.resourceGroupName; + } + + /** + * Set the resourceGroupName property: Azure Resource Group of the subscriber. The partner destination associated + * with the channel will be created under this resource group. + * + * @param resourceGroupName the resourceGroupName value to set. + * @return the PartnerDestinationInfo object itself. + */ + public PartnerDestinationInfo withResourceGroupName(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + /** + * Get the name property: Name of the partner destination associated with the channel. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the partner destination associated with the channel. + * + * @param name the name value to set. + * @return the PartnerDestinationInfo object itself. + */ + public PartnerDestinationInfo withName(String name) { + this.name = name; + return this; + } + + /** + * Get the endpointServiceContext property: Additional context of the partner destination endpoint. + * + * @return the endpointServiceContext value. + */ + public String endpointServiceContext() { + return this.endpointServiceContext; + } + + /** + * Set the endpointServiceContext property: Additional context of the partner destination endpoint. + * + * @param endpointServiceContext the endpointServiceContext value to set. + * @return the PartnerDestinationInfo object itself. + */ + public PartnerDestinationInfo withEndpointServiceContext(String endpointServiceContext) { + this.endpointServiceContext = endpointServiceContext; + return this; + } + + /** + * Get the resourceMoveChangeHistory property: Change history of the resource move. + * + * @return the resourceMoveChangeHistory value. + */ + public List resourceMoveChangeHistory() { + return this.resourceMoveChangeHistory; + } + + /** + * Set the resourceMoveChangeHistory property: Change history of the resource move. + * + * @param resourceMoveChangeHistory the resourceMoveChangeHistory value to set. + * @return the PartnerDestinationInfo object itself. + */ + public PartnerDestinationInfo withResourceMoveChangeHistory( + List resourceMoveChangeHistory) { + this.resourceMoveChangeHistory = resourceMoveChangeHistory; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceMoveChangeHistory() != null) { + resourceMoveChangeHistory().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationProvisioningState.java new file mode 100644 index 000000000000..980f54198cca --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationProvisioningState.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the partner destination. */ +public final class PartnerDestinationProvisioningState + extends ExpandableStringEnum { + /** Static value Creating for PartnerDestinationProvisioningState. */ + public static final PartnerDestinationProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for PartnerDestinationProvisioningState. */ + public static final PartnerDestinationProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for PartnerDestinationProvisioningState. */ + public static final PartnerDestinationProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for PartnerDestinationProvisioningState. */ + public static final PartnerDestinationProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for PartnerDestinationProvisioningState. */ + public static final PartnerDestinationProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for PartnerDestinationProvisioningState. */ + public static final PartnerDestinationProvisioningState FAILED = fromString("Failed"); + + /** Static value IdleDueToMirroredChannelResourceDeletion for PartnerDestinationProvisioningState. */ + public static final PartnerDestinationProvisioningState IDLE_DUE_TO_MIRRORED_CHANNEL_RESOURCE_DELETION = + fromString("IdleDueToMirroredChannelResourceDeletion"); + + /** + * Creates a new instance of PartnerDestinationProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PartnerDestinationProvisioningState() { + } + + /** + * Creates or finds a PartnerDestinationProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PartnerDestinationProvisioningState. + */ + @JsonCreator + public static PartnerDestinationProvisioningState fromString(String name) { + return fromString(name, PartnerDestinationProvisioningState.class); + } + + /** + * Gets known PartnerDestinationProvisioningState values. + * + * @return known PartnerDestinationProvisioningState values. + */ + public static Collection values() { + return values(PartnerDestinationProvisioningState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationUpdateParameters.java new file mode 100644 index 000000000000..f6fc7638751c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationUpdateParameters.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Properties of the Partner Destination that can be updated. */ +@Fluent +public final class PartnerDestinationUpdateParameters { + /* + * Tags of the Partner Destination resource. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** Creates an instance of PartnerDestinationUpdateParameters class. */ + public PartnerDestinationUpdateParameters() { + } + + /** + * Get the tags property: Tags of the Partner Destination resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Tags of the Partner Destination resource. + * + * @param tags the tags value to set. + * @return the PartnerDestinationUpdateParameters object itself. + */ + public PartnerDestinationUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinations.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinations.java new file mode 100644 index 000000000000..eb9ff884ea4d --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinations.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of PartnerDestinations. */ +public interface PartnerDestinations { + /** + * Get a partner destination. + * + *

Get properties of a partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 properties of a partner destination along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerDestinationName, Context context); + + /** + * Get a partner destination. + * + *

Get properties of a partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 properties of a partner destination. + */ + PartnerDestination getByResourceGroup(String resourceGroupName, String partnerDestinationName); + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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. + */ + void deleteByResourceGroup(String resourceGroupName, String partnerDestinationName); + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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. + */ + void delete(String resourceGroupName, String partnerDestinationName, Context context); + + /** + * List partner destinations under an Azure subscription. + * + *

List all the partner destinations under an Azure subscription. + * + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List partner destinations under an Azure subscription. + * + *

List all the partner destinations under an Azure subscription. + * + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String filter, Integer top, Context context); + + /** + * List partner destinations under a resource group. + * + *

List all the partner destinations under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List partner destinations under a resource group. + * + *

List all the partner destinations under a resource group. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 result of the List Partner Destinations operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup( + String resourceGroupName, String filter, Integer top, Context context); + + /** + * Activate a partner destination. + * + *

Activate a newly created partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 event Grid Partner Destination along with {@link Response}. + */ + Response activateWithResponse( + String resourceGroupName, String partnerDestinationName, Context context); + + /** + * Activate a partner destination. + * + *

Activate a newly created partner destination. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param partnerDestinationName Name of the partner destination. + * @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 event Grid Partner Destination. + */ + PartnerDestination activate(String resourceGroupName, String partnerDestinationName); + + /** + * Get a partner destination. + * + *

Get properties of a partner destination. + * + * @param id the resource ID. + * @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 properties of a partner destination along with {@link Response}. + */ + PartnerDestination getById(String id); + + /** + * Get a partner destination. + * + *

Get properties of a partner destination. + * + * @param id the resource ID. + * @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 properties of a partner destination along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete a partner destination. + * + *

Delete existing partner destination. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PartnerDestination resource. + * + * @param name resource name. + * @return the first stage of the new PartnerDestination definition. + */ + PartnerDestination.DefinitionStages.Blank define(String name); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationsListResult.java new file mode 100644 index 000000000000..b6d240d78932 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDestinationsListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.PartnerDestinationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Result of the List Partner Destinations operation. */ +@Fluent +public final class PartnerDestinationsListResult { + /* + * A collection of partner destinations. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link for the next page of partner destinations. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of PartnerDestinationsListResult class. */ + public PartnerDestinationsListResult() { + } + + /** + * Get the value property: A collection of partner destinations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of partner destinations. + * + * @param value the value value to set. + * @return the PartnerDestinationsListResult object itself. + */ + public PartnerDestinationsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link for the next page of partner destinations. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link for the next page of partner destinations. + * + * @param nextLink the nextLink value to set. + * @return the PartnerDestinationsListResult object itself. + */ + public PartnerDestinationsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDetails.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDetails.java index 03d8ebe3f2c6..90c75bf183de 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDetails.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerDetails.java @@ -11,27 +11,29 @@ @Fluent public final class PartnerDetails { /* - * This is short description about the partner. The length of this - * description should not exceed 256 characters. + * This is short description about the partner. The length of this description should not exceed 256 characters. */ @JsonProperty(value = "description") private String description; /* - * Long description for the partner's scenarios and integration.Length of - * this description should not exceed 2048 characters. + * Long description for the partner's scenarios and integration.Length of this description should not exceed 2048 + * characters. */ @JsonProperty(value = "longDescription") private String longDescription; /* - * URI of the partner website that can be used by Azure customers to setup - * Event Grid + * URI of the partner website that can be used by Azure customers to setup Event Grid * integration on an event source. */ @JsonProperty(value = "setupUri") private String setupUri; + /** Creates an instance of PartnerDetails class. */ + public PartnerDetails() { + } + /** * Get the description property: This is short description about the partner. The length of this description should * not exceed 256 characters. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEndpointType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEndpointType.java new file mode 100644 index 000000000000..fc66914d09f2 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEndpointType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Type of the endpoint for the partner destination. */ +public final class PartnerEndpointType extends ExpandableStringEnum { + /** Static value WebHook for PartnerEndpointType. */ + public static final PartnerEndpointType WEB_HOOK = fromString("WebHook"); + + /** + * Creates a new instance of PartnerEndpointType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PartnerEndpointType() { + } + + /** + * Creates or finds a PartnerEndpointType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PartnerEndpointType. + */ + @JsonCreator + public static PartnerEndpointType fromString(String name) { + return fromString(name, PartnerEndpointType.class); + } + + /** + * Gets known PartnerEndpointType values. + * + * @return known PartnerEndpointType values. + */ + public static Collection values() { + return values(PartnerEndpointType.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEventSubscriptionDestination.java new file mode 100644 index 000000000000..5bfaab079f93 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerEventSubscriptionDestination.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.PartnerEventSubscriptionDestinationProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The PartnerEventSubscriptionDestination model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("PartnerDestination") +@Fluent +public final class PartnerEventSubscriptionDestination extends EventSubscriptionDestination { + /* + * Partner Destination Properties of the event subscription destination. + */ + @JsonProperty(value = "properties") + private PartnerEventSubscriptionDestinationProperties innerProperties; + + /** Creates an instance of PartnerEventSubscriptionDestination class. */ + public PartnerEventSubscriptionDestination() { + } + + /** + * Get the innerProperties property: Partner Destination Properties of the event subscription destination. + * + * @return the innerProperties value. + */ + private PartnerEventSubscriptionDestinationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the resourceId property: The Azure Resource Id that represents the endpoint of a Partner Destination of an + * event subscription. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.innerProperties() == null ? null : this.innerProperties().resourceId(); + } + + /** + * Set the resourceId property: The Azure Resource Id that represents the endpoint of a Partner Destination of an + * event subscription. + * + * @param resourceId the resourceId value to set. + * @return the PartnerEventSubscriptionDestination object itself. + */ + public PartnerEventSubscriptionDestination withResourceId(String resourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new PartnerEventSubscriptionDestinationProperties(); + } + this.innerProperties().withResourceId(resourceId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespace.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespace.java index 0d0609c285bd..9c8ea0626ebc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespace.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespace.java @@ -79,6 +79,14 @@ public interface PartnerNamespace { */ String partnerRegistrationFullyQualifiedId(); + /** + * Gets the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * partner namespace. + * + * @return the minimumTlsVersionAllowed value. + */ + TlsVersion minimumTlsVersionAllowed(); + /** * Gets the endpoint property: Endpoint for the partner namespace. * @@ -197,6 +205,7 @@ interface WithResourceGroup { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithPartnerRegistrationFullyQualifiedId, + DefinitionStages.WithMinimumTlsVersionAllowed, DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithInboundIpRules, DefinitionStages.WithDisableLocalAuth, @@ -240,19 +249,29 @@ interface WithPartnerRegistrationFullyQualifiedId { */ WithCreate withPartnerRegistrationFullyQualifiedId(String partnerRegistrationFullyQualifiedId); } + /** The stage of the PartnerNamespace definition allowing to specify minimumTlsVersionAllowed. */ + interface WithMinimumTlsVersionAllowed { + /** + * Specifies the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish + * to this partner namespace. + * + * @param minimumTlsVersionAllowed Minimum TLS version of the publisher allowed to publish to this partner + * namespace. + * @return the next definition stage. + */ + WithCreate withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed); + } /** The stage of the PartnerNamespace definition allowing to specify publicNetworkAccess. */ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: This determines if traffic is allowed over public network. By * default it is enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceProperties" - + ".InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceProperties.InboundIpRules" * />. * * @param publicNetworkAccess This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceProperties" - + ".InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceProperties.InboundIpRules" * />. * @return the next definition stage. */ @@ -313,6 +332,7 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithInboundIpRules, + UpdateStages.WithMinimumTlsVersionAllowed, UpdateStages.WithDisableLocalAuth { /** * Executes the update request. @@ -346,14 +366,12 @@ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: This determines if traffic is allowed over public network. By * default it is enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts" - + ".PartnerNamespaceUpdateParameterProperties.InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceUpdateParameterProperties.InboundIpRules" * />. * * @param publicNetworkAccess This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts" - + ".PartnerNamespaceUpdateParameterProperties.InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceUpdateParameterProperties.InboundIpRules" * />. * @return the next definition stage. */ @@ -371,6 +389,17 @@ interface WithInboundIpRules { */ Update withInboundIpRules(List inboundIpRules); } + /** The stage of the PartnerNamespace update allowing to specify minimumTlsVersionAllowed. */ + interface WithMinimumTlsVersionAllowed { + /** + * Specifies the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish + * to this domain. + * + * @param minimumTlsVersionAllowed Minimum TLS version of the publisher allowed to publish to this domain. + * @return the next definition stage. + */ + Update withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed); + } /** The stage of the PartnerNamespace update allowing to specify disableLocalAuth. */ interface WithDisableLocalAuth { /** @@ -402,16 +431,9 @@ interface WithDisableLocalAuth { PartnerNamespace refresh(Context context); /** - * List the two keys used to publish to a partner namespace. + * List keys for a partner namespace. * - * @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 shared access keys of the partner namespace. - */ - PartnerNamespaceSharedAccessKeys listSharedAccessKeys(); - - /** - * List the two keys used to publish to a partner namespace. + *

List the two keys used to publish to a partner namespace. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -422,18 +444,20 @@ interface WithDisableLocalAuth { Response listSharedAccessKeysWithResponse(Context context); /** - * Regenerate a shared access key for a partner namespace. + * List keys for a partner namespace. + * + *

List the two keys used to publish to a partner namespace. * - * @param regenerateKeyRequest Request body to regenerate key. - * @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 shared access keys of the partner namespace. */ - PartnerNamespaceSharedAccessKeys regenerateKey(PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest); + PartnerNamespaceSharedAccessKeys listSharedAccessKeys(); /** - * Regenerate a shared access key for a partner namespace. + * Regenerate key for a partner namespace. + * + *

Regenerate a shared access key for a partner namespace. * * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. @@ -444,4 +468,17 @@ interface WithDisableLocalAuth { */ Response regenerateKeyWithResponse( PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, Context context); + + /** + * Regenerate key for a partner namespace. + * + *

Regenerate a shared access key for a partner namespace. + * + * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the partner namespace. + */ + PartnerNamespaceSharedAccessKeys regenerateKey(PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceProvisioningState.java index 5e30f143ee9a..6fabc77bf4e8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PartnerNamespaceProvisioningState. */ +/** Provisioning state of the partner namespace. */ public final class PartnerNamespaceProvisioningState extends ExpandableStringEnum { /** Static value Creating for PartnerNamespaceProvisioningState. */ public static final PartnerNamespaceProvisioningState CREATING = fromString("Creating"); @@ -28,6 +28,15 @@ public final class PartnerNamespaceProvisioningState extends ExpandableStringEnu /** Static value Failed for PartnerNamespaceProvisioningState. */ public static final PartnerNamespaceProvisioningState FAILED = fromString("Failed"); + /** + * Creates a new instance of PartnerNamespaceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PartnerNamespaceProvisioningState() { + } + /** * Creates or finds a PartnerNamespaceProvisioningState from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceRegenerateKeyRequest.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceRegenerateKeyRequest.java index 26987da63678..4c4fc4cff01f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceRegenerateKeyRequest.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceRegenerateKeyRequest.java @@ -17,6 +17,10 @@ public final class PartnerNamespaceRegenerateKeyRequest { @JsonProperty(value = "keyName", required = true) private String keyName; + /** Creates an instance of PartnerNamespaceRegenerateKeyRequest class. */ + public PartnerNamespaceRegenerateKeyRequest() { + } + /** * Get the keyName property: Key name to regenerate (key1 or key2). * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceUpdateParameters.java index fbe06cce76fd..c4a829c32ff4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaceUpdateParameters.java @@ -27,6 +27,10 @@ public final class PartnerNamespaceUpdateParameters { @JsonProperty(value = "properties") private PartnerNamespaceUpdateParameterProperties innerProperties; + /** Creates an instance of PartnerNamespaceUpdateParameters class. */ + public PartnerNamespaceUpdateParameters() { + } + /** * Get the tags property: Tags of the Partner Namespace. * @@ -59,8 +63,7 @@ private PartnerNamespaceUpdateParameterProperties innerProperties() { /** * Get the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceUpdateParameterProperties" - + ".InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceUpdateParameterProperties.InboundIpRules" * />. * * @return the publicNetworkAccess value. @@ -72,8 +75,7 @@ public PublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceUpdateParameterProperties" - + ".InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PartnerNamespaceUpdateParameterProperties.InboundIpRules" * />. * * @param publicNetworkAccess the publicNetworkAccess value to set. @@ -112,6 +114,31 @@ public PartnerNamespaceUpdateParameters withInboundIpRules(List i return this; } + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.innerProperties() == null ? null : this.innerProperties().minimumTlsVersionAllowed(); + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the PartnerNamespaceUpdateParameters object itself. + */ + public PartnerNamespaceUpdateParameters withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + if (this.innerProperties() == null) { + this.innerProperties = new PartnerNamespaceUpdateParameterProperties(); + } + this.innerProperties().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + /** * Get the disableLocalAuth property: This boolean is used to enable or disable local auth. Default value is false. * When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaces.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaces.java index 5474468f8b12..7dc8dc3df7c3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaces.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespaces.java @@ -11,33 +11,39 @@ /** Resource collection API of PartnerNamespaces. */ public interface PartnerNamespaces { /** - * Get properties of a partner namespace. + * Get a partner namespace. + * + *

Get properties of a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. + * @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 properties of a partner namespace. + * @return properties of a partner namespace along with {@link Response}. */ - PartnerNamespace getByResourceGroup(String resourceGroupName, String partnerNamespaceName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerNamespaceName, Context context); /** - * Get properties of a partner namespace. + * Get a partner namespace. + * + *

Get properties of a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. - * @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 properties of a partner namespace along with {@link Response}. + * @return properties of a partner namespace. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String partnerNamespaceName, Context context); + PartnerNamespace getByResourceGroup(String resourceGroupName, String partnerNamespaceName); /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -48,7 +54,9 @@ Response getByResourceGroupWithResponse( void deleteByResourceGroup(String resourceGroupName, String partnerNamespaceName); /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. @@ -60,7 +68,9 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String partnerNamespaceName, Context context); /** - * List all the partner namespaces under an Azure subscription. + * List partner namespaces under an Azure subscription. + * + *

List all the partner namespaces under an Azure subscription. * * @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. @@ -69,7 +79,9 @@ Response getByResourceGroupWithResponse( PagedIterable list(); /** - * List all the partner namespaces under an Azure subscription. + * List partner namespaces under an Azure subscription. + * + *

List all the partner namespaces under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -88,7 +100,9 @@ Response getByResourceGroupWithResponse( PagedIterable list(String filter, Integer top, Context context); /** - * List all the partner namespaces under a resource group. + * List partner namespaces under a resource group. + * + *

List all the partner namespaces under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -99,7 +113,9 @@ Response getByResourceGroupWithResponse( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the partner namespaces under a resource group. + * List partner namespaces under a resource group. + * + *

List all the partner namespaces under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -120,67 +136,77 @@ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, Context context); /** - * List the two keys used to publish to a partner namespace. + * List keys for a partner namespace. + * + *

List the two keys used to publish to a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. + * @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 shared access keys of the partner namespace. + * @return shared access keys of the partner namespace along with {@link Response}. */ - PartnerNamespaceSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String partnerNamespaceName); + Response listSharedAccessKeysWithResponse( + String resourceGroupName, String partnerNamespaceName, Context context); /** - * List the two keys used to publish to a partner namespace. + * List keys for a partner namespace. + * + *

List the two keys used to publish to a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. - * @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 shared access keys of the partner namespace along with {@link Response}. + * @return shared access keys of the partner namespace. */ - Response listSharedAccessKeysWithResponse( - String resourceGroupName, String partnerNamespaceName, Context context); + PartnerNamespaceSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String partnerNamespaceName); /** - * Regenerate a shared access key for a partner namespace. + * Regenerate key for a partner namespace. + * + *

Regenerate a shared access key for a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. + * @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 shared access keys of the partner namespace. + * @return shared access keys of the partner namespace along with {@link Response}. */ - PartnerNamespaceSharedAccessKeys regenerateKey( + Response regenerateKeyWithResponse( String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest); + PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, + Context context); /** - * Regenerate a shared access key for a partner namespace. + * Regenerate key for a partner namespace. + * + *

Regenerate a shared access key for a partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerNamespaceName Name of the partner namespace. * @param regenerateKeyRequest Request body to regenerate key. - * @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 shared access keys of the partner namespace along with {@link Response}. + * @return shared access keys of the partner namespace. */ - Response regenerateKeyWithResponse( + PartnerNamespaceSharedAccessKeys regenerateKey( String resourceGroupName, String partnerNamespaceName, - PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest, - Context context); + PartnerNamespaceRegenerateKeyRequest regenerateKeyRequest); /** - * Get properties of a partner namespace. + * Get a partner namespace. + * + *

Get properties of a partner namespace. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -191,7 +217,9 @@ Response regenerateKeyWithResponse( PartnerNamespace getById(String id); /** - * Get properties of a partner namespace. + * Get a partner namespace. + * + *

Get properties of a partner namespace. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -203,7 +231,9 @@ Response regenerateKeyWithResponse( Response getByIdWithResponse(String id, Context context); /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -213,7 +243,9 @@ Response regenerateKeyWithResponse( void deleteById(String id); /** - * Delete existing partner namespace. + * Delete a partner namespace. + * + *

Delete existing partner namespace. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespacesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespacesListResult.java index e16560cab918..cd906731ea74 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespacesListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerNamespacesListResult.java @@ -24,6 +24,10 @@ public final class PartnerNamespacesListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of PartnerNamespacesListResult class. */ + public PartnerNamespacesListResult() { + } + /** * Get the value property: A collection of partner namespaces. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationProvisioningState.java index d50d185e7475..6fb2683eb4e7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PartnerRegistrationProvisioningState. */ +/** Provisioning state of the partner registration. */ public final class PartnerRegistrationProvisioningState extends ExpandableStringEnum { /** Static value Creating for PartnerRegistrationProvisioningState. */ @@ -29,6 +29,15 @@ public final class PartnerRegistrationProvisioningState /** Static value Failed for PartnerRegistrationProvisioningState. */ public static final PartnerRegistrationProvisioningState FAILED = fromString("Failed"); + /** + * Creates a new instance of PartnerRegistrationProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PartnerRegistrationProvisioningState() { + } + /** * Creates or finds a PartnerRegistrationProvisioningState from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationUpdateParameters.java index 2367423c25fb..013baae7252d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationUpdateParameters.java @@ -19,6 +19,10 @@ public final class PartnerRegistrationUpdateParameters { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of PartnerRegistrationUpdateParameters class. */ + public PartnerRegistrationUpdateParameters() { + } + /** * Get the tags property: Tags of the partner registration resource. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrations.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrations.java index b3deea489bdb..852ba04c6d7b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrations.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrations.java @@ -11,33 +11,39 @@ /** Resource collection API of PartnerRegistrations. */ public interface PartnerRegistrations { /** - * Gets a partner registration with the specified parameters. + * Get a partner registration. + * + *

Gets a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. + * @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 a partner registration with the specified parameters. + * @return a partner registration with the specified parameters along with {@link Response}. */ - PartnerRegistration getByResourceGroup(String resourceGroupName, String partnerRegistrationName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerRegistrationName, Context context); /** - * Gets a partner registration with the specified parameters. + * Get a partner registration. + * + *

Gets a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. - * @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 a partner registration with the specified parameters along with {@link Response}. + * @return a partner registration with the specified parameters. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String partnerRegistrationName, Context context); + PartnerRegistration getByResourceGroup(String resourceGroupName, String partnerRegistrationName); /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -48,7 +54,9 @@ Response getByResourceGroupWithResponse( void deleteByResourceGroup(String resourceGroupName, String partnerRegistrationName); /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerRegistrationName Name of the partner registration. @@ -60,7 +68,9 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String partnerRegistrationName, Context context); /** - * List all the partner registrations under an Azure subscription. + * List partner registrations under an Azure subscription. + * + *

List all the partner registrations under an Azure subscription. * * @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. @@ -69,7 +79,9 @@ Response getByResourceGroupWithResponse( PagedIterable list(); /** - * List all the partner registrations under an Azure subscription. + * List partner registrations under an Azure subscription. + * + *

List all the partner registrations under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -88,7 +100,9 @@ Response getByResourceGroupWithResponse( PagedIterable list(String filter, Integer top, Context context); /** - * List all the partner registrations under a resource group. + * List partner registrations under a resource group. + * + *

List all the partner registrations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -99,7 +113,9 @@ Response getByResourceGroupWithResponse( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the partner registrations under a resource group. + * List partner registrations under a resource group. + * + *

List all the partner registrations under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -120,7 +136,9 @@ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, Context context); /** - * Gets a partner registration with the specified parameters. + * Get a partner registration. + * + *

Gets a partner registration with the specified parameters. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +149,9 @@ PagedIterable listByResourceGroup( PartnerRegistration getById(String id); /** - * Gets a partner registration with the specified parameters. + * Get a partner registration. + * + *

Gets a partner registration with the specified parameters. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -143,7 +163,9 @@ PagedIterable listByResourceGroup( Response getByIdWithResponse(String id, Context context); /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,7 +175,9 @@ PagedIterable listByResourceGroup( void deleteById(String id); /** - * Deletes a partner registration with the specified parameters. + * Delete a partner registration. + * + *

Deletes a partner registration with the specified parameters. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationsListResult.java index 60b48e4d449d..0903a9ffb0a4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerRegistrationsListResult.java @@ -24,6 +24,10 @@ public final class PartnerRegistrationsListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of PartnerRegistrationsListResult class. */ + public PartnerRegistrationsListResult() { + } + /** * Get the value property: A collection of partner registrations. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopic.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopic.java index 123f8050f687..12fe14b97638 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopic.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopic.java @@ -387,16 +387,9 @@ interface WithIdentity { PartnerTopic refresh(Context context); /** - * Activate a newly created partner topic. + * Activate a partner topic. * - * @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 event Grid Partner Topic. - */ - PartnerTopic activate(); - - /** - * Activate a newly created partner topic. + *

Activate a newly created partner topic. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -407,16 +400,20 @@ interface WithIdentity { Response activateWithResponse(Context context); /** - * Deactivate specific partner topic. + * Activate a partner topic. + * + *

Activate a newly created partner topic. * * @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 event Grid Partner Topic. */ - PartnerTopic deactivate(); + PartnerTopic activate(); /** - * Deactivate specific partner topic. + * Deactivate a partner topic. + * + *

Deactivate specific partner topic. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -425,4 +422,15 @@ interface WithIdentity { * @return event Grid Partner Topic along with {@link Response}. */ Response deactivateWithResponse(Context context); + + /** + * Deactivate a partner topic. + * + *

Deactivate specific partner topic. + * + * @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 event Grid Partner Topic. + */ + PartnerTopic deactivate(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicActivationState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicActivationState.java index 5fee0d0f59a2..9642ddabd965 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicActivationState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicActivationState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PartnerTopicActivationState. */ +/** Activation state of the partner topic. */ public final class PartnerTopicActivationState extends ExpandableStringEnum { /** Static value NeverActivated for PartnerTopicActivationState. */ public static final PartnerTopicActivationState NEVER_ACTIVATED = fromString("NeverActivated"); @@ -19,6 +19,15 @@ public final class PartnerTopicActivationState extends ExpandableStringEnumGet properties of an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. + * @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 properties of an event subscription of a partner topic. + * @return properties of an event subscription of a partner topic along with {@link Response}. */ - EventSubscription get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); + Response getWithResponse( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** - * Get properties of an event subscription of a partner topic. + * Get an event subscription of a partner topic. + * + *

Get properties of an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. - * @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 properties of an event subscription of a partner topic along with {@link Response}. + * @return properties of an event subscription of a partner topic. */ - Response getWithResponse( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); + EventSubscription get(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -62,7 +68,9 @@ EventSubscription createOrUpdate( EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. + * Create or update an event subscription of a partner topic. + * + *

Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. * Existing event subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -84,7 +92,9 @@ EventSubscription createOrUpdate( Context context); /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -97,7 +107,9 @@ EventSubscription createOrUpdate( void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName); /** - * Delete an existing event subscription of a partner topic. + * Delete an event subscription of a partner topic. + * + *

Delete an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -111,7 +123,9 @@ EventSubscription createOrUpdate( void delete(String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -130,7 +144,9 @@ EventSubscription update( EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription of a partner topic. + * Update event subscription of a partner topic. + * + *

Update an existing event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -151,38 +167,44 @@ EventSubscription update( Context context); /** - * Get the full endpoint URL for an event subscription of a partner topic. + * Get full URL of an event subscription of a partner topic. + * + *

Get the full endpoint URL for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 the full endpoint URL for an event subscription of a partner topic. + * @return the full endpoint URL for an event subscription of a partner topic along with {@link Response}. */ - EventSubscriptionFullUrl getFullUrl( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName); + Response getFullUrlWithResponse( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for an event subscription of a partner topic. + * Get full URL of an event subscription of a partner topic. + * + *

Get the full endpoint URL for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 the full endpoint URL for an event subscription of a partner topic along with {@link Response}. + * @return the full endpoint URL for an event subscription of a partner topic. */ - Response getFullUrlWithResponse( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); + EventSubscriptionFullUrl getFullUrl( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName); /** - * List event subscriptions that belong to a specific partner topic. + * List event subscriptions of a partner topic. + * + *

List event subscriptions that belong to a specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -194,7 +216,9 @@ Response getFullUrlWithResponse( PagedIterable listByPartnerTopic(String resourceGroupName, String partnerTopicName); /** - * List event subscriptions that belong to a specific partner topic. + * List event subscriptions of a partner topic. + * + *

List event subscriptions that belong to a specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -216,33 +240,37 @@ PagedIterable listByPartnerTopic( String resourceGroupName, String partnerTopicName, String filter, Integer top, Context context); /** - * Get all delivery attributes for an event subscription of a partner topic. + * Get delivery attributes for an event subscription of a partner topic. + * + *

Get all delivery attributes for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 all delivery attributes for an event subscription of a partner topic. + * @return all delivery attributes for an event subscription of a partner topic along with {@link Response}. */ - DeliveryAttributeListResult getDeliveryAttributes( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName); + Response getDeliveryAttributesWithResponse( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); /** - * Get all delivery attributes for an event subscription of a partner topic. + * Get delivery attributes for an event subscription of a partner topic. + * + *

Get all delivery attributes for an event subscription of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 all delivery attributes for an event subscription of a partner topic along with {@link Response}. + * @return all delivery attributes for an event subscription of a partner topic. */ - Response getDeliveryAttributesWithResponse( - String resourceGroupName, String partnerTopicName, String eventSubscriptionName, Context context); + DeliveryAttributeListResult getDeliveryAttributes( + String resourceGroupName, String partnerTopicName, String eventSubscriptionName); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicInfo.java index d95098b175c4..593463a171f0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicInfo.java @@ -11,16 +11,14 @@ @Fluent public final class PartnerTopicInfo { /* - * Azure subscription ID of the subscriber. The partner topic associated - * with the channel will be + * Azure subscription ID of the subscriber. The partner topic associated with the channel will be * created under this Azure subscription. */ @JsonProperty(value = "azureSubscriptionId") private String azureSubscriptionId; /* - * Azure Resource Group of the subscriber. The partner topic associated - * with the channel will be + * Azure Resource Group of the subscriber. The partner topic associated with the channel will be * created under this resource group. */ @JsonProperty(value = "resourceGroupName") @@ -33,23 +31,25 @@ public final class PartnerTopicInfo { private String name; /* - * Event Type Information for the partner topic. This information is - * provided by the publisher and can be used by the + * Event Type Information for the partner topic. This information is provided by the publisher and can be used by + * the * subscriber to view different types of events that are published. */ @JsonProperty(value = "eventTypeInfo") private EventTypeInfo eventTypeInfo; /* - * The source information is provided by the publisher to determine the - * scope or context from which the events - * are originating. This information can be used by the subscriber during - * the approval process of the + * The source information is provided by the publisher to determine the scope or context from which the events + * are originating. This information can be used by the subscriber during the approval process of the * created partner topic. */ @JsonProperty(value = "source") private String source; + /** Creates an instance of PartnerTopicInfo class. */ + public PartnerTopicInfo() { + } + /** * Get the azureSubscriptionId property: Azure subscription ID of the subscriber. The partner topic associated with * the channel will be created under this Azure subscription. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicProvisioningState.java index 3e5a8719d4ab..92855de5499a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PartnerTopicProvisioningState. */ +/** Provisioning state of the partner topic. */ public final class PartnerTopicProvisioningState extends ExpandableStringEnum { /** Static value Creating for PartnerTopicProvisioningState. */ public static final PartnerTopicProvisioningState CREATING = fromString("Creating"); @@ -32,6 +32,15 @@ public final class PartnerTopicProvisioningState extends ExpandableStringEnum { /** Static value SourceEventAttribute for PartnerTopicRoutingMode. */ public static final PartnerTopicRoutingMode SOURCE_EVENT_ATTRIBUTE = fromString("SourceEventAttribute"); @@ -16,6 +20,15 @@ public final class PartnerTopicRoutingMode extends ExpandableStringEnumGet properties of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. + * @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 properties of a partner topic. + * @return properties of a partner topic along with {@link Response}. */ - PartnerTopic getByResourceGroup(String resourceGroupName, String partnerTopicName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String partnerTopicName, Context context); /** - * Get properties of a partner topic. + * Get a partner topic. + * + *

Get properties of a partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. - * @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 properties of a partner topic along with {@link Response}. + * @return properties of a partner topic. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String partnerTopicName, Context context); + PartnerTopic getByResourceGroup(String resourceGroupName, String partnerTopicName); /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -48,7 +54,9 @@ Response getByResourceGroupWithResponse( void deleteByResourceGroup(String resourceGroupName, String partnerTopicName); /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. @@ -60,7 +68,9 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String partnerTopicName, Context context); /** - * List all the partner topics under an Azure subscription. + * List partner topics under an Azure subscription. + * + *

List all the partner topics under an Azure subscription. * * @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. @@ -69,7 +79,9 @@ Response getByResourceGroupWithResponse( PagedIterable list(); /** - * List all the partner topics under an Azure subscription. + * List partner topics under an Azure subscription. + * + *

List all the partner topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -88,7 +100,9 @@ Response getByResourceGroupWithResponse( PagedIterable list(String filter, Integer top, Context context); /** - * List all the partner topics under a resource group. + * List partner topics under a resource group. + * + *

List all the partner topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -99,7 +113,9 @@ Response getByResourceGroupWithResponse( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the partner topics under a resource group. + * List partner topics under a resource group. + * + *

List all the partner topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -120,57 +136,67 @@ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, Context context); /** - * Activate a newly created partner topic. + * Activate a partner topic. + * + *

Activate a newly created partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. + * @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 event Grid Partner Topic. + * @return event Grid Partner Topic along with {@link Response}. */ - PartnerTopic activate(String resourceGroupName, String partnerTopicName); + Response activateWithResponse(String resourceGroupName, String partnerTopicName, Context context); /** - * Activate a newly created partner topic. + * Activate a partner topic. + * + *

Activate a newly created partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. - * @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 event Grid Partner Topic along with {@link Response}. + * @return event Grid Partner Topic. */ - Response activateWithResponse(String resourceGroupName, String partnerTopicName, Context context); + PartnerTopic activate(String resourceGroupName, String partnerTopicName); /** - * Deactivate specific partner topic. + * Deactivate a partner topic. + * + *

Deactivate specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. + * @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 event Grid Partner Topic. + * @return event Grid Partner Topic along with {@link Response}. */ - PartnerTopic deactivate(String resourceGroupName, String partnerTopicName); + Response deactivateWithResponse(String resourceGroupName, String partnerTopicName, Context context); /** - * Deactivate specific partner topic. + * Deactivate a partner topic. + * + *

Deactivate specific partner topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param partnerTopicName Name of the partner topic. - * @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 event Grid Partner Topic along with {@link Response}. + * @return event Grid Partner Topic. */ - Response deactivateWithResponse(String resourceGroupName, String partnerTopicName, Context context); + PartnerTopic deactivate(String resourceGroupName, String partnerTopicName); /** - * Get properties of a partner topic. + * Get a partner topic. + * + *

Get properties of a partner topic. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,7 +207,9 @@ PagedIterable listByResourceGroup( PartnerTopic getById(String id); /** - * Get properties of a partner topic. + * Get a partner topic. + * + *

Get properties of a partner topic. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -193,7 +221,9 @@ PagedIterable listByResourceGroup( Response getByIdWithResponse(String id, Context context); /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -203,7 +233,9 @@ PagedIterable listByResourceGroup( void deleteById(String id); /** - * Delete existing partner topic. + * Delete a partner topic. + * + *

Delete existing partner topic. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicsListResult.java index 95c3bc4c7657..faec1aa2b4f0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerTopicsListResult.java @@ -24,6 +24,10 @@ public final class PartnerTopicsListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of PartnerTopicsListResult class. */ + public PartnerTopicsListResult() { + } + /** * Get the value property: A collection of partner topics. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateDestinationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateDestinationInfo.java new file mode 100644 index 000000000000..db2727044337 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateDestinationInfo.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Properties of the corresponding partner destination of a Channel. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "endpointType", + defaultImpl = PartnerUpdateDestinationInfo.class) +@JsonTypeName("PartnerUpdateDestinationInfo") +@JsonSubTypes({@JsonSubTypes.Type(name = "WebHook", value = WebhookUpdatePartnerDestinationInfo.class)}) +@Immutable +public class PartnerUpdateDestinationInfo { + /** Creates an instance of PartnerUpdateDestinationInfo class. */ + public PartnerUpdateDestinationInfo() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateTopicInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateTopicInfo.java index e252485b2b75..551e75910a33 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateTopicInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PartnerUpdateTopicInfo.java @@ -16,6 +16,10 @@ public final class PartnerUpdateTopicInfo { @JsonProperty(value = "eventTypeInfo") private EventTypeInfo eventTypeInfo; + /** Creates an instance of PartnerUpdateTopicInfo class. */ + public PartnerUpdateTopicInfo() { + } + /** * Get the eventTypeInfo property: Event type info for the partner topic. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBinding.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBinding.java new file mode 100644 index 000000000000..5d1d3bdcbd40 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBinding.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner; + +/** An immutable client-side representation of PermissionBinding. */ +public interface PermissionBinding { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: The system metadata relating to the PermissionBinding resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the description property: Description for the Permission Binding resource. + * + * @return the description value. + */ + String description(); + + /** + * Gets the topicSpaceName property: The name of the Topic Space resource that the permission is bound to. The Topic + * space needs to be a resource under the same namespace the permission binding is a part of. + * + * @return the topicSpaceName value. + */ + String topicSpaceName(); + + /** + * Gets the permission property: The allowed permission. + * + * @return the permission value. + */ + PermissionType permission(); + + /** + * Gets the clientGroupName property: The name of the client group resource that the permission is bound to. The + * client group needs to be a resource under the same namespace the permission binding is a part of. + * + * @return the clientGroupName value. + */ + String clientGroupName(); + + /** + * Gets the provisioningState property: Provisioning state of the PermissionBinding resource. + * + * @return the provisioningState value. + */ + PermissionBindingProvisioningState provisioningState(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner object. + * + * @return the inner object. + */ + PermissionBindingInner innerModel(); + + /** The entirety of the PermissionBinding definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The PermissionBinding definition stages. */ + interface DefinitionStages { + /** The first stage of the PermissionBinding definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the PermissionBinding definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, namespaceName. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @return the next definition stage. + */ + WithCreate withExistingNamespace(String resourceGroupName, String namespaceName); + } + /** + * The stage of the PermissionBinding definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithDescription, + DefinitionStages.WithTopicSpaceName, + DefinitionStages.WithPermission, + DefinitionStages.WithClientGroupName { + /** + * Executes the create request. + * + * @return the created resource. + */ + PermissionBinding create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PermissionBinding create(Context context); + } + /** The stage of the PermissionBinding definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: Description for the Permission Binding resource.. + * + * @param description Description for the Permission Binding resource. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the PermissionBinding definition allowing to specify topicSpaceName. */ + interface WithTopicSpaceName { + /** + * Specifies the topicSpaceName property: The name of the Topic Space resource that the permission is bound + * to. The Topic space needs to be a resource under the same namespace the permission binding is a part of.. + * + * @param topicSpaceName The name of the Topic Space resource that the permission is bound to. The Topic + * space needs to be a resource under the same namespace the permission binding is a part of. + * @return the next definition stage. + */ + WithCreate withTopicSpaceName(String topicSpaceName); + } + /** The stage of the PermissionBinding definition allowing to specify permission. */ + interface WithPermission { + /** + * Specifies the permission property: The allowed permission.. + * + * @param permission The allowed permission. + * @return the next definition stage. + */ + WithCreate withPermission(PermissionType permission); + } + /** The stage of the PermissionBinding definition allowing to specify clientGroupName. */ + interface WithClientGroupName { + /** + * Specifies the clientGroupName property: The name of the client group resource that the permission is + * bound to. The client group needs to be a resource under the same namespace the permission binding is a + * part of.. + * + * @param clientGroupName The name of the client group resource that the permission is bound to. The client + * group needs to be a resource under the same namespace the permission binding is a part of. + * @return the next definition stage. + */ + WithCreate withClientGroupName(String clientGroupName); + } + } + /** + * Begins update for the PermissionBinding resource. + * + * @return the stage of resource update. + */ + PermissionBinding.Update update(); + + /** The template for PermissionBinding update. */ + interface Update + extends UpdateStages.WithDescription, + UpdateStages.WithTopicSpaceName, + UpdateStages.WithPermission, + UpdateStages.WithClientGroupName { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PermissionBinding apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PermissionBinding apply(Context context); + } + /** The PermissionBinding update stages. */ + interface UpdateStages { + /** The stage of the PermissionBinding update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: Description for the Permission Binding resource.. + * + * @param description Description for the Permission Binding resource. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the PermissionBinding update allowing to specify topicSpaceName. */ + interface WithTopicSpaceName { + /** + * Specifies the topicSpaceName property: The name of the Topic Space resource that the permission is bound + * to. The Topic space needs to be a resource under the same namespace the permission binding is a part of.. + * + * @param topicSpaceName The name of the Topic Space resource that the permission is bound to. The Topic + * space needs to be a resource under the same namespace the permission binding is a part of. + * @return the next definition stage. + */ + Update withTopicSpaceName(String topicSpaceName); + } + /** The stage of the PermissionBinding update allowing to specify permission. */ + interface WithPermission { + /** + * Specifies the permission property: The allowed permission.. + * + * @param permission The allowed permission. + * @return the next definition stage. + */ + Update withPermission(PermissionType permission); + } + /** The stage of the PermissionBinding update allowing to specify clientGroupName. */ + interface WithClientGroupName { + /** + * Specifies the clientGroupName property: The name of the client group resource that the permission is + * bound to. The client group needs to be a resource under the same namespace the permission binding is a + * part of.. + * + * @param clientGroupName The name of the client group resource that the permission is bound to. The client + * group needs to be a resource under the same namespace the permission binding is a part of. + * @return the next definition stage. + */ + Update withClientGroupName(String clientGroupName); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PermissionBinding refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PermissionBinding refresh(Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingProvisioningState.java new file mode 100644 index 000000000000..95f10a3f1adb --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingProvisioningState.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the PermissionBinding resource. */ +public final class PermissionBindingProvisioningState extends ExpandableStringEnum { + /** Static value Creating for PermissionBindingProvisioningState. */ + public static final PermissionBindingProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for PermissionBindingProvisioningState. */ + public static final PermissionBindingProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for PermissionBindingProvisioningState. */ + public static final PermissionBindingProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for PermissionBindingProvisioningState. */ + public static final PermissionBindingProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for PermissionBindingProvisioningState. */ + public static final PermissionBindingProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for PermissionBindingProvisioningState. */ + public static final PermissionBindingProvisioningState FAILED = fromString("Failed"); + + /** Static value Deleted for PermissionBindingProvisioningState. */ + public static final PermissionBindingProvisioningState DELETED = fromString("Deleted"); + + /** + * Creates a new instance of PermissionBindingProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PermissionBindingProvisioningState() { + } + + /** + * Creates or finds a PermissionBindingProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PermissionBindingProvisioningState. + */ + @JsonCreator + public static PermissionBindingProvisioningState fromString(String name) { + return fromString(name, PermissionBindingProvisioningState.class); + } + + /** + * Gets known PermissionBindingProvisioningState values. + * + * @return known PermissionBindingProvisioningState values. + */ + public static Collection values() { + return values(PermissionBindingProvisioningState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindings.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindings.java new file mode 100644 index 000000000000..4ef53d57b12a --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindings.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of PermissionBindings. */ +public interface PermissionBindings { + /** + * Get a permission binding. + * + *

Get properties of a permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 properties of a permission binding along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String namespaceName, String permissionBindingName, Context context); + + /** + * Get a permission binding. + * + *

Get properties of a permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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 properties of a permission binding. + */ + PermissionBinding get(String resourceGroupName, String namespaceName, String permissionBindingName); + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String permissionBindingName); + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param permissionBindingName Name of the permission binding. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String permissionBindingName, Context context); + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List all permission bindings under a namespace. + * + *

Get all the permission bindings under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the permission bindings under a namespace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); + + /** + * Get a permission binding. + * + *

Get properties of a permission binding. + * + * @param id the resource ID. + * @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 properties of a permission binding along with {@link Response}. + */ + PermissionBinding getById(String id); + + /** + * Get a permission binding. + * + *

Get properties of a permission binding. + * + * @param id the resource ID. + * @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 properties of a permission binding along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete a permission binding. + * + *

Delete an existing permission binding. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PermissionBinding resource. + * + * @param name resource name. + * @return the first stage of the new PermissionBinding definition. + */ + PermissionBinding.DefinitionStages.Blank define(String name); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingsListResult.java new file mode 100644 index 000000000000..04423cbea9a5 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionBindingsListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.PermissionBindingInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Result of the List Permission Binding operation. */ +@Fluent +public final class PermissionBindingsListResult { + /* + * A collection of Permission Binding. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link for the next page of Permission Binding. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of PermissionBindingsListResult class. */ + public PermissionBindingsListResult() { + } + + /** + * Get the value property: A collection of Permission Binding. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of Permission Binding. + * + * @param value the value value to set. + * @return the PermissionBindingsListResult object itself. + */ + public PermissionBindingsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link for the next page of Permission Binding. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link for the next page of Permission Binding. + * + * @param nextLink the nextLink value to set. + * @return the PermissionBindingsListResult object itself. + */ + public PermissionBindingsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionType.java new file mode 100644 index 000000000000..d57291c82722 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PermissionType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The allowed permission. */ +public final class PermissionType extends ExpandableStringEnum { + /** Static value Publisher for PermissionType. */ + public static final PermissionType PUBLISHER = fromString("Publisher"); + + /** Static value Subscriber for PermissionType. */ + public static final PermissionType SUBSCRIBER = fromString("Subscriber"); + + /** + * Creates a new instance of PermissionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PermissionType() { + } + + /** + * Creates or finds a PermissionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PermissionType. + */ + @JsonCreator + public static PermissionType fromString(String name) { + return fromString(name, PermissionType.class); + } + + /** + * Gets known PermissionType values. + * + * @return known PermissionType values. + */ + public static Collection values() { + return values(PermissionType.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PersistedConnectionStatus.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PersistedConnectionStatus.java index d0ac0f674af1..090a3fd21270 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PersistedConnectionStatus.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PersistedConnectionStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PersistedConnectionStatus. */ +/** Status of the connection. */ public final class PersistedConnectionStatus extends ExpandableStringEnum { /** Static value Pending for PersistedConnectionStatus. */ public static final PersistedConnectionStatus PENDING = fromString("Pending"); @@ -22,6 +22,15 @@ public final class PersistedConnectionStatus extends ExpandableStringEnumGet a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. + * @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 a specific private endpoint connection under a topic, domain, or partner namespace. + * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace along + * with {@link Response}. */ - PrivateEndpointConnection get( + Response getWithResponse( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, - String privateEndpointConnectionName); + String privateEndpointConnectionName, + Context context); /** - * Get a specific private endpoint connection under a topic, domain, or partner namespace. + * Get a specific private endpoint connection. + * + *

Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. - * @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 a specific private endpoint connection under a topic, domain, or partner namespace along with {@link - * Response}. + * @return a specific private endpoint connection under a topic, domain, or partner namespace or namespace. */ - Response getWithResponse( + PrivateEndpointConnection get( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName, - String privateEndpointConnectionName, - Context context); + String privateEndpointConnectionName); /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,13 +83,15 @@ PrivateEndpointConnection update( PrivateEndpointConnectionInner privateEndpointConnection); /** - * Update a specific private endpoint connection under a topic, domain or partner namespace. + * Update a specific private endpoint connection. + * + *

Update a specific private endpoint connection under a topic, domain or partner namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param privateEndpointConnection The private endpoint connection object to update. * @param context The context to associate with this operation. @@ -101,13 +109,15 @@ PrivateEndpointConnection update( Context context); /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -120,13 +130,15 @@ void delete( String privateEndpointConnectionName); /** - * Delete a specific private endpoint connection under a topic, domain, or partner namespace. + * Delete a specific private endpoint connection. + * + *

Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -141,30 +153,34 @@ void delete( Context context); /** - * Get all private endpoint connections under a topic, domain, or partner namespace. + * Lists all private endpoint connections under a resource. + * + *

Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @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 all private endpoint connections under a topic, domain, or partner namespace as paginated response with - * {@link PagedIterable}. + * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated + * response with {@link PagedIterable}. */ PagedIterable listByResource( String resourceGroupName, PrivateEndpointConnectionsParentType parentType, String parentName); /** - * Get all private endpoint connections under a topic, domain, or partner namespace. + * Lists all private endpoint connections under a resource. + * + *

Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace name or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). @@ -177,8 +193,8 @@ PagedIterable listByResource( * @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 all private endpoint connections under a topic, domain, or partner namespace as paginated response with - * {@link PagedIterable}. + * @return all private endpoint connections under a topic, domain, or partner namespace or namespace as paginated + * response with {@link PagedIterable}. */ PagedIterable listByResource( String resourceGroupName, diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionsParentType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionsParentType.java index c6ae6fd4ebce..85f0d780a1b9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionsParentType.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateEndpointConnectionsParentType.java @@ -20,6 +20,18 @@ public final class PrivateEndpointConnectionsParentType /** Static value partnerNamespaces for PrivateEndpointConnectionsParentType. */ public static final PrivateEndpointConnectionsParentType PARTNER_NAMESPACES = fromString("partnerNamespaces"); + /** Static value namespaces for PrivateEndpointConnectionsParentType. */ + public static final PrivateEndpointConnectionsParentType NAMESPACES = fromString("namespaces"); + + /** + * Creates a new instance of PrivateEndpointConnectionsParentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointConnectionsParentType() { + } + /** * Creates or finds a PrivateEndpointConnectionsParentType from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResources.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResources.java index d2ef3c9c693a..58d1fab8ba46 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResources.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResources.java @@ -11,52 +11,60 @@ /** Resource collection API of PrivateLinkResources. */ public interface PrivateLinkResources { /** - * Get properties of a private link resource. + * Get a private link resource. + * + *

Get properties of a private link resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). - * @param privateLinkResourceName The name of private link resource. + * namespace name or namespace name). + * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace + * or namespace. + * @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 properties of a private link resource. + * @return properties of a private link resource along with {@link Response}. */ - PrivateLinkResource get( - String resourceGroupName, String parentType, String parentName, String privateLinkResourceName); + Response getWithResponse( + String resourceGroupName, + String parentType, + String parentName, + String privateLinkResourceName, + Context context); /** - * Get properties of a private link resource. + * Get a private link resource. + * + *

Get properties of a private link resource. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). - * @param privateLinkResourceName The name of private link resource. - * @param context The context to associate with this operation. + * namespace name or namespace name). + * @param privateLinkResourceName The name of private link resource will be either topic, domain, partnerNamespace + * or namespace. * @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 properties of a private link resource along with {@link Response}. + * @return properties of a private link resource. */ - Response getWithResponse( - String resourceGroupName, - String parentType, - String parentName, - String privateLinkResourceName, - Context context); + PrivateLinkResource get( + String resourceGroupName, String parentType, String parentName, String privateLinkResourceName); /** - * List all the private link resources under a topic, domain, or partner namespace. + * List private link resources under specific topic, domain, or partner namespace or namespace. + * + *

List all the private link resources under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace or namespace name). * @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. @@ -65,13 +73,15 @@ Response getWithResponse( PagedIterable listByResource(String resourceGroupName, String parentType, String parentName); /** - * List all the private link resources under a topic, domain, or partner namespace. + * List private link resources under specific topic, domain, or partner namespace or namespace. + * + *

List all the private link resources under a topic, domain, or partner namespace or namespace. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. + * \'partnerNamespaces\' or \'namespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or partner - * namespace name). + * namespace or namespace name). * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResourcesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResourcesListResult.java index 62e72259114a..78a1a8b3df44 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResourcesListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PrivateLinkResourcesListResult.java @@ -24,6 +24,10 @@ public final class PrivateLinkResourcesListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of PrivateLinkResourcesListResult class. */ + public PrivateLinkResourcesListResult() { + } + /** * Get the value property: A collection of private link resources. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublicNetworkAccess.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublicNetworkAccess.java index f788007a0403..63e4664de323 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublicNetworkAccess.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/PublicNetworkAccess.java @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PublicNetworkAccess. */ +/** + * This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to + * specific IPs by configuring <seealso + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.DomainProperties.InboundIpRules" />. + */ public final class PublicNetworkAccess extends ExpandableStringEnum { /** Static value Enabled for PublicNetworkAccess. */ public static final PublicNetworkAccess ENABLED = fromString("Enabled"); @@ -16,6 +20,15 @@ public final class PublicNetworkAccess extends ExpandableStringEnum { + /** Static value Custom for PublisherType. */ + public static final PublisherType CUSTOM = fromString("Custom"); + + /** + * Creates a new instance of PublisherType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PublisherType() { + } + + /** + * Creates or finds a PublisherType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublisherType. + */ + @JsonCreator + public static PublisherType fromString(String name) { + return fromString(name, PublisherType.class); + } + + /** + * Gets known PublisherType values. + * + * @return known PublisherType values. + */ + public static Collection values() { + return values(PublisherType.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/QueueInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/QueueInfo.java new file mode 100644 index 000000000000..5d238333eb66 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/QueueInfo.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** Properties of the Queue info for event subscription. */ +@Fluent +public final class QueueInfo { + /* + * Maximum period in seconds in which once the message is in received (by the client) state and waiting to be + * accepted, released or rejected. + * If this time elapsed after a message has been received by the client and not transitioned into accepted (not + * processed), released or rejected, + * the message is available for redelivery. This is an optional field, where default is 60 seconds, minimum is 60 + * seconds and maximum is 300 seconds. + */ + @JsonProperty(value = "receiveLockDurationInSeconds") + private Integer receiveLockDurationInSeconds; + + /* + * The maximum delivery count of the events. + */ + @JsonProperty(value = "maxDeliveryCount") + private Integer maxDeliveryCount; + + /* + * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is + * sent to the dead letter destination. + * Uses the managed identity setup on the parent resource (namely, topic) to acquire the authentication tokens + * being used during delivery / dead-lettering. + */ + @JsonProperty(value = "deadLetterDestinationWithResourceIdentity") + private DeadLetterWithResourceIdentity deadLetterDestinationWithResourceIdentity; + + /* + * Time span duration in ISO 8601 format that determines how long messages are available to the subscription from + * the time the message was published. + * This duration value is expressed using the following format: \'P(n)Y(n)M(n)DT(n)H(n)M(n)S\', where: + * - (n) is replaced by the value of each time element that follows the (n). + * - P is the duration (or Period) designator and is always placed at the beginning of the duration. + * - Y is the year designator, and it follows the value for the number of years. + * - M is the month designator, and it follows the value for the number of months. + * - W is the week designator, and it follows the value for the number of weeks. + * - D is the day designator, and it follows the value for the number of days. + * - T is the time designator, and it precedes the time components. + * - H is the hour designator, and it follows the value for the number of hours. + * - M is the minute designator, and it follows the value for the number of minutes. + * - S is the second designator, and it follows the value for the number of seconds. + * This duration value cannot be set greater than the topic’s EventRetentionInDays. It is is an optional field + * where its minimum value is 1 minute, and its maximum is determined + * by topic’s EventRetentionInDays value. The followings are examples of valid values: + * - \'P0DT23H12M\' or \'PT23H12M\': for duration of 23 hours and 12 minutes. + * - \'P1D\' or \'P1DT0H0M0S\': for duration of 1 day. + */ + @JsonProperty(value = "eventTimeToLive") + private Duration eventTimeToLive; + + /** Creates an instance of QueueInfo class. */ + public QueueInfo() { + } + + /** + * Get the receiveLockDurationInSeconds property: Maximum period in seconds in which once the message is in received + * (by the client) state and waiting to be accepted, released or rejected. If this time elapsed after a message has + * been received by the client and not transitioned into accepted (not processed), released or rejected, the message + * is available for redelivery. This is an optional field, where default is 60 seconds, minimum is 60 seconds and + * maximum is 300 seconds. + * + * @return the receiveLockDurationInSeconds value. + */ + public Integer receiveLockDurationInSeconds() { + return this.receiveLockDurationInSeconds; + } + + /** + * Set the receiveLockDurationInSeconds property: Maximum period in seconds in which once the message is in received + * (by the client) state and waiting to be accepted, released or rejected. If this time elapsed after a message has + * been received by the client and not transitioned into accepted (not processed), released or rejected, the message + * is available for redelivery. This is an optional field, where default is 60 seconds, minimum is 60 seconds and + * maximum is 300 seconds. + * + * @param receiveLockDurationInSeconds the receiveLockDurationInSeconds value to set. + * @return the QueueInfo object itself. + */ + public QueueInfo withReceiveLockDurationInSeconds(Integer receiveLockDurationInSeconds) { + this.receiveLockDurationInSeconds = receiveLockDurationInSeconds; + return this; + } + + /** + * Get the maxDeliveryCount property: The maximum delivery count of the events. + * + * @return the maxDeliveryCount value. + */ + public Integer maxDeliveryCount() { + return this.maxDeliveryCount; + } + + /** + * Set the maxDeliveryCount property: The maximum delivery count of the events. + * + * @param maxDeliveryCount the maxDeliveryCount value to set. + * @return the QueueInfo object itself. + */ + public QueueInfo withMaxDeliveryCount(Integer maxDeliveryCount) { + this.maxDeliveryCount = maxDeliveryCount; + return this; + } + + /** + * Get the deadLetterDestinationWithResourceIdentity property: The dead letter destination of the event + * subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. Uses + * the managed identity setup on the parent resource (namely, topic) to acquire the authentication tokens being used + * during delivery / dead-lettering. + * + * @return the deadLetterDestinationWithResourceIdentity value. + */ + public DeadLetterWithResourceIdentity deadLetterDestinationWithResourceIdentity() { + return this.deadLetterDestinationWithResourceIdentity; + } + + /** + * Set the deadLetterDestinationWithResourceIdentity property: The dead letter destination of the event + * subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. Uses + * the managed identity setup on the parent resource (namely, topic) to acquire the authentication tokens being used + * during delivery / dead-lettering. + * + * @param deadLetterDestinationWithResourceIdentity the deadLetterDestinationWithResourceIdentity value to set. + * @return the QueueInfo object itself. + */ + public QueueInfo withDeadLetterDestinationWithResourceIdentity( + DeadLetterWithResourceIdentity deadLetterDestinationWithResourceIdentity) { + this.deadLetterDestinationWithResourceIdentity = deadLetterDestinationWithResourceIdentity; + return this; + } + + /** + * Get the eventTimeToLive property: Time span duration in ISO 8601 format that determines how long messages are + * available to the subscription from the time the message was published. This duration value is expressed using the + * following format: \'P(n)Y(n)M(n)DT(n)H(n)M(n)S\', where: - (n) is replaced by the value of each time element that + * follows the (n). - P is the duration (or Period) designator and is always placed at the beginning of the + * duration. - Y is the year designator, and it follows the value for the number of years. - M is the month + * designator, and it follows the value for the number of months. - W is the week designator, and it follows the + * value for the number of weeks. - D is the day designator, and it follows the value for the number of days. - T is + * the time designator, and it precedes the time components. - H is the hour designator, and it follows the value + * for the number of hours. - M is the minute designator, and it follows the value for the number of minutes. - S is + * the second designator, and it follows the value for the number of seconds. This duration value cannot be set + * greater than the topic’s EventRetentionInDays. It is is an optional field where its minimum value is 1 minute, + * and its maximum is determined by topic’s EventRetentionInDays value. The followings are examples of valid values: + * - \'P0DT23H12M\' or \'PT23H12M\': for duration of 23 hours and 12 minutes. - \'P1D\' or \'P1DT0H0M0S\': for + * duration of 1 day. + * + * @return the eventTimeToLive value. + */ + public Duration eventTimeToLive() { + return this.eventTimeToLive; + } + + /** + * Set the eventTimeToLive property: Time span duration in ISO 8601 format that determines how long messages are + * available to the subscription from the time the message was published. This duration value is expressed using the + * following format: \'P(n)Y(n)M(n)DT(n)H(n)M(n)S\', where: - (n) is replaced by the value of each time element that + * follows the (n). - P is the duration (or Period) designator and is always placed at the beginning of the + * duration. - Y is the year designator, and it follows the value for the number of years. - M is the month + * designator, and it follows the value for the number of months. - W is the week designator, and it follows the + * value for the number of weeks. - D is the day designator, and it follows the value for the number of days. - T is + * the time designator, and it precedes the time components. - H is the hour designator, and it follows the value + * for the number of hours. - M is the minute designator, and it follows the value for the number of minutes. - S is + * the second designator, and it follows the value for the number of seconds. This duration value cannot be set + * greater than the topic’s EventRetentionInDays. It is is an optional field where its minimum value is 1 minute, + * and its maximum is determined by topic’s EventRetentionInDays value. The followings are examples of valid values: + * - \'P0DT23H12M\' or \'PT23H12M\': for duration of 23 hours and 12 minutes. - \'P1D\' or \'P1DT0H0M0S\': for + * duration of 1 day. + * + * @param eventTimeToLive the eventTimeToLive value to set. + * @return the QueueInfo object itself. + */ + public QueueInfo withEventTimeToLive(Duration eventTimeToLive) { + this.eventTimeToLive = eventTimeToLive; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deadLetterDestinationWithResourceIdentity() != null) { + deadLetterDestinationWithResourceIdentity().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ReadinessState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ReadinessState.java index 2becb750ef70..78bac2aaed73 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ReadinessState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ReadinessState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ReadinessState. */ +/** The readiness state of the corresponding partner topic. */ public final class ReadinessState extends ExpandableStringEnum { /** Static value NeverActivated for ReadinessState. */ public static final ReadinessState NEVER_ACTIVATED = fromString("NeverActivated"); @@ -16,6 +16,15 @@ public final class ReadinessState extends ExpandableStringEnum { /** Static value Activated for ReadinessState. */ public static final ReadinessState ACTIVATED = fromString("Activated"); + /** + * Creates a new instance of ReadinessState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ReadinessState() { + } + /** * Creates or finds a ReadinessState from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceKind.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceKind.java new file mode 100644 index 000000000000..294e6c988658 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceKind.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Kind of the resource. */ +public final class ResourceKind extends ExpandableStringEnum { + /** Static value Azure for ResourceKind. */ + public static final ResourceKind AZURE = fromString("Azure"); + + /** Static value AzureArc for ResourceKind. */ + public static final ResourceKind AZURE_ARC = fromString("AzureArc"); + + /** + * Creates a new instance of ResourceKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceKind() { + } + + /** + * Creates or finds a ResourceKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceKind. + */ + @JsonCreator + public static ResourceKind fromString(String name) { + return fromString(name, ResourceKind.class); + } + + /** + * Gets known ResourceKind values. + * + * @return known ResourceKind values. + */ + public static Collection values() { + return values(ResourceKind.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceMoveChangeHistory.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceMoveChangeHistory.java new file mode 100644 index 000000000000..de66b288c8b5 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceMoveChangeHistory.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The change history of the resource move. */ +@Fluent +public final class ResourceMoveChangeHistory { + /* + * Azure subscription ID of the resource. + */ + @JsonProperty(value = "azureSubscriptionId") + private String azureSubscriptionId; + + /* + * Azure Resource Group of the resource. + */ + @JsonProperty(value = "resourceGroupName") + private String resourceGroupName; + + /* + * UTC timestamp of when the resource was changed. + */ + @JsonProperty(value = "changedTimeUtc") + private OffsetDateTime changedTimeUtc; + + /** Creates an instance of ResourceMoveChangeHistory class. */ + public ResourceMoveChangeHistory() { + } + + /** + * Get the azureSubscriptionId property: Azure subscription ID of the resource. + * + * @return the azureSubscriptionId value. + */ + public String azureSubscriptionId() { + return this.azureSubscriptionId; + } + + /** + * Set the azureSubscriptionId property: Azure subscription ID of the resource. + * + * @param azureSubscriptionId the azureSubscriptionId value to set. + * @return the ResourceMoveChangeHistory object itself. + */ + public ResourceMoveChangeHistory withAzureSubscriptionId(String azureSubscriptionId) { + this.azureSubscriptionId = azureSubscriptionId; + return this; + } + + /** + * Get the resourceGroupName property: Azure Resource Group of the resource. + * + * @return the resourceGroupName value. + */ + public String resourceGroupName() { + return this.resourceGroupName; + } + + /** + * Set the resourceGroupName property: Azure Resource Group of the resource. + * + * @param resourceGroupName the resourceGroupName value to set. + * @return the ResourceMoveChangeHistory object itself. + */ + public ResourceMoveChangeHistory withResourceGroupName(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + /** + * Get the changedTimeUtc property: UTC timestamp of when the resource was changed. + * + * @return the changedTimeUtc value. + */ + public OffsetDateTime changedTimeUtc() { + return this.changedTimeUtc; + } + + /** + * Set the changedTimeUtc property: UTC timestamp of when the resource was changed. + * + * @param changedTimeUtc the changedTimeUtc value to set. + * @return the ResourceMoveChangeHistory object itself. + */ + public ResourceMoveChangeHistory withChangedTimeUtc(OffsetDateTime changedTimeUtc) { + this.changedTimeUtc = changedTimeUtc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceProvisioningState.java index 52d6f422b1bc..3f4910540bfa 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ResourceProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ResourceProvisioningState. */ +/** Provisioning state of the Private Endpoint Connection. */ public final class ResourceProvisioningState extends ExpandableStringEnum { /** Static value Creating for ResourceProvisioningState. */ public static final ResourceProvisioningState CREATING = fromString("Creating"); @@ -28,6 +28,15 @@ public final class ResourceProvisioningState extends ExpandableStringEnum { /** Static value RegionalResource for ResourceRegionType. */ public static final ResourceRegionType REGIONAL_RESOURCE = fromString("RegionalResource"); @@ -16,6 +16,15 @@ public final class ResourceRegionType extends ExpandableStringEnum staticProperty; + + /* + * The dynamic property. + */ + @JsonProperty(value = "dynamic") + private List dynamic; + + /** Creates an instance of RoutingEnrichments class. */ + public RoutingEnrichments() { + } + + /** + * Get the staticProperty property: The static property. + * + * @return the staticProperty value. + */ + public List staticProperty() { + return this.staticProperty; + } + + /** + * Set the staticProperty property: The static property. + * + * @param staticProperty the staticProperty value to set. + * @return the RoutingEnrichments object itself. + */ + public RoutingEnrichments withStaticProperty(List staticProperty) { + this.staticProperty = staticProperty; + return this; + } + + /** + * Get the dynamic property: The dynamic property. + * + * @return the dynamic value. + */ + public List dynamic() { + return this.dynamic; + } + + /** + * Set the dynamic property: The dynamic property. + * + * @param dynamic the dynamic value to set. + * @return the RoutingEnrichments object itself. + */ + public RoutingEnrichments withDynamic(List dynamic) { + this.dynamic = dynamic; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (staticProperty() != null) { + staticProperty().forEach(e -> e.validate()); + } + if (dynamic() != null) { + dynamic().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityInfo.java new file mode 100644 index 000000000000..ebfcb80c0de0 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityInfo.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Routing identity info for topic spaces configuration. */ +@Fluent +public final class RoutingIdentityInfo { + /* + * The type property. + */ + @JsonProperty(value = "type") + private RoutingIdentityType type; + + /* + * The userAssignedIdentity property. + */ + @JsonProperty(value = "userAssignedIdentity") + private String userAssignedIdentity; + + /** Creates an instance of RoutingIdentityInfo class. */ + public RoutingIdentityInfo() { + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + public RoutingIdentityType type() { + return this.type; + } + + /** + * Set the type property: The type property. + * + * @param type the type value to set. + * @return the RoutingIdentityInfo object itself. + */ + public RoutingIdentityInfo withType(RoutingIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentity property: The userAssignedIdentity property. + * + * @return the userAssignedIdentity value. + */ + public String userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: The userAssignedIdentity property. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the RoutingIdentityInfo object itself. + */ + public RoutingIdentityInfo withUserAssignedIdentity(String userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityType.java new file mode 100644 index 000000000000..2f689314b17a --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/RoutingIdentityType.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for RoutingIdentityType. */ +public final class RoutingIdentityType extends ExpandableStringEnum { + /** Static value None for RoutingIdentityType. */ + public static final RoutingIdentityType NONE = fromString("None"); + + /** Static value SystemAssigned for RoutingIdentityType. */ + public static final RoutingIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** Static value UserAssigned for RoutingIdentityType. */ + public static final RoutingIdentityType USER_ASSIGNED = fromString("UserAssigned"); + + /** + * Creates a new instance of RoutingIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RoutingIdentityType() { + } + + /** + * Creates or finds a RoutingIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RoutingIdentityType. + */ + @JsonCreator + public static RoutingIdentityType fromString(String name) { + return fromString(name, RoutingIdentityType.class); + } + + /** + * Gets known RoutingIdentityType values. + * + * @return known RoutingIdentityType values. + */ + public static Collection values() { + return values(RoutingIdentityType.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusQueueEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusQueueEventSubscriptionDestination.java index 1578644de174..5e4c16f83411 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusQueueEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusQueueEventSubscriptionDestination.java @@ -22,6 +22,10 @@ public final class ServiceBusQueueEventSubscriptionDestination extends EventSubs @JsonProperty(value = "properties") private ServiceBusQueueEventSubscriptionDestinationProperties innerProperties; + /** Creates an instance of ServiceBusQueueEventSubscriptionDestination class. */ + public ServiceBusQueueEventSubscriptionDestination() { + } + /** * Get the innerProperties property: Service Bus Properties of the event subscription destination. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusTopicEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusTopicEventSubscriptionDestination.java index 07946136d751..d0182f8f497f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusTopicEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/ServiceBusTopicEventSubscriptionDestination.java @@ -22,6 +22,10 @@ public final class ServiceBusTopicEventSubscriptionDestination extends EventSubs @JsonProperty(value = "properties") private ServiceBusTopicEventSubscriptionDestinationProperties innerProperties; + /** Creates an instance of ServiceBusTopicEventSubscriptionDestination class. */ + public ServiceBusTopicEventSubscriptionDestination() { + } + /** * Get the innerProperties property: Service Bus Topic Properties of the event subscription destination. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Sku.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Sku.java new file mode 100644 index 000000000000..612037560ffd --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Sku.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The Sku name of the resource. The possible values are: Basic or Premium. */ +public final class Sku extends ExpandableStringEnum { + /** Static value Basic for Sku. */ + public static final Sku BASIC = fromString("Basic"); + + /** Static value Premium for Sku. */ + public static final Sku PREMIUM = fromString("Premium"); + + /** + * Creates a new instance of Sku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Sku() { + } + + /** + * Creates or finds a Sku from its string representation. + * + * @param name a name to look for. + * @return the corresponding Sku. + */ + @JsonCreator + public static Sku fromString(String name) { + return fromString(name, Sku.class); + } + + /** + * Gets known Sku values. + * + * @return known Sku values. + */ + public static Collection values() { + return values(Sku.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SkuName.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SkuName.java new file mode 100644 index 000000000000..9afff3bf53ec --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SkuName.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The name of the SKU. */ +public final class SkuName extends ExpandableStringEnum { + /** Static value Standard for SkuName. */ + public static final SkuName STANDARD = fromString("Standard"); + + /** + * Creates a new instance of SkuName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SkuName() { + } + + /** + * Creates or finds a SkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuName. + */ + @JsonCreator + public static SkuName fromString(String name) { + return fromString(name, SkuName.class); + } + + /** + * Gets known SkuName values. + * + * @return known SkuName values. + */ + public static Collection values() { + return values(SkuName.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticDeliveryAttributeMapping.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticDeliveryAttributeMapping.java index 0b7561897b5d..ca31bc3a7b46 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticDeliveryAttributeMapping.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticDeliveryAttributeMapping.java @@ -21,6 +21,10 @@ public final class StaticDeliveryAttributeMapping extends DeliveryAttributeMappi @JsonProperty(value = "properties") private StaticDeliveryAttributeMappingProperties innerProperties; + /** Creates an instance of StaticDeliveryAttributeMapping class. */ + public StaticDeliveryAttributeMapping() { + } + /** * Get the innerProperties property: Properties of static delivery attribute mapping. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichment.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichment.java new file mode 100644 index 000000000000..c1af187ffb95 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichment.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The StaticRoutingEnrichment model. */ +@Fluent +public final class StaticRoutingEnrichment { + /* + * Static routing enrichment key. + */ + @JsonProperty(value = "key") + private String key; + + /* + * Static routing enrichment value type. For e.g. this property value can be 'String'. + */ + @JsonProperty(value = "valueType") + private StaticRoutingEnrichmentType valueType; + + /** Creates an instance of StaticRoutingEnrichment class. */ + public StaticRoutingEnrichment() { + } + + /** + * Get the key property: Static routing enrichment key. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: Static routing enrichment key. + * + * @param key the key value to set. + * @return the StaticRoutingEnrichment object itself. + */ + public StaticRoutingEnrichment withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the valueType property: Static routing enrichment value type. For e.g. this property value can be 'String'. + * + * @return the valueType value. + */ + public StaticRoutingEnrichmentType valueType() { + return this.valueType; + } + + /** + * Set the valueType property: Static routing enrichment value type. For e.g. this property value can be 'String'. + * + * @param valueType the valueType value to set. + * @return the StaticRoutingEnrichment object itself. + */ + public StaticRoutingEnrichment withValueType(StaticRoutingEnrichmentType valueType) { + this.valueType = valueType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichmentType.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichmentType.java new file mode 100644 index 000000000000..b353dfc91a89 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StaticRoutingEnrichmentType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Static routing enrichment value type. For e.g. this property value can be 'String'. */ +public final class StaticRoutingEnrichmentType extends ExpandableStringEnum { + /** Static value String for StaticRoutingEnrichmentType. */ + public static final StaticRoutingEnrichmentType STRING = fromString("String"); + + /** + * Creates a new instance of StaticRoutingEnrichmentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StaticRoutingEnrichmentType() { + } + + /** + * Creates or finds a StaticRoutingEnrichmentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding StaticRoutingEnrichmentType. + */ + @JsonCreator + public static StaticRoutingEnrichmentType fromString(String name) { + return fromString(name, StaticRoutingEnrichmentType.class); + } + + /** + * Gets known StaticRoutingEnrichmentType values. + * + * @return known StaticRoutingEnrichmentType values. + */ + public static Collection values() { + return values(StaticRoutingEnrichmentType.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageBlobDeadLetterDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageBlobDeadLetterDestination.java index d47cdb081906..ea2447089027 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageBlobDeadLetterDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageBlobDeadLetterDestination.java @@ -21,6 +21,10 @@ public final class StorageBlobDeadLetterDestination extends DeadLetterDestinatio @JsonProperty(value = "properties") private StorageBlobDeadLetterDestinationProperties innerProperties; + /** Creates an instance of StorageBlobDeadLetterDestination class. */ + public StorageBlobDeadLetterDestination() { + } + /** * Get the innerProperties property: The properties of the Storage Blob based deadletter destination. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageQueueEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageQueueEventSubscriptionDestination.java index c7777800cca7..9ea3b97057cb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageQueueEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StorageQueueEventSubscriptionDestination.java @@ -21,6 +21,10 @@ public final class StorageQueueEventSubscriptionDestination extends EventSubscri @JsonProperty(value = "properties") private StorageQueueEventSubscriptionDestinationProperties innerProperties; + /** Creates an instance of StorageQueueEventSubscriptionDestination class. */ + public StorageQueueEventSubscriptionDestination() { + } + /** * Get the innerProperties property: Storage Queue Properties of the event subscription destination. * @@ -81,7 +85,9 @@ public StorageQueueEventSubscriptionDestination withQueueName(String queueName) } /** - * Get the queueMessageTimeToLiveInSeconds property: Storage queue message time to live in seconds. + * Get the queueMessageTimeToLiveInSeconds property: Storage queue message time to live in seconds. This value + * cannot be zero or negative with the exception of using -1 to indicate that the Time To Live of the message is + * Infinite. * * @return the queueMessageTimeToLiveInSeconds value. */ @@ -90,7 +96,9 @@ public Long queueMessageTimeToLiveInSeconds() { } /** - * Set the queueMessageTimeToLiveInSeconds property: Storage queue message time to live in seconds. + * Set the queueMessageTimeToLiveInSeconds property: Storage queue message time to live in seconds. This value + * cannot be zero or negative with the exception of using -1 to indicate that the Time To Live of the message is + * Infinite. * * @param queueMessageTimeToLiveInSeconds the queueMessageTimeToLiveInSeconds value to set. * @return the StorageQueueEventSubscriptionDestination object itself. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithAdvancedFilter.java index f28efacec77c..af0fca705e4b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithAdvancedFilter.java @@ -21,6 +21,10 @@ public final class StringBeginsWithAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List values; + /** Creates an instance of StringBeginsWithAdvancedFilter class. */ + public StringBeginsWithAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithFilter.java new file mode 100644 index 000000000000..8342564e478c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringBeginsWithFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** StringBeginsWith Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringBeginsWith") +@Fluent +public final class StringBeginsWithFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** Creates an instance of StringBeginsWithFilter class. */ + public StringBeginsWithFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the StringBeginsWithFilter object itself. + */ + public StringBeginsWithFilter withValues(List values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public StringBeginsWithFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsAdvancedFilter.java index fb8fd446b8e7..645728b43cd7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsAdvancedFilter.java @@ -21,6 +21,10 @@ public final class StringContainsAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List values; + /** Creates an instance of StringContainsAdvancedFilter class. */ + public StringContainsAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsFilter.java new file mode 100644 index 000000000000..a7ed636e997d --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringContainsFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** StringContains Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringContains") +@Fluent +public final class StringContainsFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** Creates an instance of StringContainsFilter class. */ + public StringContainsFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the StringContainsFilter object itself. + */ + public StringContainsFilter withValues(List values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public StringContainsFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithAdvancedFilter.java index ca634cbd4c27..00ea8814cd99 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithAdvancedFilter.java @@ -21,6 +21,10 @@ public final class StringEndsWithAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List values; + /** Creates an instance of StringEndsWithAdvancedFilter class. */ + public StringEndsWithAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithFilter.java new file mode 100644 index 000000000000..4111b367f737 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringEndsWithFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** StringEndsWith Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringEndsWith") +@Fluent +public final class StringEndsWithFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** Creates an instance of StringEndsWithFilter class. */ + public StringEndsWithFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the StringEndsWithFilter object itself. + */ + public StringEndsWithFilter withValues(List values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public StringEndsWithFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInAdvancedFilter.java index 56e353527c08..930f28cde17a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInAdvancedFilter.java @@ -21,6 +21,10 @@ public final class StringInAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List values; + /** Creates an instance of StringInAdvancedFilter class. */ + public StringInAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInFilter.java new file mode 100644 index 000000000000..5c1ea28f9f86 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringInFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** StringIn Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringIn") +@Fluent +public final class StringInFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** Creates an instance of StringInFilter class. */ + public StringInFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the StringInFilter object itself. + */ + public StringInFilter withValues(List values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public StringInFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithAdvancedFilter.java index ac4918f4310f..16ff223a3e40 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithAdvancedFilter.java @@ -21,6 +21,10 @@ public final class StringNotBeginsWithAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List values; + /** Creates an instance of StringNotBeginsWithAdvancedFilter class. */ + public StringNotBeginsWithAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithFilter.java new file mode 100644 index 000000000000..61019b6575d5 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotBeginsWithFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** StringNotBeginsWith Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringNotBeginsWith") +@Fluent +public final class StringNotBeginsWithFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** Creates an instance of StringNotBeginsWithFilter class. */ + public StringNotBeginsWithFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the StringNotBeginsWithFilter object itself. + */ + public StringNotBeginsWithFilter withValues(List values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public StringNotBeginsWithFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsAdvancedFilter.java index 3ec12e337d25..9278eafcff3d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsAdvancedFilter.java @@ -21,6 +21,10 @@ public final class StringNotContainsAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List values; + /** Creates an instance of StringNotContainsAdvancedFilter class. */ + public StringNotContainsAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsFilter.java new file mode 100644 index 000000000000..2502cf79b17b --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotContainsFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** StringNotContains Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringNotContains") +@Fluent +public final class StringNotContainsFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** Creates an instance of StringNotContainsFilter class. */ + public StringNotContainsFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the StringNotContainsFilter object itself. + */ + public StringNotContainsFilter withValues(List values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public StringNotContainsFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithAdvancedFilter.java index e377f5e22f18..cf86ad634f3b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithAdvancedFilter.java @@ -21,6 +21,10 @@ public final class StringNotEndsWithAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List values; + /** Creates an instance of StringNotEndsWithAdvancedFilter class. */ + public StringNotEndsWithAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithFilter.java new file mode 100644 index 000000000000..e40711fcbeb3 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotEndsWithFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** StringNotEndsWith Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringNotEndsWith") +@Fluent +public final class StringNotEndsWithFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** Creates an instance of StringNotEndsWithFilter class. */ + public StringNotEndsWithFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the StringNotEndsWithFilter object itself. + */ + public StringNotEndsWithFilter withValues(List values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public StringNotEndsWithFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInAdvancedFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInAdvancedFilter.java index 955b540b2c4e..681f84eb85d3 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInAdvancedFilter.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInAdvancedFilter.java @@ -21,6 +21,10 @@ public final class StringNotInAdvancedFilter extends AdvancedFilter { @JsonProperty(value = "values") private List values; + /** Creates an instance of StringNotInAdvancedFilter class. */ + public StringNotInAdvancedFilter() { + } + /** * Get the values property: The set of filter values. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInFilter.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInFilter.java new file mode 100644 index 000000000000..4d95b114fe55 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/StringNotInFilter.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** StringNotIn Filter. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "operatorType") +@JsonTypeName("StringNotIn") +@Fluent +public final class StringNotInFilter extends Filter { + /* + * The set of filter values. + */ + @JsonProperty(value = "values") + private List values; + + /** Creates an instance of StringNotInFilter class. */ + public StringNotInFilter() { + } + + /** + * Get the values property: The set of filter values. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: The set of filter values. + * + * @param values the values value to set. + * @return the StringNotInFilter object itself. + */ + public StringNotInFilter withValues(List values) { + this.values = values; + return this; + } + + /** {@inheritDoc} */ + @Override + public StringNotInFilter withKey(String key) { + super.withKey(key); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Subscription.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Subscription.java new file mode 100644 index 000000000000..2c4b5864879d --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Subscription.java @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner; + +/** An immutable client-side representation of Subscription. */ +public interface Subscription { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: The system metadata relating to Event Subscription resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of the event subscription. + * + * @return the provisioningState value. + */ + SubscriptionProvisioningState provisioningState(); + + /** + * Gets the deliveryConfiguration property: Information about the delivery configuration of the event subscription. + * + * @return the deliveryConfiguration value. + */ + DeliveryConfiguration deliveryConfiguration(); + + /** + * Gets the eventDeliverySchema property: The event delivery schema for the event subscription. + * + * @return the eventDeliverySchema value. + */ + DeliverySchema eventDeliverySchema(); + + /** + * Gets the filtersConfiguration property: Information about the filter for the event subscription. + * + * @return the filtersConfiguration value. + */ + FiltersConfiguration filtersConfiguration(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner object. + * + * @return the inner object. + */ + SubscriptionInner innerModel(); + + /** The entirety of the Subscription definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The Subscription definition stages. */ + interface DefinitionStages { + /** The first stage of the Subscription definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the Subscription definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, namespaceName, topicName. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicName Name of the namespace topic. + * @return the next definition stage. + */ + WithCreate withExistingTopic(String resourceGroupName, String namespaceName, String topicName); + } + /** + * The stage of the Subscription definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithDeliveryConfiguration, + DefinitionStages.WithEventDeliverySchema, + DefinitionStages.WithFiltersConfiguration { + /** + * Executes the create request. + * + * @return the created resource. + */ + Subscription create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Subscription create(Context context); + } + /** The stage of the Subscription definition allowing to specify deliveryConfiguration. */ + interface WithDeliveryConfiguration { + /** + * Specifies the deliveryConfiguration property: Information about the delivery configuration of the event + * subscription.. + * + * @param deliveryConfiguration Information about the delivery configuration of the event subscription. + * @return the next definition stage. + */ + WithCreate withDeliveryConfiguration(DeliveryConfiguration deliveryConfiguration); + } + /** The stage of the Subscription definition allowing to specify eventDeliverySchema. */ + interface WithEventDeliverySchema { + /** + * Specifies the eventDeliverySchema property: The event delivery schema for the event subscription.. + * + * @param eventDeliverySchema The event delivery schema for the event subscription. + * @return the next definition stage. + */ + WithCreate withEventDeliverySchema(DeliverySchema eventDeliverySchema); + } + /** The stage of the Subscription definition allowing to specify filtersConfiguration. */ + interface WithFiltersConfiguration { + /** + * Specifies the filtersConfiguration property: Information about the filter for the event subscription.. + * + * @param filtersConfiguration Information about the filter for the event subscription. + * @return the next definition stage. + */ + WithCreate withFiltersConfiguration(FiltersConfiguration filtersConfiguration); + } + } + /** + * Begins update for the Subscription resource. + * + * @return the stage of resource update. + */ + Subscription.Update update(); + + /** The template for Subscription update. */ + interface Update + extends UpdateStages.WithDeliveryConfiguration, + UpdateStages.WithEventDeliverySchema, + UpdateStages.WithFiltersConfiguration { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Subscription apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Subscription apply(Context context); + } + /** The Subscription update stages. */ + interface UpdateStages { + /** The stage of the Subscription update allowing to specify deliveryConfiguration. */ + interface WithDeliveryConfiguration { + /** + * Specifies the deliveryConfiguration property: Information about the delivery configuration of the event + * subscription.. + * + * @param deliveryConfiguration Information about the delivery configuration of the event subscription. + * @return the next definition stage. + */ + Update withDeliveryConfiguration(DeliveryConfiguration deliveryConfiguration); + } + /** The stage of the Subscription update allowing to specify eventDeliverySchema. */ + interface WithEventDeliverySchema { + /** + * Specifies the eventDeliverySchema property: The event delivery schema for the event subscription.. + * + * @param eventDeliverySchema The event delivery schema for the event subscription. + * @return the next definition stage. + */ + Update withEventDeliverySchema(DeliverySchema eventDeliverySchema); + } + /** The stage of the Subscription update allowing to specify filtersConfiguration. */ + interface WithFiltersConfiguration { + /** + * Specifies the filtersConfiguration property: Information about the filter for the event subscription.. + * + * @param filtersConfiguration Information about the filter for the event subscription. + * @return the next definition stage. + */ + Update withFiltersConfiguration(FiltersConfiguration filtersConfiguration); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Subscription refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Subscription refresh(Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionProvisioningState.java new file mode 100644 index 000000000000..cbe7ae4110d0 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionProvisioningState.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the event subscription. */ +public final class SubscriptionProvisioningState extends ExpandableStringEnum { + /** Static value Creating for SubscriptionProvisioningState. */ + public static final SubscriptionProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for SubscriptionProvisioningState. */ + public static final SubscriptionProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for SubscriptionProvisioningState. */ + public static final SubscriptionProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for SubscriptionProvisioningState. */ + public static final SubscriptionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for SubscriptionProvisioningState. */ + public static final SubscriptionProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for SubscriptionProvisioningState. */ + public static final SubscriptionProvisioningState FAILED = fromString("Failed"); + + /** Static value AwaitingManualAction for SubscriptionProvisioningState. */ + public static final SubscriptionProvisioningState AWAITING_MANUAL_ACTION = fromString("AwaitingManualAction"); + + /** Static value Deleted for SubscriptionProvisioningState. */ + public static final SubscriptionProvisioningState DELETED = fromString("Deleted"); + + /** Static value DeleteFailed for SubscriptionProvisioningState. */ + public static final SubscriptionProvisioningState DELETE_FAILED = fromString("DeleteFailed"); + + /** Static value CreateFailed for SubscriptionProvisioningState. */ + public static final SubscriptionProvisioningState CREATE_FAILED = fromString("CreateFailed"); + + /** Static value UpdatedFailed for SubscriptionProvisioningState. */ + public static final SubscriptionProvisioningState UPDATED_FAILED = fromString("UpdatedFailed"); + + /** + * Creates a new instance of SubscriptionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SubscriptionProvisioningState() { + } + + /** + * Creates or finds a SubscriptionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding SubscriptionProvisioningState. + */ + @JsonCreator + public static SubscriptionProvisioningState fromString(String name) { + return fromString(name, SubscriptionProvisioningState.class); + } + + /** + * Gets known SubscriptionProvisioningState values. + * + * @return known SubscriptionProvisioningState values. + */ + public static Collection values() { + return values(SubscriptionProvisioningState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionUpdateParameters.java new file mode 100644 index 000000000000..63be93258217 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionUpdateParameters.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionUpdateParametersProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of the Event Subscription update. */ +@Fluent +public final class SubscriptionUpdateParameters { + /* + * Properties of the Event Subscription update parameters. + */ + @JsonProperty(value = "properties") + private SubscriptionUpdateParametersProperties innerProperties; + + /** Creates an instance of SubscriptionUpdateParameters class. */ + public SubscriptionUpdateParameters() { + } + + /** + * Get the innerProperties property: Properties of the Event Subscription update parameters. + * + * @return the innerProperties value. + */ + private SubscriptionUpdateParametersProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the deliveryConfiguration property: Information about the delivery configuration of the event subscription. + * + * @return the deliveryConfiguration value. + */ + public DeliveryConfiguration deliveryConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().deliveryConfiguration(); + } + + /** + * Set the deliveryConfiguration property: Information about the delivery configuration of the event subscription. + * + * @param deliveryConfiguration the deliveryConfiguration value to set. + * @return the SubscriptionUpdateParameters object itself. + */ + public SubscriptionUpdateParameters withDeliveryConfiguration(DeliveryConfiguration deliveryConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionUpdateParametersProperties(); + } + this.innerProperties().withDeliveryConfiguration(deliveryConfiguration); + return this; + } + + /** + * Get the eventDeliverySchema property: The event delivery schema for the event subscription. + * + * @return the eventDeliverySchema value. + */ + public DeliverySchema eventDeliverySchema() { + return this.innerProperties() == null ? null : this.innerProperties().eventDeliverySchema(); + } + + /** + * Set the eventDeliverySchema property: The event delivery schema for the event subscription. + * + * @param eventDeliverySchema the eventDeliverySchema value to set. + * @return the SubscriptionUpdateParameters object itself. + */ + public SubscriptionUpdateParameters withEventDeliverySchema(DeliverySchema eventDeliverySchema) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionUpdateParametersProperties(); + } + this.innerProperties().withEventDeliverySchema(eventDeliverySchema); + return this; + } + + /** + * Get the filtersConfiguration property: Information about the filter for the event subscription. + * + * @return the filtersConfiguration value. + */ + public FiltersConfiguration filtersConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().filtersConfiguration(); + } + + /** + * Set the filtersConfiguration property: Information about the filter for the event subscription. + * + * @param filtersConfiguration the filtersConfiguration value to set. + * @return the SubscriptionUpdateParameters object itself. + */ + public SubscriptionUpdateParameters withFiltersConfiguration(FiltersConfiguration filtersConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SubscriptionUpdateParametersProperties(); + } + this.innerProperties().withFiltersConfiguration(filtersConfiguration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionsListResult.java new file mode 100644 index 000000000000..9638ac7ec3b2 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SubscriptionsListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.SubscriptionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Result of the List event subscriptions operation. */ +@Fluent +public final class SubscriptionsListResult { + /* + * A collection of Subscriptions. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link for the next page of event subscriptions + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of SubscriptionsListResult class. */ + public SubscriptionsListResult() { + } + + /** + * Get the value property: A collection of Subscriptions. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of Subscriptions. + * + * @param value the value value to set. + * @return the SubscriptionsListResult object itself. + */ + public SubscriptionsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link for the next page of event subscriptions. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link for the next page of event subscriptions. + * + * @param nextLink the nextLink value to set. + * @return the SubscriptionsListResult object itself. + */ + public SubscriptionsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopic.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopic.java index 7f6071959053..41434d38adc5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopic.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopic.java @@ -48,18 +48,18 @@ public interface SystemTopic { Map tags(); /** - * Gets the identity property: Identity information for the resource. + * Gets the systemData property: The system metadata relating to System Topic resource. * - * @return the identity value. + * @return the systemData value. */ - IdentityInfo identity(); + SystemData systemData(); /** - * Gets the systemData property: The system metadata relating to System Topic resource. + * Gets the identity property: Identity information for the resource. * - * @return the systemData value. + * @return the identity value. */ - SystemData systemData(); + IdentityInfo identity(); /** * Gets the provisioningState property: Provisioning state of the system topic. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java index d06ef8adf3c1..d44cbb9294d7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicEventSubscriptions.java @@ -12,21 +12,44 @@ /** Resource collection API of SystemTopicEventSubscriptions. */ public interface SystemTopicEventSubscriptions { /** - * Get an event subscription. + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 an event subscription. + * @return all delivery attributes for an event subscription along with {@link Response}. */ - EventSubscription get(String resourceGroupName, String systemTopicName, String eventSubscriptionName); + Response getDeliveryAttributesWithResponse( + String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription. + * + *

Get all delivery attributes for an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 all delivery attributes for an event subscription. + */ + DeliveryAttributeListResult getDeliveryAttributes( + String resourceGroupName, String systemTopicName, String eventSubscriptionName); /** - * Get an event subscription. + * Get an event subscription of a system topic. + * + *

Get an event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -42,7 +65,25 @@ Response getWithResponse( String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Get an event subscription of a system topic. + * + *

Get an event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param systemTopicName Name of the system topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 an event subscription. + */ + EventSubscription get(String resourceGroupName, String systemTopicName, String eventSubscriptionName); + + /** + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -62,7 +103,9 @@ EventSubscription createOrUpdate( EventSubscriptionInner eventSubscriptionInfo); /** - * Asynchronously creates or updates an event subscription with the specified parameters. Existing event + * Create or update an event subscription for a system topic. + * + *

Asynchronously creates or updates an event subscription with the specified parameters. Existing event * subscriptions will be updated with this API. * * @param resourceGroupName The name of the resource group within the user's subscription. @@ -84,7 +127,9 @@ EventSubscription createOrUpdate( Context context); /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -97,7 +142,9 @@ EventSubscription createOrUpdate( void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName); /** - * Delete an existing event subscription of a system topic. + * Delete an event subscription of a system topic. + * + *

Delete an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -111,7 +158,9 @@ EventSubscription createOrUpdate( void delete(String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -130,7 +179,9 @@ EventSubscription update( EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); /** - * Update an existing event subscription of a system topic. + * Update event subscription of a system topic. + * + *

Update an existing event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -151,37 +202,43 @@ EventSubscription update( Context context); /** - * Get the full endpoint URL for an event subscription of a system topic. + * Get full URL of an event subscription of a system topic + * + *

Get the full endpoint URL for an event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. + * @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 the full endpoint URL for an event subscription of a system topic. + * @return the full endpoint URL for an event subscription of a system topic along with {@link Response}. */ - EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String systemTopicName, String eventSubscriptionName); + Response getFullUrlWithResponse( + String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for an event subscription of a system topic. + * Get full URL of an event subscription of a system topic + * + *

Get the full endpoint URL for an event subscription of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 the full endpoint URL for an event subscription of a system topic along with {@link Response}. + * @return the full endpoint URL for an event subscription of a system topic. */ - Response getFullUrlWithResponse( - String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); + EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String systemTopicName, String eventSubscriptionName); /** - * List event subscriptions that belong to a specific system topic. + * List event subscriptions of a system topic. + * + *

List event subscriptions that belong to a specific system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -193,7 +250,9 @@ Response getFullUrlWithResponse( PagedIterable listBySystemTopic(String resourceGroupName, String systemTopicName); /** - * List event subscriptions that belong to a specific system topic. + * List event subscriptions of a system topic. + * + *

List event subscriptions that belong to a specific system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -213,35 +272,4 @@ Response getFullUrlWithResponse( */ PagedIterable listBySystemTopic( String resourceGroupName, String systemTopicName, String filter, Integer top, Context context); - - /** - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 all delivery attributes for an event subscription. - */ - DeliveryAttributeListResult getDeliveryAttributes( - String resourceGroupName, String systemTopicName, String eventSubscriptionName); - - /** - * Get all delivery attributes for an event subscription. - * - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param systemTopicName Name of the system topic. - * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be - * between 3 and 100 characters in length and use alphanumeric letters only. - * @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 all delivery attributes for an event subscription along with {@link Response}. - */ - Response getDeliveryAttributesWithResponse( - String resourceGroupName, String systemTopicName, String eventSubscriptionName, Context context); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicUpdateParameters.java index a6be75cee914..997b6d619a0c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicUpdateParameters.java @@ -25,6 +25,10 @@ public final class SystemTopicUpdateParameters { @JsonProperty(value = "identity") private IdentityInfo identity; + /** Creates an instance of SystemTopicUpdateParameters class. */ + public SystemTopicUpdateParameters() { + } + /** * Get the tags property: Tags of the system topic. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopics.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopics.java index 86543dbc27c2..0237ef370e8c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopics.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopics.java @@ -11,33 +11,39 @@ /** Resource collection API of SystemTopics. */ public interface SystemTopics { /** - * Get properties of a system topic. + * Get a system topic. + * + *

Get properties of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. + * @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 properties of a system topic. + * @return properties of a system topic along with {@link Response}. */ - SystemTopic getByResourceGroup(String resourceGroupName, String systemTopicName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String systemTopicName, Context context); /** - * Get properties of a system topic. + * Get a system topic. + * + *

Get properties of a system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. - * @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 properties of a system topic along with {@link Response}. + * @return properties of a system topic. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String systemTopicName, Context context); + SystemTopic getByResourceGroup(String resourceGroupName, String systemTopicName); /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -48,7 +54,9 @@ Response getByResourceGroupWithResponse( void deleteByResourceGroup(String resourceGroupName, String systemTopicName); /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param systemTopicName Name of the system topic. @@ -60,7 +68,9 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String systemTopicName, Context context); /** - * List all the system topics under an Azure subscription. + * List system topics under an Azure subscription. + * + *

List all the system topics under an Azure subscription. * * @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. @@ -69,7 +79,9 @@ Response getByResourceGroupWithResponse( PagedIterable list(); /** - * List all the system topics under an Azure subscription. + * List system topics under an Azure subscription. + * + *

List all the system topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -88,7 +100,9 @@ Response getByResourceGroupWithResponse( PagedIterable list(String filter, Integer top, Context context); /** - * List all the system topics under a resource group. + * List system topics under a resource group. + * + *

List all the system topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -99,7 +113,9 @@ Response getByResourceGroupWithResponse( PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the system topics under a resource group. + * List system topics under a resource group. + * + *

List all the system topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -120,7 +136,9 @@ PagedIterable listByResourceGroup( String resourceGroupName, String filter, Integer top, Context context); /** - * Get properties of a system topic. + * Get a system topic. + * + *

Get properties of a system topic. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +149,9 @@ PagedIterable listByResourceGroup( SystemTopic getById(String id); /** - * Get properties of a system topic. + * Get a system topic. + * + *

Get properties of a system topic. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -143,7 +163,9 @@ PagedIterable listByResourceGroup( Response getByIdWithResponse(String id, Context context); /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,7 +175,9 @@ PagedIterable listByResourceGroup( void deleteById(String id); /** - * Delete existing system topic. + * Delete a system topic. + * + *

Delete existing system topic. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicsListResult.java index c5bc12a38381..ce3cfd0bb4e7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/SystemTopicsListResult.java @@ -24,6 +24,10 @@ public final class SystemTopicsListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of SystemTopicsListResult class. */ + public SystemTopicsListResult() { + } + /** * Get the value property: A collection of system Topics. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TlsVersion.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TlsVersion.java new file mode 100644 index 000000000000..0d94145c0567 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TlsVersion.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Minimum TLS version of the publisher allowed to publish to this domain. */ +public final class TlsVersion extends ExpandableStringEnum { + /** Static value 1.0 for TlsVersion. */ + public static final TlsVersion ONE_ZERO = fromString("1.0"); + + /** Static value 1.1 for TlsVersion. */ + public static final TlsVersion ONE_ONE = fromString("1.1"); + + /** Static value 1.2 for TlsVersion. */ + public static final TlsVersion ONE_TWO = fromString("1.2"); + + /** + * Creates a new instance of TlsVersion value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TlsVersion() { + } + + /** + * Creates or finds a TlsVersion from its string representation. + * + * @param name a name to look for. + * @return the corresponding TlsVersion. + */ + @JsonCreator + public static TlsVersion fromString(String name) { + return fromString(name, TlsVersion.class); + } + + /** + * Gets known TlsVersion values. + * + * @return known TlsVersion values. + */ + public static Collection values() { + return values(TlsVersion.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topic.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topic.java index 15b0d11bf934..1932e8b2630d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topic.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topic.java @@ -49,6 +49,13 @@ public interface Topic { */ Map tags(); + /** + * Gets the sku property: The Sku pricing tier for the topic. + * + * @return the sku value. + */ + ResourceSku sku(); + /** * Gets the identity property: Identity information for the resource. * @@ -56,6 +63,20 @@ public interface Topic { */ IdentityInfo identity(); + /** + * Gets the kind property: Kind of the resource. + * + * @return the kind value. + */ + ResourceKind kind(); + + /** + * Gets the extendedLocation property: Extended location of the resource. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + /** * Gets the systemData property: The system metadata relating to Topic resource. * @@ -84,6 +105,22 @@ public interface Topic { */ String endpoint(); + /** + * Gets the eventTypeInfo property: Event Type Information for the user topic. This information is provided by the + * publisher and can be used by the subscriber to view different types of events that are published. + * + * @return the eventTypeInfo value. + */ + EventTypeInfo eventTypeInfo(); + + /** + * Gets the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * topic. + * + * @return the minimumTlsVersionAllowed value. + */ + TlsVersion minimumTlsVersionAllowed(); + /** * Gets the inputSchema property: This determines the format that Event Grid should expect for incoming events * published to the topic. @@ -215,7 +252,12 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, + DefinitionStages.WithSku, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, + DefinitionStages.WithExtendedLocation, + DefinitionStages.WithEventTypeInfo, + DefinitionStages.WithMinimumTlsVersionAllowed, DefinitionStages.WithInputSchema, DefinitionStages.WithInputSchemaMapping, DefinitionStages.WithPublicNetworkAccess, @@ -247,6 +289,16 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the Topic definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The Sku pricing tier for the topic.. + * + * @param sku The Sku pricing tier for the topic. + * @return the next definition stage. + */ + WithCreate withSku(ResourceSku sku); + } /** The stage of the Topic definition allowing to specify identity. */ interface WithIdentity { /** @@ -257,6 +309,50 @@ interface WithIdentity { */ WithCreate withIdentity(IdentityInfo identity); } + /** The stage of the Topic definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of the resource.. + * + * @param kind Kind of the resource. + * @return the next definition stage. + */ + WithCreate withKind(ResourceKind kind); + } + /** The stage of the Topic definition allowing to specify extendedLocation. */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: Extended location of the resource.. + * + * @param extendedLocation Extended location of the resource. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + /** The stage of the Topic definition allowing to specify eventTypeInfo. */ + interface WithEventTypeInfo { + /** + * Specifies the eventTypeInfo property: Event Type Information for the user topic. This information is + * provided by the publisher and can be used by the subscriber to view different types of events that are + * published.. + * + * @param eventTypeInfo Event Type Information for the user topic. This information is provided by the + * publisher and can be used by the subscriber to view different types of events that are published. + * @return the next definition stage. + */ + WithCreate withEventTypeInfo(EventTypeInfo eventTypeInfo); + } + /** The stage of the Topic definition allowing to specify minimumTlsVersionAllowed. */ + interface WithMinimumTlsVersionAllowed { + /** + * Specifies the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish + * to this topic. + * + * @param minimumTlsVersionAllowed Minimum TLS version of the publisher allowed to publish to this topic. + * @return the next definition stage. + */ + WithCreate withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed); + } /** The stage of the Topic definition allowing to specify inputSchema. */ interface WithInputSchema { /** @@ -346,10 +442,13 @@ interface WithDataResidencyBoundary { interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, + UpdateStages.WithSku, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithInboundIpRules, + UpdateStages.WithMinimumTlsVersionAllowed, UpdateStages.WithDisableLocalAuth, - UpdateStages.WithDataResidencyBoundary { + UpdateStages.WithDataResidencyBoundary, + UpdateStages.WithEventTypeInfo { /** * Executes the update request. * @@ -387,19 +486,27 @@ interface WithIdentity { */ Update withIdentity(IdentityInfo identity); } + /** The stage of the Topic update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The Sku pricing tier for the topic.. + * + * @param sku The Sku pricing tier for the topic. + * @return the next definition stage. + */ + Update withSku(ResourceSku sku); + } /** The stage of the Topic update allowing to specify publicNetworkAccess. */ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: This determines if traffic is allowed over public network. By * default it is enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicUpdateParameterProperties" - + ".InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicUpdateParameterProperties.InboundIpRules" * />. * * @param publicNetworkAccess This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso - * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicUpdateParameterProperties" - + ".InboundIpRules" + * cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicUpdateParameterProperties.InboundIpRules" * />. * @return the next definition stage. */ @@ -417,6 +524,17 @@ interface WithInboundIpRules { */ Update withInboundIpRules(List inboundIpRules); } + /** The stage of the Topic update allowing to specify minimumTlsVersionAllowed. */ + interface WithMinimumTlsVersionAllowed { + /** + * Specifies the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish + * to this domain. + * + * @param minimumTlsVersionAllowed Minimum TLS version of the publisher allowed to publish to this domain. + * @return the next definition stage. + */ + Update withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed); + } /** The stage of the Topic update allowing to specify disableLocalAuth. */ interface WithDisableLocalAuth { /** @@ -441,6 +559,16 @@ interface WithDataResidencyBoundary { */ Update withDataResidencyBoundary(DataResidencyBoundary dataResidencyBoundary); } + /** The stage of the Topic update allowing to specify eventTypeInfo. */ + interface WithEventTypeInfo { + /** + * Specifies the eventTypeInfo property: The eventTypeInfo for the topic.. + * + * @param eventTypeInfo The eventTypeInfo for the topic. + * @return the next definition stage. + */ + Update withEventTypeInfo(EventTypeInfo eventTypeInfo); + } } /** * Refreshes the resource to sync with Azure. @@ -458,27 +586,33 @@ interface WithDataResidencyBoundary { Topic refresh(Context context); /** - * List the two keys used to publish to a topic. + * List keys for a topic. * + *

List the two keys used to publish to a topic. + * + * @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 shared access keys of the Topic. + * @return shared access keys of the Topic along with {@link Response}. */ - TopicSharedAccessKeys listSharedAccessKeys(); + Response listSharedAccessKeysWithResponse(Context context); /** - * List the two keys used to publish to a topic. + * List keys for a topic. + * + *

List the two keys used to publish to a topic. * - * @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 shared access keys of the Topic along with {@link Response}. + * @return shared access keys of the Topic. */ - Response listSharedAccessKeysWithResponse(Context context); + TopicSharedAccessKeys listSharedAccessKeys(); /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param regenerateKeyRequest Request body to regenerate key. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -489,7 +623,9 @@ interface WithDataResidencyBoundary { TopicSharedAccessKeys regenerateKey(TopicRegenerateKeyRequest regenerateKeyRequest); /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicEventSubscriptions.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicEventSubscriptions.java index 01b106201a24..b0bb0a260ab2 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicEventSubscriptions.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicEventSubscriptions.java @@ -7,14 +7,34 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; /** Resource collection API of TopicEventSubscriptions. */ public interface TopicEventSubscriptions { /** - * Get all delivery attributes for an event subscription for topic. + * Get delivery attributes for an event subscription for topic. + * + *

Get all delivery attributes for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 all delivery attributes for an event subscription for topic along with {@link Response}. + */ + Response getDeliveryAttributesWithResponse( + String resourceGroupName, String topicName, String eventSubscriptionName, Context context); + + /** + * Get delivery attributes for an event subscription for topic. + * + *

Get all delivery attributes for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -25,25 +45,30 @@ DeliveryAttributeListResult getDeliveryAttributes( String resourceGroupName, String topicName, String eventSubscriptionName); /** - * Get all delivery attributes for an event subscription for topic. + * Get an event subscription of a topic. + * + *

Get properties of an event subscription of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param topicName Name of the topic. + * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between + * 3 and 100 characters in length and use alphanumeric letters only. * @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 all delivery attributes for an event subscription for topic along with {@link Response}. + * @return properties of an event subscription of a topic along with {@link Response}. */ - Response getDeliveryAttributesWithResponse( + Response getWithResponse( String resourceGroupName, String topicName, String eventSubscriptionName, Context context); /** - * Get properties of an event subscription of a topic. + * Get an event subscription of a topic. + * + *

Get properties of an event subscription of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the partner topic. + * @param topicName Name of the topic. * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between * 3 and 100 characters in length and use alphanumeric letters only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,23 +79,53 @@ Response getDeliveryAttributesWithResponse( EventSubscription get(String resourceGroupName, String topicName, String eventSubscriptionName); /** - * Get properties of an event subscription of a topic. + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the partner topic. - * @param eventSubscriptionName Name of the event subscription to be found. Event subscription names must be between - * 3 and 100 characters in length and use alphanumeric letters only. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. + * @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 event Subscription. + */ + EventSubscription createOrUpdate( + String resourceGroupName, + String topicName, + String eventSubscriptionName, + EventSubscriptionInner eventSubscriptionInfo); + + /** + * Create or update an event subscription to a topic. + * + *

Asynchronously creates a new event subscription or updates an existing event subscription. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription to be created. Event subscription names must be + * between 3 and 100 characters in length and use alphanumeric letters only. + * @param eventSubscriptionInfo Event subscription properties containing the destination and filter information. * @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 properties of an event subscription of a topic along with {@link Response}. + * @return event Subscription. */ - Response getWithResponse( - String resourceGroupName, String topicName, String eventSubscriptionName, Context context); + EventSubscription createOrUpdate( + String resourceGroupName, + String topicName, + String eventSubscriptionName, + EventSubscriptionInner eventSubscriptionInfo, + Context context); /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -83,7 +138,9 @@ Response getWithResponse( void delete(String resourceGroupName, String topicName, String eventSubscriptionName); /** - * Delete an existing event subscription for a topic. + * Delete an event subscription for a topic. + * + *

Delete an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -97,20 +154,51 @@ Response getWithResponse( void delete(String resourceGroupName, String topicName, String eventSubscriptionName, Context context); /** - * Get the full endpoint URL for an event subscription for topic. + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. - * @param topicName Name of the domain topic. - * @param eventSubscriptionName Name of the event subscription. + * @param topicName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionUpdateParameters Updated event subscription information. * @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 full endpoint URL for an event subscription for topic. + * @return event Subscription. */ - EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String topicName, String eventSubscriptionName); + EventSubscription update( + String resourceGroupName, + String topicName, + String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters); + + /** + * Update an event subscription for a topic. + * + *

Update an existing event subscription for a topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the domain. + * @param eventSubscriptionName Name of the event subscription to be updated. + * @param eventSubscriptionUpdateParameters Updated event subscription information. + * @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 event Subscription. + */ + EventSubscription update( + String resourceGroupName, + String topicName, + String eventSubscriptionName, + EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, + Context context); /** - * Get the full endpoint URL for an event subscription for topic. + * Get full URL of an event subscription for topic. + * + *

Get the full endpoint URL for an event subscription for topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the domain topic. @@ -125,7 +213,24 @@ Response getFullUrlWithResponse( String resourceGroupName, String topicName, String eventSubscriptionName, Context context); /** - * List all event subscriptions that have been created for a specific topic. + * Get full URL of an event subscription for topic. + * + *

Get the full endpoint URL for an event subscription for topic. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param topicName Name of the domain topic. + * @param eventSubscriptionName Name of the event subscription. + * @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 full endpoint URL for an event subscription for topic. + */ + EventSubscriptionFullUrl getFullUrl(String resourceGroupName, String topicName, String eventSubscriptionName); + + /** + * List all event subscriptions for a specific topic. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -137,7 +242,9 @@ Response getFullUrlWithResponse( PagedIterable list(String resourceGroupName, String topicName); /** - * List all event subscriptions that have been created for a specific topic. + * List all event subscriptions for a specific topic. + * + *

List all event subscriptions that have been created for a specific topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -157,56 +264,4 @@ Response getFullUrlWithResponse( */ PagedIterable list( String resourceGroupName, String topicName, String filter, Integer top, Context context); - - /** - * Get properties of an event subscription of a topic. - * - * @param id the resource ID. - * @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 properties of an event subscription of a topic along with {@link Response}. - */ - EventSubscription getById(String id); - - /** - * Get properties of an event subscription of a topic. - * - * @param id the resource ID. - * @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 properties of an event subscription of a topic along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete an existing event subscription for a topic. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete an existing event subscription for a topic. - * - * @param id the resource ID. - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EventSubscription resource. - * - * @param name resource name. - * @return the first stage of the new EventSubscription definition. - */ - EventSubscription.DefinitionStages.Blank define(String name); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicProvisioningState.java index 912bdf60f06c..7e2e7cb843e4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TopicProvisioningState. */ +/** Provisioning state of the topic. */ public final class TopicProvisioningState extends ExpandableStringEnum { /** Static value Creating for TopicProvisioningState. */ public static final TopicProvisioningState CREATING = fromString("Creating"); @@ -28,6 +28,15 @@ public final class TopicProvisioningState extends ExpandableStringEnum topicTemplates(); + + /** + * Gets the provisioningState property: Provisioning state of the TopicSpace resource. + * + * @return the provisioningState value. + */ + TopicSpaceProvisioningState provisioningState(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceInner object. + * + * @return the inner object. + */ + TopicSpaceInner innerModel(); + + /** The entirety of the TopicSpace definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The TopicSpace definition stages. */ + interface DefinitionStages { + /** The first stage of the TopicSpace definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the TopicSpace definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, namespaceName. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @return the next definition stage. + */ + WithCreate withExistingNamespace(String resourceGroupName, String namespaceName); + } + /** + * The stage of the TopicSpace definition which contains all the minimum required properties for the resource to + * be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithDescription, DefinitionStages.WithTopicTemplates { + /** + * Executes the create request. + * + * @return the created resource. + */ + TopicSpace create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + TopicSpace create(Context context); + } + /** The stage of the TopicSpace definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: Description for the Topic Space resource.. + * + * @param description Description for the Topic Space resource. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the TopicSpace definition allowing to specify topicTemplates. */ + interface WithTopicTemplates { + /** + * Specifies the topicTemplates property: The topic filters in the topic space. Example: "topicTemplates": [ + * "devices/foo/bar", "devices/topic1/+", "devices/${principal.name}/${principal.attributes.keyName}" ].. + * + * @param topicTemplates The topic filters in the topic space. Example: "topicTemplates": [ + * "devices/foo/bar", "devices/topic1/+", "devices/${principal.name}/${principal.attributes.keyName}" ]. + * @return the next definition stage. + */ + WithCreate withTopicTemplates(List topicTemplates); + } + } + /** + * Begins update for the TopicSpace resource. + * + * @return the stage of resource update. + */ + TopicSpace.Update update(); + + /** The template for TopicSpace update. */ + interface Update extends UpdateStages.WithDescription, UpdateStages.WithTopicTemplates { + /** + * Executes the update request. + * + * @return the updated resource. + */ + TopicSpace apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + TopicSpace apply(Context context); + } + /** The TopicSpace update stages. */ + interface UpdateStages { + /** The stage of the TopicSpace update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: Description for the Topic Space resource.. + * + * @param description Description for the Topic Space resource. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the TopicSpace update allowing to specify topicTemplates. */ + interface WithTopicTemplates { + /** + * Specifies the topicTemplates property: The topic filters in the topic space. Example: "topicTemplates": [ + * "devices/foo/bar", "devices/topic1/+", "devices/${principal.name}/${principal.attributes.keyName}" ].. + * + * @param topicTemplates The topic filters in the topic space. Example: "topicTemplates": [ + * "devices/foo/bar", "devices/topic1/+", "devices/${principal.name}/${principal.attributes.keyName}" ]. + * @return the next definition stage. + */ + Update withTopicTemplates(List topicTemplates); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + TopicSpace refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + TopicSpace refresh(Context context); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaceProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaceProvisioningState.java new file mode 100644 index 000000000000..5dd36235a71e --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaceProvisioningState.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Provisioning state of the TopicSpace resource. */ +public final class TopicSpaceProvisioningState extends ExpandableStringEnum { + /** Static value Creating for TopicSpaceProvisioningState. */ + public static final TopicSpaceProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for TopicSpaceProvisioningState. */ + public static final TopicSpaceProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for TopicSpaceProvisioningState. */ + public static final TopicSpaceProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for TopicSpaceProvisioningState. */ + public static final TopicSpaceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for TopicSpaceProvisioningState. */ + public static final TopicSpaceProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Failed for TopicSpaceProvisioningState. */ + public static final TopicSpaceProvisioningState FAILED = fromString("Failed"); + + /** Static value Deleted for TopicSpaceProvisioningState. */ + public static final TopicSpaceProvisioningState DELETED = fromString("Deleted"); + + /** + * Creates a new instance of TopicSpaceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TopicSpaceProvisioningState() { + } + + /** + * Creates or finds a TopicSpaceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding TopicSpaceProvisioningState. + */ + @JsonCreator + public static TopicSpaceProvisioningState fromString(String name) { + return fromString(name, TopicSpaceProvisioningState.class); + } + + /** + * Gets known TopicSpaceProvisioningState values. + * + * @return known TopicSpaceProvisioningState values. + */ + public static Collection values() { + return values(TopicSpaceProvisioningState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaces.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaces.java new file mode 100644 index 000000000000..77e8f563cde2 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpaces.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of TopicSpaces. */ +public interface TopicSpaces { + /** + * Get a topic space. + * + *

Get properties of a topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 properties of a topic space along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String namespaceName, String topicSpaceName, Context context); + + /** + * Get a topic space. + * + *

Get properties of a topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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 properties of a topic space. + */ + TopicSpace get(String resourceGroupName, String namespaceName, String topicSpaceName); + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String topicSpaceName); + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param topicSpaceName Name of the Topic space. + * @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. + */ + void delete(String resourceGroupName, String namespaceName, String topicSpaceName, Context context); + + /** + * List all topic spaces under a namespace. + * + *

Get all the topic spaces under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @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 all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace(String resourceGroupName, String namespaceName); + + /** + * List all topic spaces under a namespace. + * + *

Get all the topic spaces under a namespace. + * + * @param resourceGroupName The name of the resource group within the user's subscription. + * @param namespaceName Name of the namespace. + * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the + * 'name' property only and with limited number of OData operations. These operations are: the 'contains' + * function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). + * No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, + * 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq + * 'westus'. + * @param top The number of results to return per page for the list operation. Valid range for top parameter is 1 to + * 100. If not specified, the default number of results to be returned is 20 items per page. + * @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 all the topic spaces under a namespace as paginated response with {@link PagedIterable}. + */ + PagedIterable listByNamespace( + String resourceGroupName, String namespaceName, String filter, Integer top, Context context); + + /** + * Get a topic space. + * + *

Get properties of a topic space. + * + * @param id the resource ID. + * @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 properties of a topic space along with {@link Response}. + */ + TopicSpace getById(String id); + + /** + * Get a topic space. + * + *

Get properties of a topic space. + * + * @param id the resource ID. + * @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 properties of a topic space along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param id the resource ID. + * @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. + */ + void deleteById(String id); + + /** + * Delete a topic space. + * + *

Delete an existing topic space. + * + * @param id the resource ID. + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new TopicSpace resource. + * + * @param name resource name. + * @return the first stage of the new TopicSpace definition. + */ + TopicSpace.DefinitionStages.Blank define(String name); +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfiguration.java new file mode 100644 index 000000000000..b8ef46f4fd09 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfiguration.java @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of the Topic Spaces Configuration. */ +@Fluent +public final class TopicSpacesConfiguration { + /* + * Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled. + */ + @JsonProperty(value = "state") + private TopicSpacesConfigurationState state; + + /* + * Fully qualified Azure Resource Id for the Event Grid Topic to which events will be routed to from TopicSpaces + * under a namespace. + * This property should be in the following format + * '/subscriptions/{subId}/resourcegroups/{resourceGroupName}/providers/microsoft.EventGrid/topics/{topicName}'. + * This topic should reside in the same region where namespace is located. + */ + @JsonProperty(value = "routeTopicResourceId") + private String routeTopicResourceId; + + /* + * The endpoint for the topic spaces configuration. This is a read-only property. + */ + @JsonProperty(value = "hostname", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; + + /* + * Routing enrichments for topic spaces configuration + */ + @JsonProperty(value = "routingEnrichments") + private RoutingEnrichments routingEnrichments; + + /* + * Client authentication settings for topic spaces configuration. + */ + @JsonProperty(value = "clientAuthentication") + private ClientAuthenticationSettings clientAuthentication; + + /* + * The maximum session expiry in hours. The property default value is 1 hour. + * Min allowed value is 1 hour and max allowed value is 8 hours. + */ + @JsonProperty(value = "maximumSessionExpiryInHours") + private Integer maximumSessionExpiryInHours; + + /* + * The maximum number of sessions per authentication name. The property default value is 1. + * Min allowed value is 1 and max allowed value is 100. + */ + @JsonProperty(value = "maximumClientSessionsPerAuthenticationName") + private Integer maximumClientSessionsPerAuthenticationName; + + /* + * Routing identity info for topic spaces configuration. + */ + @JsonProperty(value = "routingIdentityInfo") + private RoutingIdentityInfo routingIdentityInfo; + + /** Creates an instance of TopicSpacesConfiguration class. */ + public TopicSpacesConfiguration() { + } + + /** + * Get the state property: Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled. + * + * @return the state value. + */ + public TopicSpacesConfigurationState state() { + return this.state; + } + + /** + * Set the state property: Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled. + * + * @param state the state value to set. + * @return the TopicSpacesConfiguration object itself. + */ + public TopicSpacesConfiguration withState(TopicSpacesConfigurationState state) { + this.state = state; + return this; + } + + /** + * Get the routeTopicResourceId property: Fully qualified Azure Resource Id for the Event Grid Topic to which events + * will be routed to from TopicSpaces under a namespace. This property should be in the following format + * '/subscriptions/{subId}/resourcegroups/{resourceGroupName}/providers/microsoft.EventGrid/topics/{topicName}'. + * This topic should reside in the same region where namespace is located. + * + * @return the routeTopicResourceId value. + */ + public String routeTopicResourceId() { + return this.routeTopicResourceId; + } + + /** + * Set the routeTopicResourceId property: Fully qualified Azure Resource Id for the Event Grid Topic to which events + * will be routed to from TopicSpaces under a namespace. This property should be in the following format + * '/subscriptions/{subId}/resourcegroups/{resourceGroupName}/providers/microsoft.EventGrid/topics/{topicName}'. + * This topic should reside in the same region where namespace is located. + * + * @param routeTopicResourceId the routeTopicResourceId value to set. + * @return the TopicSpacesConfiguration object itself. + */ + public TopicSpacesConfiguration withRouteTopicResourceId(String routeTopicResourceId) { + this.routeTopicResourceId = routeTopicResourceId; + return this; + } + + /** + * Get the hostname property: The endpoint for the topic spaces configuration. This is a read-only property. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Get the routingEnrichments property: Routing enrichments for topic spaces configuration. + * + * @return the routingEnrichments value. + */ + public RoutingEnrichments routingEnrichments() { + return this.routingEnrichments; + } + + /** + * Set the routingEnrichments property: Routing enrichments for topic spaces configuration. + * + * @param routingEnrichments the routingEnrichments value to set. + * @return the TopicSpacesConfiguration object itself. + */ + public TopicSpacesConfiguration withRoutingEnrichments(RoutingEnrichments routingEnrichments) { + this.routingEnrichments = routingEnrichments; + return this; + } + + /** + * Get the clientAuthentication property: Client authentication settings for topic spaces configuration. + * + * @return the clientAuthentication value. + */ + public ClientAuthenticationSettings clientAuthentication() { + return this.clientAuthentication; + } + + /** + * Set the clientAuthentication property: Client authentication settings for topic spaces configuration. + * + * @param clientAuthentication the clientAuthentication value to set. + * @return the TopicSpacesConfiguration object itself. + */ + public TopicSpacesConfiguration withClientAuthentication(ClientAuthenticationSettings clientAuthentication) { + this.clientAuthentication = clientAuthentication; + return this; + } + + /** + * Get the maximumSessionExpiryInHours property: The maximum session expiry in hours. The property default value is + * 1 hour. Min allowed value is 1 hour and max allowed value is 8 hours. + * + * @return the maximumSessionExpiryInHours value. + */ + public Integer maximumSessionExpiryInHours() { + return this.maximumSessionExpiryInHours; + } + + /** + * Set the maximumSessionExpiryInHours property: The maximum session expiry in hours. The property default value is + * 1 hour. Min allowed value is 1 hour and max allowed value is 8 hours. + * + * @param maximumSessionExpiryInHours the maximumSessionExpiryInHours value to set. + * @return the TopicSpacesConfiguration object itself. + */ + public TopicSpacesConfiguration withMaximumSessionExpiryInHours(Integer maximumSessionExpiryInHours) { + this.maximumSessionExpiryInHours = maximumSessionExpiryInHours; + return this; + } + + /** + * Get the maximumClientSessionsPerAuthenticationName property: The maximum number of sessions per authentication + * name. The property default value is 1. Min allowed value is 1 and max allowed value is 100. + * + * @return the maximumClientSessionsPerAuthenticationName value. + */ + public Integer maximumClientSessionsPerAuthenticationName() { + return this.maximumClientSessionsPerAuthenticationName; + } + + /** + * Set the maximumClientSessionsPerAuthenticationName property: The maximum number of sessions per authentication + * name. The property default value is 1. Min allowed value is 1 and max allowed value is 100. + * + * @param maximumClientSessionsPerAuthenticationName the maximumClientSessionsPerAuthenticationName value to set. + * @return the TopicSpacesConfiguration object itself. + */ + public TopicSpacesConfiguration withMaximumClientSessionsPerAuthenticationName( + Integer maximumClientSessionsPerAuthenticationName) { + this.maximumClientSessionsPerAuthenticationName = maximumClientSessionsPerAuthenticationName; + return this; + } + + /** + * Get the routingIdentityInfo property: Routing identity info for topic spaces configuration. + * + * @return the routingIdentityInfo value. + */ + public RoutingIdentityInfo routingIdentityInfo() { + return this.routingIdentityInfo; + } + + /** + * Set the routingIdentityInfo property: Routing identity info for topic spaces configuration. + * + * @param routingIdentityInfo the routingIdentityInfo value to set. + * @return the TopicSpacesConfiguration object itself. + */ + public TopicSpacesConfiguration withRoutingIdentityInfo(RoutingIdentityInfo routingIdentityInfo) { + this.routingIdentityInfo = routingIdentityInfo; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (routingEnrichments() != null) { + routingEnrichments().validate(); + } + if (clientAuthentication() != null) { + clientAuthentication().validate(); + } + if (routingIdentityInfo() != null) { + routingIdentityInfo().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfigurationState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfigurationState.java new file mode 100644 index 000000000000..a6c4a719085c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesConfigurationState.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled. */ +public final class TopicSpacesConfigurationState extends ExpandableStringEnum { + /** Static value Disabled for TopicSpacesConfigurationState. */ + public static final TopicSpacesConfigurationState DISABLED = fromString("Disabled"); + + /** Static value Enabled for TopicSpacesConfigurationState. */ + public static final TopicSpacesConfigurationState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of TopicSpacesConfigurationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TopicSpacesConfigurationState() { + } + + /** + * Creates or finds a TopicSpacesConfigurationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding TopicSpacesConfigurationState. + */ + @JsonCreator + public static TopicSpacesConfigurationState fromString(String name) { + return fromString(name, TopicSpacesConfigurationState.class); + } + + /** + * Gets known TopicSpacesConfigurationState values. + * + * @return known TopicSpacesConfigurationState values. + */ + public static Collection values() { + return values(TopicSpacesConfigurationState.class); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesListResult.java new file mode 100644 index 000000000000..e411d052b0b9 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicSpacesListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.TopicSpaceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Result of the List Topic Space operation. */ +@Fluent +public final class TopicSpacesListResult { + /* + * A collection of Topic Space. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link for the next page of Topic Space. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of TopicSpacesListResult class. */ + public TopicSpacesListResult() { + } + + /** + * Get the value property: A collection of Topic Space. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of Topic Space. + * + * @param value the value value to set. + * @return the TopicSpacesListResult object itself. + */ + public TopicSpacesListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link for the next page of Topic Space. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link for the next page of Topic Space. + * + * @param nextLink the nextLink value to set. + * @return the TopicSpacesListResult object itself. + */ + public TopicSpacesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeInfo.java index ac988a1d2911..1792d0c6cc69 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeInfo.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeInfo.java @@ -86,6 +86,14 @@ public interface TopicTypeInfo { */ List supportedScopesForSource(); + /** + * Gets the areRegionalAndGlobalSourcesSupported property: Flag to indicate that a topic type can support both + * regional or global system topics. + * + * @return the areRegionalAndGlobalSourcesSupported value. + */ + Boolean areRegionalAndGlobalSourcesSupported(); + /** * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.TopicTypeInfoInner object. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeProvisioningState.java index ae406c5b1571..58ab962613fb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypeProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TopicTypeProvisioningState. */ +/** Provisioning state of the topic type. */ public final class TopicTypeProvisioningState extends ExpandableStringEnum { /** Static value Creating for TopicTypeProvisioningState. */ public static final TopicTypeProvisioningState CREATING = fromString("Creating"); @@ -28,6 +28,15 @@ public final class TopicTypeProvisioningState extends ExpandableStringEnumList all registered topic types. * * @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. @@ -20,7 +22,9 @@ public interface TopicTypes { PagedIterable list(); /** - * List all registered topic types. + * List topic types. + * + *

List all registered topic types. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,30 +35,36 @@ public interface TopicTypes { PagedIterable list(Context context); /** - * Get information about a topic type. + * Get a topic type. + * + *

Get information about a topic type. * * @param topicTypeName Name of the topic type. + * @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 information about a topic type. + * @return information about a topic type along with {@link Response}. */ - TopicTypeInfo get(String topicTypeName); + Response getWithResponse(String topicTypeName, Context context); /** - * Get information about a topic type. + * Get a topic type. + * + *

Get information about a topic type. * * @param topicTypeName Name of the topic type. - * @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 information about a topic type along with {@link Response}. + * @return information about a topic type. */ - Response getWithResponse(String topicTypeName, Context context); + TopicTypeInfo get(String topicTypeName); /** - * List event types for a topic type. + * List event types. + * + *

List event types for a topic type. * * @param topicTypeName Name of the topic type. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,7 +75,9 @@ public interface TopicTypes { PagedIterable listEventTypes(String topicTypeName); /** - * List event types for a topic type. + * List event types. + * + *

List event types for a topic type. * * @param topicTypeName Name of the topic type. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypesListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypesListResult.java index 796ab401e98f..b5c308951b25 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypesListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicTypesListResult.java @@ -18,6 +18,10 @@ public final class TopicTypesListResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of TopicTypesListResult class. */ + public TopicTypesListResult() { + } + /** * Get the value property: A collection of topic types. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicUpdateParameters.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicUpdateParameters.java index a37026799b3b..4309b05c0e66 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicUpdateParameters.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicUpdateParameters.java @@ -33,6 +33,16 @@ public final class TopicUpdateParameters { @JsonProperty(value = "properties") private TopicUpdateParameterProperties innerProperties; + /* + * The Sku pricing tier for the topic. + */ + @JsonProperty(value = "sku") + private ResourceSku sku; + + /** Creates an instance of TopicUpdateParameters class. */ + public TopicUpdateParameters() { + } + /** * Get the tags property: Tags of the Topic resource. * @@ -82,6 +92,26 @@ private TopicUpdateParameterProperties innerProperties() { return this.innerProperties; } + /** + * Get the sku property: The Sku pricing tier for the topic. + * + * @return the sku value. + */ + public ResourceSku sku() { + return this.sku; + } + + /** + * Set the sku property: The Sku pricing tier for the topic. + * + * @param sku the sku value to set. + * @return the TopicUpdateParameters object itself. + */ + public TopicUpdateParameters withSku(ResourceSku sku) { + this.sku = sku; + return this; + } + /** * Get the publicNetworkAccess property: This determines if traffic is allowed over public network. By default it is * enabled. You can further restrict to specific IPs by configuring <seealso @@ -136,6 +166,31 @@ public TopicUpdateParameters withInboundIpRules(List inboundIpRul return this; } + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.innerProperties() == null ? null : this.innerProperties().minimumTlsVersionAllowed(); + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version of the publisher allowed to publish to this + * domain. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the TopicUpdateParameters object itself. + */ + public TopicUpdateParameters withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + if (this.innerProperties() == null) { + this.innerProperties = new TopicUpdateParameterProperties(); + } + this.innerProperties().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + /** * Get the disableLocalAuth property: This boolean is used to enable or disable local auth. Default value is false. * When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to @@ -186,6 +241,29 @@ public TopicUpdateParameters withDataResidencyBoundary(DataResidencyBoundary dat return this; } + /** + * Get the eventTypeInfo property: The eventTypeInfo for the topic. + * + * @return the eventTypeInfo value. + */ + public EventTypeInfo eventTypeInfo() { + return this.innerProperties() == null ? null : this.innerProperties().eventTypeInfo(); + } + + /** + * Set the eventTypeInfo property: The eventTypeInfo for the topic. + * + * @param eventTypeInfo the eventTypeInfo value to set. + * @return the TopicUpdateParameters object itself. + */ + public TopicUpdateParameters withEventTypeInfo(EventTypeInfo eventTypeInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new TopicUpdateParameterProperties(); + } + this.innerProperties().withEventTypeInfo(eventTypeInfo); + return this; + } + /** * Validates the instance. * @@ -198,5 +276,8 @@ public void validate() { if (innerProperties() != null) { innerProperties().validate(); } + if (sku() != null) { + sku().validate(); + } } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topics.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topics.java index ea31e77dacfb..6660026d993f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topics.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Topics.java @@ -11,32 +11,38 @@ /** Resource collection API of Topics. */ public interface Topics { /** - * Get properties of a topic. + * Get a topic. + * + *

Get properties of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. + * @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 properties of a topic. + * @return properties of a topic along with {@link Response}. */ - Topic getByResourceGroup(String resourceGroupName, String topicName); + Response getByResourceGroupWithResponse(String resourceGroupName, String topicName, Context context); /** - * Get properties of a topic. + * Get a topic. + * + *

Get properties of a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. - * @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 properties of a topic along with {@link Response}. + * @return properties of a topic. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String topicName, Context context); + Topic getByResourceGroup(String resourceGroupName, String topicName); /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -47,7 +53,9 @@ public interface Topics { void deleteByResourceGroup(String resourceGroupName, String topicName); /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -59,7 +67,9 @@ public interface Topics { void delete(String resourceGroupName, String topicName, Context context); /** - * List all the topics under an Azure subscription. + * List topics under an Azure subscription. + * + *

List all the topics under an Azure subscription. * * @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. @@ -68,7 +78,9 @@ public interface Topics { PagedIterable list(); /** - * List all the topics under an Azure subscription. + * List topics under an Azure subscription. + * + *

List all the topics under an Azure subscription. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' @@ -87,7 +99,9 @@ public interface Topics { PagedIterable list(String filter, Integer top, Context context); /** - * List all the topics under a resource group. + * List topics under a resource group. + * + *

List all the topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,7 +112,9 @@ public interface Topics { PagedIterable listByResourceGroup(String resourceGroupName); /** - * List all the topics under a resource group. + * List topics under a resource group. + * + *

List all the topics under a resource group. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the @@ -118,33 +134,39 @@ public interface Topics { PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer top, Context context); /** - * List the two keys used to publish to a topic. + * List keys for a topic. + * + *

List the two keys used to publish to a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. + * @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 shared access keys of the Topic. + * @return shared access keys of the Topic along with {@link Response}. */ - TopicSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String topicName); + Response listSharedAccessKeysWithResponse( + String resourceGroupName, String topicName, Context context); /** - * List the two keys used to publish to a topic. + * List keys for a topic. + * + *

List the two keys used to publish to a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. - * @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 shared access keys of the Topic along with {@link Response}. + * @return shared access keys of the Topic. */ - Response listSharedAccessKeysWithResponse( - String resourceGroupName, String topicName, Context context); + TopicSharedAccessKeys listSharedAccessKeys(String resourceGroupName, String topicName); /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -158,7 +180,9 @@ TopicSharedAccessKeys regenerateKey( String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest); /** - * Regenerate a shared access key for a topic. + * Regenerate key for a topic. + * + *

Regenerate a shared access key for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. @@ -173,7 +197,9 @@ TopicSharedAccessKeys regenerateKey( String resourceGroupName, String topicName, TopicRegenerateKeyRequest regenerateKeyRequest, Context context); /** - * List event types for a topic. + * List topic event types. + * + *

List event types for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -188,7 +214,9 @@ PagedIterable listEventTypes( String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName); /** - * List event types for a topic. + * List topic event types. + * + *

List event types for a topic. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param providerNamespace Namespace of the provider of the topic. @@ -208,7 +236,9 @@ PagedIterable listEventTypes( Context context); /** - * Get properties of a topic. + * Get a topic. + * + *

Get properties of a topic. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -219,7 +249,9 @@ PagedIterable listEventTypes( Topic getById(String id); /** - * Get properties of a topic. + * Get a topic. + * + *

Get properties of a topic. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -231,7 +263,9 @@ PagedIterable listEventTypes( Response getByIdWithResponse(String id, Context context); /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -241,7 +275,9 @@ PagedIterable listEventTypes( void deleteById(String id); /** - * Delete existing topic. + * Delete a topic. + * + *

Delete existing topic. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsConfiguration.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsConfiguration.java new file mode 100644 index 000000000000..8e67e3e49cb9 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsConfiguration.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of the Topics Configuration. */ +@Immutable +public final class TopicsConfiguration { + /* + * The hostname for the topics configuration. This is a read-only property. + */ + @JsonProperty(value = "hostname", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; + + /** Creates an instance of TopicsConfiguration class. */ + public TopicsConfiguration() { + } + + /** + * Get the hostname property: The hostname for the topics configuration. This is a read-only property. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsListResult.java index 0afb08cd8b9d..6055857ac78c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/TopicsListResult.java @@ -24,6 +24,10 @@ public final class TopicsListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of TopicsListResult class. */ + public TopicsListResult() { + } + /** * Get the value property: A collection of Topics. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicSpacesConfigurationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicSpacesConfigurationInfo.java new file mode 100644 index 000000000000..0ba361c65e48 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UpdateTopicSpacesConfigurationInfo.java @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of the topic spaces configuration info of a namespace. */ +@Fluent +public final class UpdateTopicSpacesConfigurationInfo { + /* + * Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled. + */ + @JsonProperty(value = "state") + private TopicSpacesConfigurationState state; + + /* + * This property is used to specify custom topic to which events will be routed to from topic spaces configuration + * under namespace. + */ + @JsonProperty(value = "routeTopicResourceId") + private String routeTopicResourceId; + + /* + * Routing enrichments for topic spaces configuration. + */ + @JsonProperty(value = "routingEnrichments") + private RoutingEnrichments routingEnrichments; + + /* + * Client authentication settings for topic spaces configuration. + */ + @JsonProperty(value = "clientAuthentication") + private ClientAuthenticationSettings clientAuthentication; + + /* + * The maximum session expiry in hours. The property default value is 1 hour. + * Min allowed value is 1 hour and max allowed value is 8 hours. + */ + @JsonProperty(value = "maximumSessionExpiryInHours") + private Integer maximumSessionExpiryInHours; + + /* + * The maximum number of sessions per authentication name. The property default value is 1. + * Min allowed value is 1 and max allowed value is 100. + */ + @JsonProperty(value = "maximumClientSessionsPerAuthenticationName") + private Integer maximumClientSessionsPerAuthenticationName; + + /* + * Routing identity info for topic spaces configuration. + */ + @JsonProperty(value = "routingIdentityInfo") + private RoutingIdentityInfo routingIdentityInfo; + + /** Creates an instance of UpdateTopicSpacesConfigurationInfo class. */ + public UpdateTopicSpacesConfigurationInfo() { + } + + /** + * Get the state property: Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled. + * + * @return the state value. + */ + public TopicSpacesConfigurationState state() { + return this.state; + } + + /** + * Set the state property: Indicate if Topic Spaces Configuration is enabled for the namespace. Default is Disabled. + * + * @param state the state value to set. + * @return the UpdateTopicSpacesConfigurationInfo object itself. + */ + public UpdateTopicSpacesConfigurationInfo withState(TopicSpacesConfigurationState state) { + this.state = state; + return this; + } + + /** + * Get the routeTopicResourceId property: This property is used to specify custom topic to which events will be + * routed to from topic spaces configuration under namespace. + * + * @return the routeTopicResourceId value. + */ + public String routeTopicResourceId() { + return this.routeTopicResourceId; + } + + /** + * Set the routeTopicResourceId property: This property is used to specify custom topic to which events will be + * routed to from topic spaces configuration under namespace. + * + * @param routeTopicResourceId the routeTopicResourceId value to set. + * @return the UpdateTopicSpacesConfigurationInfo object itself. + */ + public UpdateTopicSpacesConfigurationInfo withRouteTopicResourceId(String routeTopicResourceId) { + this.routeTopicResourceId = routeTopicResourceId; + return this; + } + + /** + * Get the routingEnrichments property: Routing enrichments for topic spaces configuration. + * + * @return the routingEnrichments value. + */ + public RoutingEnrichments routingEnrichments() { + return this.routingEnrichments; + } + + /** + * Set the routingEnrichments property: Routing enrichments for topic spaces configuration. + * + * @param routingEnrichments the routingEnrichments value to set. + * @return the UpdateTopicSpacesConfigurationInfo object itself. + */ + public UpdateTopicSpacesConfigurationInfo withRoutingEnrichments(RoutingEnrichments routingEnrichments) { + this.routingEnrichments = routingEnrichments; + return this; + } + + /** + * Get the clientAuthentication property: Client authentication settings for topic spaces configuration. + * + * @return the clientAuthentication value. + */ + public ClientAuthenticationSettings clientAuthentication() { + return this.clientAuthentication; + } + + /** + * Set the clientAuthentication property: Client authentication settings for topic spaces configuration. + * + * @param clientAuthentication the clientAuthentication value to set. + * @return the UpdateTopicSpacesConfigurationInfo object itself. + */ + public UpdateTopicSpacesConfigurationInfo withClientAuthentication( + ClientAuthenticationSettings clientAuthentication) { + this.clientAuthentication = clientAuthentication; + return this; + } + + /** + * Get the maximumSessionExpiryInHours property: The maximum session expiry in hours. The property default value is + * 1 hour. Min allowed value is 1 hour and max allowed value is 8 hours. + * + * @return the maximumSessionExpiryInHours value. + */ + public Integer maximumSessionExpiryInHours() { + return this.maximumSessionExpiryInHours; + } + + /** + * Set the maximumSessionExpiryInHours property: The maximum session expiry in hours. The property default value is + * 1 hour. Min allowed value is 1 hour and max allowed value is 8 hours. + * + * @param maximumSessionExpiryInHours the maximumSessionExpiryInHours value to set. + * @return the UpdateTopicSpacesConfigurationInfo object itself. + */ + public UpdateTopicSpacesConfigurationInfo withMaximumSessionExpiryInHours(Integer maximumSessionExpiryInHours) { + this.maximumSessionExpiryInHours = maximumSessionExpiryInHours; + return this; + } + + /** + * Get the maximumClientSessionsPerAuthenticationName property: The maximum number of sessions per authentication + * name. The property default value is 1. Min allowed value is 1 and max allowed value is 100. + * + * @return the maximumClientSessionsPerAuthenticationName value. + */ + public Integer maximumClientSessionsPerAuthenticationName() { + return this.maximumClientSessionsPerAuthenticationName; + } + + /** + * Set the maximumClientSessionsPerAuthenticationName property: The maximum number of sessions per authentication + * name. The property default value is 1. Min allowed value is 1 and max allowed value is 100. + * + * @param maximumClientSessionsPerAuthenticationName the maximumClientSessionsPerAuthenticationName value to set. + * @return the UpdateTopicSpacesConfigurationInfo object itself. + */ + public UpdateTopicSpacesConfigurationInfo withMaximumClientSessionsPerAuthenticationName( + Integer maximumClientSessionsPerAuthenticationName) { + this.maximumClientSessionsPerAuthenticationName = maximumClientSessionsPerAuthenticationName; + return this; + } + + /** + * Get the routingIdentityInfo property: Routing identity info for topic spaces configuration. + * + * @return the routingIdentityInfo value. + */ + public RoutingIdentityInfo routingIdentityInfo() { + return this.routingIdentityInfo; + } + + /** + * Set the routingIdentityInfo property: Routing identity info for topic spaces configuration. + * + * @param routingIdentityInfo the routingIdentityInfo value to set. + * @return the UpdateTopicSpacesConfigurationInfo object itself. + */ + public UpdateTopicSpacesConfigurationInfo withRoutingIdentityInfo(RoutingIdentityInfo routingIdentityInfo) { + this.routingIdentityInfo = routingIdentityInfo; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (routingEnrichments() != null) { + routingEnrichments().validate(); + } + if (clientAuthentication() != null) { + clientAuthentication().validate(); + } + if (routingIdentityInfo() != null) { + routingIdentityInfo().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UserIdentityProperties.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UserIdentityProperties.java index fb0774156220..f0339c0a2787 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UserIdentityProperties.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/UserIdentityProperties.java @@ -22,6 +22,10 @@ public final class UserIdentityProperties { @JsonProperty(value = "clientId") private String clientId; + /** Creates an instance of UserIdentityProperties class. */ + public UserIdentityProperties() { + } + /** * Get the principalId property: The principal id of user assigned identity. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartner.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartner.java index 78f319345818..16c2d96e1b9d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartner.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartner.java @@ -66,6 +66,13 @@ public interface VerifiedPartner { */ PartnerDetails partnerTopicDetails(); + /** + * Gets the partnerDestinationDetails property: Details of the partner destination scenario. + * + * @return the partnerDestinationDetails value. + */ + PartnerDetails partnerDestinationDetails(); + /** * Gets the provisioningState property: Provisioning state of the verified partner. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnerProvisioningState.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnerProvisioningState.java index 64d48f03fcc9..800ad603238b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnerProvisioningState.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnerProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VerifiedPartnerProvisioningState. */ +/** Provisioning state of the verified partner. */ public final class VerifiedPartnerProvisioningState extends ExpandableStringEnum { /** Static value Creating for VerifiedPartnerProvisioningState. */ public static final VerifiedPartnerProvisioningState CREATING = fromString("Creating"); @@ -28,6 +28,15 @@ public final class VerifiedPartnerProvisioningState extends ExpandableStringEnum /** Static value Failed for VerifiedPartnerProvisioningState. */ public static final VerifiedPartnerProvisioningState FAILED = fromString("Failed"); + /** + * Creates a new instance of VerifiedPartnerProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VerifiedPartnerProvisioningState() { + } + /** * Creates or finds a VerifiedPartnerProvisioningState from its string representation. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartners.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartners.java index 44ace74eb65d..3f0fe090b686 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartners.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartners.java @@ -11,30 +11,36 @@ /** Resource collection API of VerifiedPartners. */ public interface VerifiedPartners { /** - * Get properties of a verified partner. + * Get a verified partner. + * + *

Get properties of a verified partner. * * @param verifiedPartnerName Name of the verified partner. + * @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 properties of a verified partner. + * @return properties of a verified partner along with {@link Response}. */ - VerifiedPartner get(String verifiedPartnerName); + Response getWithResponse(String verifiedPartnerName, Context context); /** - * Get properties of a verified partner. + * Get a verified partner. + * + *

Get properties of a verified partner. * * @param verifiedPartnerName Name of the verified partner. - * @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 properties of a verified partner along with {@link Response}. + * @return properties of a verified partner. */ - Response getWithResponse(String verifiedPartnerName, Context context); + VerifiedPartner get(String verifiedPartnerName); /** - * Get a list of all verified partners. + * List all verified partners. + * + *

Get a list of all verified partners. * * @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. @@ -43,7 +49,9 @@ public interface VerifiedPartners { PagedIterable list(); /** - * Get a list of all verified partners. + * List all verified partners. + * + *

Get a list of all verified partners. * * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited number of OData operations. These operations are: the 'contains' diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnersListResult.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnersListResult.java index 0117a8856119..caec6ac17ca6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnersListResult.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/VerifiedPartnersListResult.java @@ -24,6 +24,10 @@ public final class VerifiedPartnersListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of VerifiedPartnersListResult class. */ + public VerifiedPartnersListResult() { + } + /** * Get the value property: A collection of verified partners. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookEventSubscriptionDestination.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookEventSubscriptionDestination.java index ef48fc8958a1..40ca3af51099 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookEventSubscriptionDestination.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookEventSubscriptionDestination.java @@ -22,6 +22,10 @@ public final class WebhookEventSubscriptionDestination extends EventSubscription @JsonProperty(value = "properties") private WebhookEventSubscriptionDestinationProperties innerProperties; + /** Creates an instance of WebhookEventSubscriptionDestination class. */ + public WebhookEventSubscriptionDestination() { + } + /** * Get the innerProperties property: WebHook Properties of the event subscription destination. * @@ -186,6 +190,29 @@ public WebhookEventSubscriptionDestination withDeliveryAttributeMappings( return this; } + /** + * Get the minimumTlsVersionAllowed property: Minimum TLS version that should be supported by webhook endpoint. + * + * @return the minimumTlsVersionAllowed value. + */ + public TlsVersion minimumTlsVersionAllowed() { + return this.innerProperties() == null ? null : this.innerProperties().minimumTlsVersionAllowed(); + } + + /** + * Set the minimumTlsVersionAllowed property: Minimum TLS version that should be supported by webhook endpoint. + * + * @param minimumTlsVersionAllowed the minimumTlsVersionAllowed value to set. + * @return the WebhookEventSubscriptionDestination object itself. + */ + public WebhookEventSubscriptionDestination withMinimumTlsVersionAllowed(TlsVersion minimumTlsVersionAllowed) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookEventSubscriptionDestinationProperties(); + } + this.innerProperties().withMinimumTlsVersionAllowed(minimumTlsVersionAllowed); + return this; + } + /** * Validates the instance. * diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookPartnerDestinationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookPartnerDestinationInfo.java new file mode 100644 index 000000000000..6fd3a7b90058 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookPartnerDestinationInfo.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.WebhookPartnerDestinationProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** Information about the WebHook of the partner destination. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("WebHook") +@Fluent +public final class WebhookPartnerDestinationInfo extends PartnerDestinationInfo { + /* + * WebHook Properties of the partner destination. + */ + @JsonProperty(value = "properties") + private WebhookPartnerDestinationProperties innerProperties; + + /** Creates an instance of WebhookPartnerDestinationInfo class. */ + public WebhookPartnerDestinationInfo() { + } + + /** + * Get the innerProperties property: WebHook Properties of the partner destination. + * + * @return the innerProperties value. + */ + private WebhookPartnerDestinationProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public WebhookPartnerDestinationInfo withAzureSubscriptionId(String azureSubscriptionId) { + super.withAzureSubscriptionId(azureSubscriptionId); + return this; + } + + /** {@inheritDoc} */ + @Override + public WebhookPartnerDestinationInfo withResourceGroupName(String resourceGroupName) { + super.withResourceGroupName(resourceGroupName); + return this; + } + + /** {@inheritDoc} */ + @Override + public WebhookPartnerDestinationInfo withName(String name) { + super.withName(name); + return this; + } + + /** {@inheritDoc} */ + @Override + public WebhookPartnerDestinationInfo withEndpointServiceContext(String endpointServiceContext) { + super.withEndpointServiceContext(endpointServiceContext); + return this; + } + + /** {@inheritDoc} */ + @Override + public WebhookPartnerDestinationInfo withResourceMoveChangeHistory( + List resourceMoveChangeHistory) { + super.withResourceMoveChangeHistory(resourceMoveChangeHistory); + return this; + } + + /** + * Get the endpointUrl property: The URL that represents the endpoint of the partner destination. + * + * @return the endpointUrl value. + */ + public String endpointUrl() { + return this.innerProperties() == null ? null : this.innerProperties().endpointUrl(); + } + + /** + * Set the endpointUrl property: The URL that represents the endpoint of the partner destination. + * + * @param endpointUrl the endpointUrl value to set. + * @return the WebhookPartnerDestinationInfo object itself. + */ + public WebhookPartnerDestinationInfo withEndpointUrl(String endpointUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPartnerDestinationProperties(); + } + this.innerProperties().withEndpointUrl(endpointUrl); + return this; + } + + /** + * Get the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. + * + * @return the endpointBaseUrl value. + */ + public String endpointBaseUrl() { + return this.innerProperties() == null ? null : this.innerProperties().endpointBaseUrl(); + } + + /** + * Set the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. + * + * @param endpointBaseUrl the endpointBaseUrl value to set. + * @return the WebhookPartnerDestinationInfo object itself. + */ + public WebhookPartnerDestinationInfo withEndpointBaseUrl(String endpointBaseUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPartnerDestinationProperties(); + } + this.innerProperties().withEndpointBaseUrl(endpointBaseUrl); + return this; + } + + /** + * Get the clientAuthentication property: Partner client authentication. + * + * @return the clientAuthentication value. + */ + public PartnerClientAuthentication clientAuthentication() { + return this.innerProperties() == null ? null : this.innerProperties().clientAuthentication(); + } + + /** + * Set the clientAuthentication property: Partner client authentication. + * + * @param clientAuthentication the clientAuthentication value to set. + * @return the WebhookPartnerDestinationInfo object itself. + */ + public WebhookPartnerDestinationInfo withClientAuthentication(PartnerClientAuthentication clientAuthentication) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPartnerDestinationProperties(); + } + this.innerProperties().withClientAuthentication(clientAuthentication); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookUpdatePartnerDestinationInfo.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookUpdatePartnerDestinationInfo.java new file mode 100644 index 000000000000..c85b679d96f5 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/WebhookUpdatePartnerDestinationInfo.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.eventgrid.fluent.models.WebhookPartnerDestinationProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Information about the update of the WebHook of the partner destination. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("WebHook") +@Fluent +public final class WebhookUpdatePartnerDestinationInfo extends PartnerUpdateDestinationInfo { + /* + * WebHook Properties of the partner destination. + */ + @JsonProperty(value = "properties") + private WebhookPartnerDestinationProperties innerProperties; + + /** Creates an instance of WebhookUpdatePartnerDestinationInfo class. */ + public WebhookUpdatePartnerDestinationInfo() { + } + + /** + * Get the innerProperties property: WebHook Properties of the partner destination. + * + * @return the innerProperties value. + */ + private WebhookPartnerDestinationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the endpointUrl property: The URL that represents the endpoint of the partner destination. + * + * @return the endpointUrl value. + */ + public String endpointUrl() { + return this.innerProperties() == null ? null : this.innerProperties().endpointUrl(); + } + + /** + * Set the endpointUrl property: The URL that represents the endpoint of the partner destination. + * + * @param endpointUrl the endpointUrl value to set. + * @return the WebhookUpdatePartnerDestinationInfo object itself. + */ + public WebhookUpdatePartnerDestinationInfo withEndpointUrl(String endpointUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPartnerDestinationProperties(); + } + this.innerProperties().withEndpointUrl(endpointUrl); + return this; + } + + /** + * Get the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. + * + * @return the endpointBaseUrl value. + */ + public String endpointBaseUrl() { + return this.innerProperties() == null ? null : this.innerProperties().endpointBaseUrl(); + } + + /** + * Set the endpointBaseUrl property: The base URL that represents the endpoint of the partner destination. + * + * @param endpointBaseUrl the endpointBaseUrl value to set. + * @return the WebhookUpdatePartnerDestinationInfo object itself. + */ + public WebhookUpdatePartnerDestinationInfo withEndpointBaseUrl(String endpointBaseUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPartnerDestinationProperties(); + } + this.innerProperties().withEndpointBaseUrl(endpointBaseUrl); + return this; + } + + /** + * Get the clientAuthentication property: Partner client authentication. + * + * @return the clientAuthentication value. + */ + public PartnerClientAuthentication clientAuthentication() { + return this.innerProperties() == null ? null : this.innerProperties().clientAuthentication(); + } + + /** + * Set the clientAuthentication property: Partner client authentication. + * + * @param clientAuthentication the clientAuthentication value to set. + * @return the WebhookUpdatePartnerDestinationInfo object itself. + */ + public WebhookUpdatePartnerDestinationInfo withClientAuthentication( + PartnerClientAuthentication clientAuthentication) { + if (this.innerProperties() == null) { + this.innerProperties = new WebhookPartnerDestinationProperties(); + } + this.innerProperties().withClientAuthentication(clientAuthentication); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..fe86ac664654 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for CaCertificates CreateOrUpdate. */ +public final class CaCertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/CaCertificates_CreateOrUpdate.json + */ + /** + * Sample code: CaCertificates_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void caCertificatesCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .caCertificates() + .define("exampleCACertificateName1") + .withExistingNamespace("examplerg", "exampleNamespaceName1") + .withDescription("This is a test certificate") + .withEncodedCertificate("base64EncodePemFormattedCertificateString") + .create(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesDeleteSamples.java new file mode 100644 index 000000000000..4cb07411e19e --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for CaCertificates Delete. */ +public final class CaCertificatesDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/CaCertificates_Delete.json + */ + /** + * Sample code: CaCertificates_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void caCertificatesDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .caCertificates() + .delete( + "examplerg", "exampleNamespaceName1", "exampleCACertificateName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesGetSamples.java new file mode 100644 index 000000000000..b222530b576c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for CaCertificates Get. */ +public final class CaCertificatesGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/CaCertificates_Get.json + */ + /** + * Sample code: CaCertificates_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void caCertificatesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .caCertificates() + .getWithResponse( + "examplerg", "exampleNamespaceName1", "exampleCACertificateName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesListByNamespaceSamples.java new file mode 100644 index 000000000000..9ffdc41f76a1 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/CaCertificatesListByNamespaceSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for CaCertificates ListByNamespace. */ +public final class CaCertificatesListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/CaCertificates_ListByNamespace.json + */ + /** + * Sample code: CaCertificates_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void caCertificatesListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .caCertificates() + .listByNamespace("examplerg", "namespace123", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateSamples.java index 09975d366070..3c8c2a113d5b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for Channels CreateOrUpdate. */ public final class ChannelsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_CreateOrUpdate.json */ /** * Sample code: Channels_CreateOrUpdate. @@ -26,7 +26,7 @@ public static void channelsCreateOrUpdate(com.azure.resourcemanager.eventgrid.Ev .withChannelType(ChannelType.PARTNER_TOPIC) .withPartnerTopicInfo( new PartnerTopicInfo() - .withAzureSubscriptionId("5b4b650e-28b9-4790-b3ab-ddbd88d727c4") + .withAzureSubscriptionId("8f6b6269-84f2-4d09-9e31-1127efcd1e40") .withResourceGroupName("examplerg2") .withName("examplePartnerTopic1") .withSource("ContosoCorp.Accounts.User1")) diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteSamples.java index ccf4042f7837..f5e296801ea5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Channels Delete. */ public final class ChannelsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_Delete.json */ /** * Sample code: Channels_Delete. @@ -19,6 +17,10 @@ public final class ChannelsDeleteSamples { public static void channelsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .channels() - .delete("examplerg", "examplePartnerNamespaceName1", "exampleEventChannelName1", Context.NONE); + .delete( + "examplerg", + "examplePartnerNamespaceName1", + "exampleEventChannelName1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlSamples.java index 3dd796004d1d..e760e63efd13 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetFullUrlSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Channels GetFullUrl. */ public final class ChannelsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_GetFullUrl.json */ /** * Sample code: Channels_GetFullUrl. @@ -17,6 +15,9 @@ public final class ChannelsGetFullUrlSamples { * @param manager Entry point to EventGridManager. */ public static void channelsGetFullUrl(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.channels().getFullUrlWithResponse("examplerg", "examplenamespace", "examplechannel", Context.NONE); + manager + .channels() + .getFullUrlWithResponse( + "examplerg", "examplenamespace", "examplechannel", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetSamples.java index bb70dbd3a2c6..bfa99632dcc6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Channels Get. */ public final class ChannelsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_Get.json */ /** * Sample code: Channels_Get. @@ -19,6 +17,7 @@ public final class ChannelsGetSamples { public static void channelsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .channels() - .getWithResponse("examplerg", "examplePartnerNamespaceName1", "exampleChannelName1", Context.NONE); + .getWithResponse( + "examplerg", "examplePartnerNamespaceName1", "exampleChannelName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceSamples.java index fe2626baa1c9..cb99848141d1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsListByPartnerNamespaceSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Channels ListByPartnerNamespace. */ public final class ChannelsListByPartnerNamespaceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_ListByPartnerNamespace.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_ListByPartnerNamespace.json */ /** * Sample code: Channels_ListByPartnerNamespace. @@ -19,6 +17,7 @@ public final class ChannelsListByPartnerNamespaceSamples { public static void channelsListByPartnerNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .channels() - .listByPartnerNamespace("examplerg", "examplePartnerNamespaceName1", null, null, Context.NONE); + .listByPartnerNamespace( + "examplerg", "examplePartnerNamespaceName1", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateSamples.java index 076babb64362..57e08440d8a6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ChannelsUpdateSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.ChannelUpdateParameters; import java.time.OffsetDateTime; /** Samples for Channels Update. */ public final class ChannelsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Channels_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Channels_Update.json */ /** * Sample code: Channels_Update. @@ -27,6 +26,6 @@ public static void channelsUpdate(com.azure.resourcemanager.eventgrid.EventGridM "exampleChannelName1", new ChannelUpdateParameters() .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2022-03-23T23:06:11.785Z")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..4ace3d691d41 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for ClientGroups CreateOrUpdate. */ +public final class ClientGroupsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/ClientGroups_CreateOrUpdate.json + */ + /** + * Sample code: ClientGroups_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientGroupsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clientGroups() + .define("exampleClientGroupName1") + .withExistingNamespace("examplerg", "exampleNamespaceName1") + .withDescription("This is a test client group") + .withQuery("attributes.b IN ['a', 'b', 'c']") + .create(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsDeleteSamples.java new file mode 100644 index 000000000000..d3f3c874493f --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for ClientGroups Delete. */ +public final class ClientGroupsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/ClientGroups_Delete.json + */ + /** + * Sample code: ClientGroups_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientGroupsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clientGroups() + .delete("examplerg", "exampleNamespaceName1", "exampleClientGroupName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsGetSamples.java new file mode 100644 index 000000000000..7b5b9e67d761 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for ClientGroups Get. */ +public final class ClientGroupsGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/ClientGroups_Get.json + */ + /** + * Sample code: ClientGroups_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientGroupsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clientGroups() + .getWithResponse( + "examplerg", "exampleNamespaceName1", "exampleClientGroupName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListByNamespaceSamples.java new file mode 100644 index 000000000000..597deefadf6a --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientGroupsListByNamespaceSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for ClientGroups ListByNamespace. */ +public final class ClientGroupsListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/ClientGroups_ListByNamespace.json + */ + /** + * Sample code: ClientGroups_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientGroupsListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clientGroups() + .listByNamespace("examplerg", "namespace123", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..d62f79424a03 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsCreateOrUpdateSamples.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.eventgrid.models.ClientAuthentication; +import com.azure.resourcemanager.eventgrid.models.ClientCertificateSubjectDistinguishedName; +import com.azure.resourcemanager.eventgrid.models.ClientState; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Clients CreateOrUpdate. */ +public final class ClientsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Clients_CreateOrUpdate.json + */ + /** + * Sample code: Clients_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) + throws IOException { + manager + .clients() + .define("exampleClientName1") + .withExistingNamespace("examplerg", "exampleNamespaceName1") + .withDescription("This is a test client") + .withAuthentication( + new ClientAuthentication() + .withCertificateSubject( + new ClientCertificateSubjectDistinguishedName() + .withCommonName("CertificateCommonName") + .withOrganization("Microsoft") + .withOrganizationUnit("Azure") + .withCountryCode("fakeTokenPlaceholder"))) + .withState(ClientState.ENABLED) + .withAttributes( + mapOf( + "deviceTypes", + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize("[\"Fan\",\"Light\",\"AC\"]", Object.class, SerializerEncoding.JSON), + "floor", + 3, + "room", + "345")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsDeleteSamples.java new file mode 100644 index 000000000000..487dbaaeaa1e --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for Clients Delete. */ +public final class ClientsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Clients_Delete.json + */ + /** + * Sample code: Clients_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clients() + .delete("examplerg", "exampleNamespaceName1", "exampleClientName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsGetSamples.java new file mode 100644 index 000000000000..5b077ad3d5c4 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for Clients Get. */ +public final class ClientsGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Clients_Get.json + */ + /** + * Sample code: Clients_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .clients() + .getWithResponse( + "examplerg", "exampleNamespaceName1", "exampleClientName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsListByNamespaceSamples.java new file mode 100644 index 000000000000..c833548a5815 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ClientsListByNamespaceSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for Clients ListByNamespace. */ +public final class ClientsListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Clients_ListByNamespace.json + */ + /** + * Sample code: Clients_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void clientsListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.clients().listByNamespace("examplerg", "namespace123", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsCreateOrUpdateSamples.java index e4cc7be3eee5..0dc54f16cc24 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -12,7 +11,7 @@ /** Samples for DomainEventSubscriptions CreateOrUpdate. */ public final class DomainEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: DomainEventSubscriptions_CreateOrUpdate. @@ -35,6 +34,6 @@ public static void domainEventSubscriptionsCreateOrUpdate( .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteSamples.java index 08cff6d55973..98796e1e96c8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainEventSubscriptions Delete. */ public final class DomainEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_Delete.json */ /** * Sample code: DomainEventSubscriptions_Delete. @@ -17,6 +15,8 @@ public final class DomainEventSubscriptionsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void domainEventSubscriptionsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainEventSubscriptions().delete("examplerg", "exampleDomain1", "examplesubscription1", Context.NONE); + manager + .domainEventSubscriptions() + .delete("examplerg", "exampleDomain1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesSamples.java index de69651ca598..98e3571e9245 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetDeliveryAttributesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainEventSubscriptions GetDeliveryAttributes. */ public final class DomainEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: DomainEventSubscriptions_GetDeliveryAttributes. @@ -20,6 +18,7 @@ public static void domainEventSubscriptionsGetDeliveryAttributes( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainEventSubscriptions() - .getDeliveryAttributesWithResponse("examplerg", "exampleDomain1", "examplesubscription1", Context.NONE); + .getDeliveryAttributesWithResponse( + "examplerg", "exampleDomain1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlSamples.java index 19183a409da2..769d5d02ec66 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetFullUrlSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainEventSubscriptions GetFullUrl. */ public final class DomainEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_GetFullUrl.json */ /** * Sample code: DomainEventSubscriptions_GetFullUrl. @@ -20,6 +18,7 @@ public static void domainEventSubscriptionsGetFullUrl( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainEventSubscriptions() - .getFullUrlWithResponse("examplerg", "exampleDomain1", "examplesubscription1", Context.NONE); + .getFullUrlWithResponse( + "examplerg", "exampleDomain1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetSamples.java index cf5eadfd7581..07b27f6d4198 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainEventSubscriptions Get. */ public final class DomainEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_Get.json */ /** * Sample code: DomainEventSubscriptions_Get. @@ -19,6 +17,6 @@ public final class DomainEventSubscriptionsGetSamples { public static void domainEventSubscriptionsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainEventSubscriptions() - .getWithResponse("examplerg", "exampleDomain1", "examplesubscription1", Context.NONE); + .getWithResponse("examplerg", "exampleDomain1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsListSamples.java index 35508937b5a8..52c5478bf445 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainEventSubscriptions List. */ public final class DomainEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_List.json */ /** * Sample code: DomainEventSubscriptions_List. @@ -17,6 +15,8 @@ public final class DomainEventSubscriptionsListSamples { * @param manager Entry point to EventGridManager. */ public static void domainEventSubscriptionsList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainEventSubscriptions().list("examplerg", "exampleDomain1", null, null, Context.NONE); + manager + .domainEventSubscriptions() + .list("examplerg", "exampleDomain1", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsUpdateSamples.java index fd7d812c416a..d94dbc5ddfdf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainEventSubscriptionsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -13,7 +12,7 @@ /** Samples for DomainEventSubscriptions Update. */ public final class DomainEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainEventSubscriptions_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainEventSubscriptions_Update.json */ /** * Sample code: DomainEventSubscriptions_Update. @@ -36,6 +35,6 @@ public static void domainEventSubscriptionsUpdate(com.azure.resourcemanager.even .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsCreateOrUpdateSamples.java index 3e752f0e5ab8..1a7745765c61 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsCreateOrUpdateSamples.java @@ -4,15 +4,13 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; /** Samples for DomainTopicEventSubscriptions CreateOrUpdate. */ public final class DomainTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: DomainTopicEventSubscriptions_CreateOrUpdate. @@ -23,19 +21,14 @@ public static void domainTopicEventSubscriptionsCreateOrUpdate( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainTopicEventSubscriptions() - .createOrUpdate( - "examplerg", - "exampleDomain1", - "exampleDomainTopic1", - "exampleEventSubscriptionName1", - new EventSubscriptionInner() - .withDestination( - new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) - .withFilter( - new EventSubscriptionFilter() - .withSubjectBeginsWith("ExamplePrefix") - .withSubjectEndsWith("ExampleSuffix") - .withIsSubjectCaseSensitive(false)), - Context.NONE); + .define("exampleEventSubscriptionName1") + .withExistingTopic("examplerg", "exampleDomain1", "exampleDomainTopic1") + .withDestination(new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) + .withFilter( + new EventSubscriptionFilter() + .withSubjectBeginsWith("ExamplePrefix") + .withSubjectEndsWith("ExampleSuffix") + .withIsSubjectCaseSensitive(false)) + .create(); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteSamples.java index ddaff9cf2477..f97b38e99f26 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainTopicEventSubscriptions Delete. */ public final class DomainTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_Delete.json */ /** * Sample code: DomainTopicEventSubscriptions_Delete. @@ -20,6 +18,11 @@ public static void domainTopicEventSubscriptionsDelete( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainTopicEventSubscriptions() - .delete("examplerg", "exampleDomain1", "exampleDomainTopic1", "examplesubscription1", Context.NONE); + .delete( + "examplerg", + "exampleDomain1", + "exampleDomainTopic1", + "examplesubscription1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesSamples.java index 7f8f9e75253d..02d8a7a02a2a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetDeliveryAttributesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainTopicEventSubscriptions GetDeliveryAttributes. */ public final class DomainTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: DomainTopicEventSubscriptions_GetDeliveryAttributes. @@ -21,6 +19,10 @@ public static void domainTopicEventSubscriptionsGetDeliveryAttributes( manager .domainTopicEventSubscriptions() .getDeliveryAttributesWithResponse( - "examplerg", "exampleDomain1", "exampleDomainTopic1", "examplesubscription1", Context.NONE); + "examplerg", + "exampleDomain1", + "exampleDomainTopic1", + "examplesubscription1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlSamples.java index f7eb5b377afb..da684b9ec86c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetFullUrlSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainTopicEventSubscriptions GetFullUrl. */ public final class DomainTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: DomainTopicEventSubscriptions_GetFullUrl. @@ -21,6 +19,10 @@ public static void domainTopicEventSubscriptionsGetFullUrl( manager .domainTopicEventSubscriptions() .getFullUrlWithResponse( - "examplerg", "exampleDomain1", "exampleDomainTopic1", "examplesubscription1", Context.NONE); + "examplerg", + "exampleDomain1", + "exampleDomainTopic1", + "examplesubscription1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetSamples.java index e1db95d5dec0..30e5e155d692 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainTopicEventSubscriptions Get. */ public final class DomainTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_Get.json */ /** * Sample code: DomainTopicEventSubscriptions_Get. @@ -20,6 +18,10 @@ public static void domainTopicEventSubscriptionsGet(com.azure.resourcemanager.ev manager .domainTopicEventSubscriptions() .getWithResponse( - "examplerg", "exampleDomain1", "exampleDomainTopic1", "examplesubscription1", Context.NONE); + "examplerg", + "exampleDomain1", + "exampleDomainTopic1", + "examplesubscription1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsListSamples.java index 0b2a1b28fe14..5cd4b0cd9e50 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainTopicEventSubscriptions List. */ public final class DomainTopicEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_List.json */ /** * Sample code: DomainTopicEventSubscriptions_List. @@ -19,6 +17,6 @@ public final class DomainTopicEventSubscriptionsListSamples { public static void domainTopicEventSubscriptionsList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .domainTopicEventSubscriptions() - .list("examplerg", "exampleDomain1", "exampleDomainTopic1", null, null, Context.NONE); + .list("examplerg", "exampleDomain1", "exampleDomainTopic1", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsUpdateSamples.java index bf14bde2e359..8cfa51e0de0b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicEventSubscriptionsUpdateSamples.java @@ -4,16 +4,15 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; +import com.azure.resourcemanager.eventgrid.models.EventSubscription; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; -import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; import java.util.Arrays; /** Samples for DomainTopicEventSubscriptions Update. */ public final class DomainTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopicEventSubscriptions_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopicEventSubscriptions_Update.json */ /** * Sample code: DomainTopicEventSubscriptions_Update. @@ -22,22 +21,25 @@ public final class DomainTopicEventSubscriptionsUpdateSamples { */ public static void domainTopicEventSubscriptionsUpdate( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager - .domainTopicEventSubscriptions() - .update( - "examplerg", - "exampleDomain1", - "exampleDomainTopic1", - "exampleEventSubscriptionName1", - new EventSubscriptionUpdateParameters() - .withDestination( - new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) - .withFilter( - new EventSubscriptionFilter() - .withSubjectBeginsWith("existingPrefix") - .withSubjectEndsWith("newSuffix") - .withIsSubjectCaseSensitive(true)) - .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + EventSubscription resource = + manager + .domainTopicEventSubscriptions() + .getWithResponse( + "examplerg", + "exampleDomain1", + "exampleDomainTopic1", + "exampleEventSubscriptionName1", + com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withDestination(new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) + .withFilter( + new EventSubscriptionFilter() + .withSubjectBeginsWith("existingPrefix") + .withSubjectEndsWith("newSuffix") + .withIsSubjectCaseSensitive(true)) + .withLabels(Arrays.asList("label1", "label2")) + .apply(); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsCreateOrUpdateSamples.java index 59224cf90f28..d12d740c515b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsCreateOrUpdateSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainTopics CreateOrUpdate. */ public final class DomainTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopics_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopics_CreateOrUpdate.json */ /** * Sample code: DomainTopics_CreateOrUpdate. @@ -17,6 +15,8 @@ public final class DomainTopicsCreateOrUpdateSamples { * @param manager Entry point to EventGridManager. */ public static void domainTopicsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainTopics().createOrUpdate("examplerg", "exampledomain1", "exampledomaintopic1", Context.NONE); + manager + .domainTopics() + .createOrUpdate("examplerg", "exampledomain1", "exampledomaintopic1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteSamples.java index abb4cdf8af41..fbba6c447f39 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainTopics Delete. */ public final class DomainTopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopics_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopics_Delete.json */ /** * Sample code: DomainTopics_Delete. @@ -17,6 +15,8 @@ public final class DomainTopicsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void domainTopicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainTopics().delete("examplerg", "exampledomain1", "exampledomaintopic1", Context.NONE); + manager + .domainTopics() + .delete("examplerg", "exampledomain1", "exampledomaintopic1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetSamples.java index 735b4318c9ff..7bd0e6881ce7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainTopics Get. */ public final class DomainTopicsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopics_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopics_Get.json */ /** * Sample code: DomainTopics_Get. @@ -17,6 +15,8 @@ public final class DomainTopicsGetSamples { * @param manager Entry point to EventGridManager. */ public static void domainTopicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainTopics().getWithResponse("examplerg", "exampledomain2", "topic1", Context.NONE); + manager + .domainTopics() + .getWithResponse("examplerg", "exampledomain2", "topic1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainSamples.java index b2caafae6b76..1b808a9de82a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainTopicsListByDomainSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for DomainTopics ListByDomain. */ public final class DomainTopicsListByDomainSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/DomainTopics_ListByDomain.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/DomainTopics_ListByDomain.json */ /** * Sample code: DomainTopics_ListByDomain. @@ -17,6 +15,8 @@ public final class DomainTopicsListByDomainSamples { * @param manager Entry point to EventGridManager. */ public static void domainTopicsListByDomain(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domainTopics().listByDomain("examplerg", "exampledomain2", null, null, Context.NONE); + manager + .domainTopics() + .listByDomain("examplerg", "exampledomain2", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsCreateOrUpdateSamples.java index 8c0671cedc44..a1340c7492d9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ /** Samples for Domains CreateOrUpdate. */ public final class DomainsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_CreateOrUpdate.json */ /** * Sample code: Domains_CreateOrUpdate. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteSamples.java index 945a4bdf45d7..5141794e9f62 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Domains Delete. */ public final class DomainsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_Delete.json */ /** * Sample code: Domains_Delete. @@ -17,6 +15,6 @@ public final class DomainsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void domainsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domains().delete("examplerg", "exampledomain1", Context.NONE); + manager.domains().delete("examplerg", "exampledomain1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupSamples.java index fba9bd963695..9134f984417f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Domains GetByResourceGroup. */ public final class DomainsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_Get.json */ /** * Sample code: Domains_Get. @@ -17,6 +15,8 @@ public final class DomainsGetByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void domainsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domains().getByResourceGroupWithResponse("examplerg", "exampledomain2", Context.NONE); + manager + .domains() + .getByResourceGroupWithResponse("examplerg", "exampledomain2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupSamples.java index a450ea256941..6a31e72b863e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Domains ListByResourceGroup. */ public final class DomainsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_ListByResourceGroup.json */ /** * Sample code: Domains_ListByResourceGroup. @@ -17,6 +15,6 @@ public final class DomainsListByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void domainsListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domains().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.domains().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSamples.java index 4a8db8e28669..71fce729a43e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Domains List. */ public final class DomainsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_ListBySubscription.json */ /** * Sample code: Domains_ListBySubscription. @@ -17,6 +15,6 @@ public final class DomainsListSamples { * @param manager Entry point to EventGridManager. */ public static void domainsListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domains().list(null, null, Context.NONE); + manager.domains().list(null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSharedAccessKeysSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSharedAccessKeysSamples.java index 06e0d9c3d138..0a6bf08f8b53 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSharedAccessKeysSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsListSharedAccessKeysSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Domains ListSharedAccessKeys. */ public final class DomainsListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_ListSharedAccessKeys.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_ListSharedAccessKeys.json */ /** * Sample code: Domains_ListSharedAccessKeys. @@ -17,6 +15,8 @@ public final class DomainsListSharedAccessKeysSamples { * @param manager Entry point to EventGridManager. */ public static void domainsListSharedAccessKeys(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.domains().listSharedAccessKeysWithResponse("examplerg", "exampledomain2", Context.NONE); + manager + .domains() + .listSharedAccessKeysWithResponse("examplerg", "exampledomain2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsRegenerateKeySamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsRegenerateKeySamples.java index 7d9670204aca..57b8df9aeb6c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsRegenerateKeySamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsRegenerateKeySamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.DomainRegenerateKeyRequest; /** Samples for Domains RegenerateKey. */ public final class DomainsRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_RegenerateKey.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_RegenerateKey.json */ /** * Sample code: Domains_RegenerateKey. @@ -21,6 +20,9 @@ public static void domainsRegenerateKey(com.azure.resourcemanager.eventgrid.Even manager .domains() .regenerateKeyWithResponse( - "examplerg", "exampledomain2", new DomainRegenerateKeyRequest().withKeyName("key1"), Context.NONE); + "examplerg", + "exampledomain2", + new DomainRegenerateKeyRequest().withKeyName("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsUpdateSamples.java index bc1a2c588055..57249f4a902a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/DomainsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.Domain; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.IpActionType; @@ -16,7 +15,7 @@ /** Samples for Domains Update. */ public final class DomainsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Domains_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Domains_Update.json */ /** * Sample code: Domains_Update. @@ -25,7 +24,10 @@ public final class DomainsUpdateSamples { */ public static void domainsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { Domain resource = - manager.domains().getByResourceGroupWithResponse("examplerg", "exampledomain1", Context.NONE).getValue(); + manager + .domains() + .getByResourceGroupWithResponse("examplerg", "exampledomain1", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsCreateOrUpdateSamples.java index c1b979967984..c5cf1cd1686a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.AzureFunctionEventSubscriptionDestination; import com.azure.resourcemanager.eventgrid.models.EventHubEventSubscriptionDestination; @@ -19,7 +18,7 @@ /** Samples for EventSubscriptions CreateOrUpdate. */ public final class EventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination. @@ -31,23 +30,23 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestinat manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( - new WebhookEventSubscriptionDestination() - .withEndpointUrl( - "https://azurefunctionexample.azurewebsites.net/runtime/webhooks/EventGrid?functionName=EventGridTrigger1&code=PASSWORDCODE")) + new EventHubEventSubscriptionDestination() + .withResourceId( + "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1")) .withFilter( new EventSubscriptionFilter() .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForSubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForSubscription.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForSubscription. @@ -59,17 +58,17 @@ public static void eventSubscriptionsCreateOrUpdateForSubscription( manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", new EventSubscriptionInner() .withDestination( new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) .withFilter(new EventSubscriptionFilter().withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination. @@ -81,7 +80,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -98,11 +97,11 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopic .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResource.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResource. @@ -114,7 +113,7 @@ public static void eventSubscriptionsCreateOrUpdateForResource( manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription10", new EventSubscriptionInner() .withDestination( @@ -124,11 +123,11 @@ public static void eventSubscriptionsCreateOrUpdateForResource( .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic. @@ -140,7 +139,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopic( manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -152,11 +151,11 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopic( .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForResourceGroup. @@ -168,7 +167,7 @@ public static void eventSubscriptionsCreateOrUpdateForResourceGroup( manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", "examplesubscription2", new EventSubscriptionInner() .withDestination( @@ -178,11 +177,11 @@ public static void eventSubscriptionsCreateOrUpdateForResourceGroup( .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination. @@ -194,7 +193,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestina manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -211,11 +210,11 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestina .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination. @@ -227,14 +226,15 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDes manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( new StorageQueueEventSubscriptionDestination() .withResourceId( "/subscriptions/d33c5f7a-02ea-40f4-bf52-07f17e84d6a8/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") - .withQueueName("queue1")) + .withQueueName("queue1") + .withQueueMessageTimeToLiveInSeconds(300L)) .withFilter( new EventSubscriptionFilter() .withSubjectBeginsWith("ExamplePrefix") @@ -245,11 +245,11 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDes .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination. @@ -261,7 +261,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDe manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -278,11 +278,11 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDe .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination. @@ -294,7 +294,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectio manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -311,11 +311,11 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectio .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination. @@ -327,7 +327,7 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusQueue manager .eventSubscriptions() .createOrUpdate( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionInner() .withDestination( @@ -344,6 +344,6 @@ public static void eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusQueue .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteSamples.java index 22de3b089b7c..2eec1cf9f6ff 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions Delete. */ public final class EventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_DeleteForCustomTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_DeleteForCustomTopic.json */ /** * Sample code: EventSubscriptions_DeleteForCustomTopic. @@ -21,13 +19,13 @@ public static void eventSubscriptionsDeleteForCustomTopic( manager .eventSubscriptions() .delete( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_DeleteForResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_DeleteForResourceGroup.json */ /** * Sample code: EventSubscriptions_DeleteForResourceGroup. @@ -39,13 +37,13 @@ public static void eventSubscriptionsDeleteForResourceGroup( manager .eventSubscriptions() .delete( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", "examplesubscription2", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_DeleteForSubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_DeleteForSubscription.json */ /** * Sample code: EventSubscriptions_DeleteForSubscription. @@ -56,11 +54,14 @@ public static void eventSubscriptionsDeleteForSubscription( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .eventSubscriptions() - .delete("subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", Context.NONE); + .delete( + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", + "examplesubscription3", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_DeleteForResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_DeleteForResource.json */ /** * Sample code: EventSubscriptions_DeleteForResource. @@ -72,8 +73,8 @@ public static void eventSubscriptionsDeleteForResource( manager .eventSubscriptions() .delete( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription10", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesSamples.java index bb55fe490a9b..fd604422f6b5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetDeliveryAttributesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions GetDeliveryAttributes. */ public final class EventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: EventSubscriptions_GetDeliveryAttributes. @@ -20,6 +18,9 @@ public static void eventSubscriptionsGetDeliveryAttributes( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .eventSubscriptions() - .getDeliveryAttributesWithResponse("aaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaa", Context.NONE); + .getDeliveryAttributesWithResponse( + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "examplesubscription1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlSamples.java index f03d85f1e282..298753fb0788 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetFullUrlSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions GetFullUrl. */ public final class EventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetFullUrlForResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetFullUrlForResource.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResource. @@ -21,13 +19,13 @@ public static void eventSubscriptionsGetFullUrlForResource( manager .eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetFullUrlForResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetFullUrlForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetFullUrlForResourceGroup. @@ -39,13 +37,13 @@ public static void eventSubscriptionsGetFullUrlForResourceGroup( manager .eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", "examplesubscription2", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetFullUrlForSubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetFullUrlForSubscription.json */ /** * Sample code: EventSubscriptions_GetFullUrlForSubscription. @@ -57,11 +55,13 @@ public static void eventSubscriptionsGetFullUrlForSubscription( manager .eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", Context.NONE); + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", + "examplesubscription3", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetFullUrlForCustomTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetFullUrlForCustomTopic.json */ /** * Sample code: EventSubscriptions_GetFullUrlForCustomTopic. @@ -73,8 +73,8 @@ public static void eventSubscriptionsGetFullUrlForCustomTopic( manager .eventSubscriptions() .getFullUrlWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetSamples.java index 21d1ef59737a..786db6b8a1cc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions Get. */ public final class EventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_HybridConnectionDestination. @@ -21,13 +19,13 @@ public static void eventSubscriptionsGetForCustomTopicHybridConnectionDestinatio manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination. @@ -39,13 +37,13 @@ public static void eventSubscriptionsGetForCustomTopicServiceBusTopicDestination manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForResourceGroup.json */ /** * Sample code: EventSubscriptions_GetForResourceGroup. @@ -57,13 +55,13 @@ public static void eventSubscriptionsGetForResourceGroup( manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", "examplesubscription2", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_EventHubDestination. @@ -75,13 +73,13 @@ public static void eventSubscriptionsGetForCustomTopicEventHubDestination( manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForSubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForSubscription.json */ /** * Sample code: EventSubscriptions_GetForSubscription. @@ -93,11 +91,13 @@ public static void eventSubscriptionsGetForSubscription( manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", "examplesubscription3", Context.NONE); + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", + "examplesubscription3", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_WebhookDestination. @@ -109,13 +109,13 @@ public static void eventSubscriptionsGetForCustomTopicWebhookDestination( manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_AzureFunctionDestination. @@ -127,13 +127,13 @@ public static void eventSubscriptionsGetForCustomTopicAzureFunctionDestination( manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic. @@ -145,13 +145,13 @@ public static void eventSubscriptionsGetForCustomTopic( manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_StorageQueueDestination. @@ -163,13 +163,13 @@ public static void eventSubscriptionsGetForCustomTopicStorageQueueDestination( manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForResource.json */ /** * Sample code: EventSubscriptions_GetForResource. @@ -180,13 +180,13 @@ public static void eventSubscriptionsGetForResource(com.azure.resourcemanager.ev manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination. @@ -198,8 +198,8 @@ public static void eventSubscriptionsGetForCustomTopicServiceBusQueueDestination manager .eventSubscriptions() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByDomainTopicSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByDomainTopicSamples.java index d60a8a595a43..dc587d9700dc 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByDomainTopicSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByDomainTopicSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListByDomainTopic. */ public final class EventSubscriptionsListByDomainTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListByDomainTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListByDomainTopic.json */ /** * Sample code: EventSubscriptions_ListByDomainTopic. @@ -18,6 +16,8 @@ public final class EventSubscriptionsListByDomainTopicSamples { */ public static void eventSubscriptionsListByDomainTopic( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.eventSubscriptions().listByDomainTopic("examplerg", "domain1", "topic1", null, null, Context.NONE); + manager + .eventSubscriptions() + .listByDomainTopic("examplerg", "domain1", "topic1", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceGroupSamples.java index 199c9bc19cf1..bca6a4d96db8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListByResourceGroup. */ public final class EventSubscriptionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListGlobalByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroup.json */ /** * Sample code: EventSubscriptions_ListGlobalByResourceGroup. @@ -18,6 +16,6 @@ public final class EventSubscriptionsListByResourceGroupSamples { */ public static void eventSubscriptionsListGlobalByResourceGroup( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.eventSubscriptions().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.eventSubscriptions().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceSamples.java index 9e5fa918b407..24bd78c562d0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListByResourceSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListByResource. */ public final class EventSubscriptionsListByResourceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListByResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListByResource.json */ /** * Sample code: EventSubscriptions_ListByResource. @@ -19,6 +17,13 @@ public final class EventSubscriptionsListByResourceSamples { public static void eventSubscriptionsListByResource(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .eventSubscriptions() - .listByResource("examplerg", "Microsoft.EventGrid", "topics", "exampletopic2", null, null, Context.NONE); + .listByResource( + "examplerg", + "Microsoft.EventGrid", + "topics", + "exampletopic2", + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples.java index dea6a3c7170e..fa6e6fd0af77 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListGlobalByResourceGroupForTopicType. */ public final class EventSubscriptionsListGlobalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListGlobalByResourceGroupForTopicType.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroupForTopicType.json */ /** * Sample code: EventSubscriptions_ListGlobalByResourceGroupForTopicType. @@ -21,6 +19,6 @@ public static void eventSubscriptionsListGlobalByResourceGroupForTopicType( manager .eventSubscriptions() .listGlobalByResourceGroupForTopicType( - "examplerg", "Microsoft.Resources.ResourceGroups", null, null, Context.NONE); + "examplerg", "Microsoft.Resources.ResourceGroups", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples.java index f6991f37fc12..c767694f1db7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListGlobalBySubscriptionForTopicType. */ public final class EventSubscriptionsListGlobalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListGlobalBySubscriptionForTopicType.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscriptionForTopicType.json */ /** * Sample code: EventSubscriptions_ListGlobalBySubscriptionForTopicType. @@ -20,6 +18,7 @@ public static void eventSubscriptionsListGlobalBySubscriptionForTopicType( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .eventSubscriptions() - .listGlobalBySubscriptionForTopicType("Microsoft.Resources.Subscriptions", null, null, Context.NONE); + .listGlobalBySubscriptionForTopicType( + "Microsoft.Resources.Subscriptions", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples.java index 2f5831c43142..924bc7ac3fa7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListRegionalByResourceGroupForTopicType. */ public final class EventSubscriptionsListRegionalByResourceGroupForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListRegionalByResourceGroupForTopicType.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroupForTopicType.json */ /** * Sample code: EventSubscriptions_ListRegionalByResourceGroupForTopicType. @@ -21,6 +19,6 @@ public static void eventSubscriptionsListRegionalByResourceGroupForTopicType( manager .eventSubscriptions() .listRegionalByResourceGroupForTopicType( - "examplerg", "westus2", "Microsoft.EventHub.namespaces", null, null, Context.NONE); + "examplerg", "westus2", "Microsoft.EventHub.namespaces", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupSamples.java index 259ed01aea61..c230b2734a59 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListRegionalByResourceGroup. */ public final class EventSubscriptionsListRegionalByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListRegionalByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroup.json */ /** * Sample code: EventSubscriptions_ListRegionalByResourceGroup. @@ -18,6 +16,8 @@ public final class EventSubscriptionsListRegionalByResourceGroupSamples { */ public static void eventSubscriptionsListRegionalByResourceGroup( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.eventSubscriptions().listRegionalByResourceGroup("examplerg", "westus2", null, null, Context.NONE); + manager + .eventSubscriptions() + .listRegionalByResourceGroup("examplerg", "westus2", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples.java index 65bdaaa71f6a..8056ff866da7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListRegionalBySubscriptionForTopicType. */ public final class EventSubscriptionsListRegionalBySubscriptionForTopicTypeSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListRegionalBySubscriptionForTopicType.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscriptionForTopicType.json */ /** * Sample code: EventSubscriptions_ListRegionalBySubscriptionForTopicType. @@ -21,6 +19,6 @@ public static void eventSubscriptionsListRegionalBySubscriptionForTopicType( manager .eventSubscriptions() .listRegionalBySubscriptionForTopicType( - "westus2", "Microsoft.EventHub.namespaces", null, null, Context.NONE); + "westus2", "Microsoft.EventHub.namespaces", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionSamples.java index 7c08a47d4b80..7c080ff2904b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListRegionalBySubscriptionSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions ListRegionalBySubscription. */ public final class EventSubscriptionsListRegionalBySubscriptionSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListRegionalBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscription.json */ /** * Sample code: EventSubscriptions_ListRegionalBySubscription. @@ -18,6 +16,8 @@ public final class EventSubscriptionsListRegionalBySubscriptionSamples { */ public static void eventSubscriptionsListRegionalBySubscription( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.eventSubscriptions().listRegionalBySubscription("westus2", null, null, Context.NONE); + manager + .eventSubscriptions() + .listRegionalBySubscription("westus2", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListSamples.java index 2ccb248521d7..afdd5af8b7c1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for EventSubscriptions List. */ public final class EventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_ListGlobalBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscription.json */ /** * Sample code: EventSubscriptions_ListGlobalBySubscription. @@ -18,6 +16,6 @@ public final class EventSubscriptionsListSamples { */ public static void eventSubscriptionsListGlobalBySubscription( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.eventSubscriptions().list(null, null, Context.NONE); + manager.eventSubscriptions().list(null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsUpdateSamples.java index d75510fae202..af7546f89403 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/EventSubscriptionsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.AzureFunctionEventSubscriptionDestination; import com.azure.resourcemanager.eventgrid.models.EventHubEventSubscriptionDestination; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; @@ -20,7 +19,7 @@ /** Samples for EventSubscriptions Update. */ public final class EventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_EventHubDestination. @@ -32,7 +31,7 @@ public static void eventSubscriptionsUpdateForCustomTopicEventHubDestination( manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -45,11 +44,11 @@ public static void eventSubscriptionsUpdateForCustomTopicEventHubDestination( .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination. @@ -61,7 +60,7 @@ public static void eventSubscriptionsUpdateForCustomTopicAzureFunctionDestinatio manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -78,11 +77,11 @@ public static void eventSubscriptionsUpdateForCustomTopicAzureFunctionDestinatio .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_WebhookDestination. @@ -94,7 +93,7 @@ public static void eventSubscriptionsUpdateForCustomTopicWebhookDestination( manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -105,11 +104,11 @@ public static void eventSubscriptionsUpdateForCustomTopicWebhookDestination( .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination. @@ -121,7 +120,7 @@ public static void eventSubscriptionsUpdateForCustomTopicStorageQueueDestination manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -140,11 +139,11 @@ public static void eventSubscriptionsUpdateForCustomTopicStorageQueueDestination .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination. @@ -156,7 +155,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestinat manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -169,11 +168,11 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestinat .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination. @@ -185,7 +184,7 @@ public static void eventSubscriptionsUpdateForCustomTopicHybridConnectionDestina manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -198,11 +197,11 @@ public static void eventSubscriptionsUpdateForCustomTopicHybridConnectionDestina .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination. @@ -214,7 +213,7 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -231,11 +230,11 @@ public static void eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestinat .withResourceId( "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/contosostg") .withBlobContainerName("contosocontainer")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForCustomTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic.json */ /** * Sample code: EventSubscriptions_UpdateForCustomTopic. @@ -247,7 +246,7 @@ public static void eventSubscriptionsUpdateForCustomTopic( manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -258,11 +257,11 @@ public static void eventSubscriptionsUpdateForCustomTopic( .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForResource.json */ /** * Sample code: EventSubscriptions_UpdateForResource. @@ -274,7 +273,7 @@ public static void eventSubscriptionsUpdateForResource( manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1", "examplesubscription1", new EventSubscriptionUpdateParameters() .withDestination( @@ -285,11 +284,11 @@ public static void eventSubscriptionsUpdateForResource( .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForResourceGroup.json */ /** * Sample code: EventSubscriptions_UpdateForResourceGroup. @@ -301,7 +300,7 @@ public static void eventSubscriptionsUpdateForResourceGroup( manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg", "examplesubscription2", new EventSubscriptionUpdateParameters() .withDestination( @@ -314,11 +313,11 @@ public static void eventSubscriptionsUpdateForResourceGroup( .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/EventSubscriptions_UpdateForSubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/EventSubscriptions_UpdateForSubscription.json */ /** * Sample code: EventSubscriptions_UpdateForSubscription. @@ -330,7 +329,7 @@ public static void eventSubscriptionsUpdateForSubscription( manager .eventSubscriptions() .update( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4", + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40", "examplesubscription3", new EventSubscriptionUpdateParameters() .withDestination( @@ -341,6 +340,6 @@ public static void eventSubscriptionsUpdateForSubscription( .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetSamples.java index daf7e159d9eb..a07c3450fd17 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/ExtensionTopicsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for ExtensionTopics Get. */ public final class ExtensionTopicsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/ExtensionTopics_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/ExtensionTopics_Get.json */ /** * Sample code: ExtensionTopics_Get. @@ -20,7 +18,7 @@ public static void extensionTopicsGet(com.azure.resourcemanager.eventgrid.EventG manager .extensionTopics() .getWithResponse( - "subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default", - Context.NONE); + "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..9d507657bcb2 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsCreateOrUpdateSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration; +import com.azure.resourcemanager.eventgrid.models.DeliveryMode; +import com.azure.resourcemanager.eventgrid.models.DeliverySchema; +import com.azure.resourcemanager.eventgrid.models.QueueInfo; +import java.time.Duration; + +/** Samples for NamespaceTopicEventSubscriptions CreateOrUpdate. */ +public final class NamespaceTopicEventSubscriptionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopicEventSubscriptions_CreateOrUpdate.json + */ + /** + * Sample code: NamespaceTopicEventSubscriptions_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicEventSubscriptionsCreateOrUpdate( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopicEventSubscriptions() + .define("examplenamespacetopicEventSub2") + .withExistingTopic("examplerg", "examplenamespace2", "examplenamespacetopic2") + .withDeliveryConfiguration( + new DeliveryConfiguration() + .withDeliveryMode(DeliveryMode.QUEUE) + .withQueue( + new QueueInfo() + .withReceiveLockDurationInSeconds(60) + .withMaxDeliveryCount(4) + .withEventTimeToLive(Duration.parse("P1D")))) + .withEventDeliverySchema(DeliverySchema.CLOUD_EVENT_SCHEMA_V1_0) + .create(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsDeleteSamples.java new file mode 100644 index 000000000000..9e624c2fcebf --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsDeleteSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for NamespaceTopicEventSubscriptions Delete. */ +public final class NamespaceTopicEventSubscriptionsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopicEventSubscriptions_Delete.json + */ + /** + * Sample code: NamespaceTopicEventSubscriptions_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicEventSubscriptionsDelete( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopicEventSubscriptions() + .delete( + "examplerg", + "examplenamespace2", + "examplenamespacetopic2", + "examplenamespacetopicEventSub2", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetSamples.java new file mode 100644 index 000000000000..5356ecb05320 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsGetSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for NamespaceTopicEventSubscriptions Get. */ +public final class NamespaceTopicEventSubscriptionsGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopicEventSubscriptions_Get.json + */ + /** + * Sample code: NamespaceTopicEventSubscriptions_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicEventSubscriptionsGet( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopicEventSubscriptions() + .getWithResponse( + "examplerg", + "examplenamespace2", + "examplenamespacetopic2", + "examplenamespacetopicEventSub1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples.java new file mode 100644 index 000000000000..a6ffe6312744 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for NamespaceTopicEventSubscriptions ListByNamespaceTopic. */ +public final class NamespaceTopicEventSubscriptionsListByNamespaceTopicSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json + */ + /** + * Sample code: NamespaceTopicEventSubscriptions_ListByNamespaceTopic. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicEventSubscriptionsListByNamespaceTopic( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopicEventSubscriptions() + .listByNamespaceTopic( + "examplerg", + "examplenamespace2", + "examplenamespacetopic2", + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsUpdateSamples.java new file mode 100644 index 000000000000..bf610618d973 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicEventSubscriptionsUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.resourcemanager.eventgrid.models.DeliveryConfiguration; +import com.azure.resourcemanager.eventgrid.models.DeliveryMode; +import com.azure.resourcemanager.eventgrid.models.DeliverySchema; +import com.azure.resourcemanager.eventgrid.models.QueueInfo; +import com.azure.resourcemanager.eventgrid.models.Subscription; +import java.time.Duration; + +/** Samples for NamespaceTopicEventSubscriptions Update. */ +public final class NamespaceTopicEventSubscriptionsUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopicEventSubscriptions_Update.json + */ + /** + * Sample code: NamespaceTopicEventSubscriptions_Update. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicEventSubscriptionsUpdate( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + Subscription resource = + manager + .namespaceTopicEventSubscriptions() + .getWithResponse( + "examplerg", + "exampleNamespaceName1", + "exampleNamespaceTopicName1", + "exampleNamespaceTopicEventSubscriptionName1", + com.azure.core.util.Context.NONE) + .getValue(); + resource + .update() + .withDeliveryConfiguration( + new DeliveryConfiguration() + .withDeliveryMode(DeliveryMode.QUEUE) + .withQueue( + new QueueInfo() + .withReceiveLockDurationInSeconds(60) + .withMaxDeliveryCount(3) + .withEventTimeToLive(Duration.parse("P1D")))) + .withEventDeliverySchema(DeliverySchema.CLOUD_EVENT_SCHEMA_V1_0) + .apply(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..f837a53b083c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsCreateOrUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.resourcemanager.eventgrid.models.EventInputSchema; +import com.azure.resourcemanager.eventgrid.models.PublisherType; + +/** Samples for NamespaceTopics CreateOrUpdate. */ +public final class NamespaceTopicsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_CreateOrUpdate.json + */ + /** + * Sample code: NamespaceTopics_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopics() + .define("examplenamespacetopic2") + .withExistingNamespace("examplerg", "examplenamespace2") + .withPublisherType(PublisherType.CUSTOM) + .withInputSchema(EventInputSchema.CLOUD_EVENT_SCHEMA_V1_0) + .withEventRetentionInDays(1) + .create(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsDeleteSamples.java new file mode 100644 index 000000000000..16aa56b6c9d8 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for NamespaceTopics Delete. */ +public final class NamespaceTopicsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_Delete.json + */ + /** + * Sample code: NamespaceTopics_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopics() + .delete("examplerg", "examplenamespace2", "examplenamespacetopic2", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsGetSamples.java new file mode 100644 index 000000000000..1d9208bb8535 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for NamespaceTopics Get. */ +public final class NamespaceTopicsGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_Get.json + */ + /** + * Sample code: NamespaceTopics_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopics() + .getWithResponse( + "examplerg", "examplenamespace2", "examplenamespacetopic2", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListByNamespaceSamples.java new file mode 100644 index 000000000000..4e107ff845c0 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListByNamespaceSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for NamespaceTopics ListByNamespace. */ +public final class NamespaceTopicsListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_ListByNamespace.json + */ + /** + * Sample code: NamespaceTopics_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicsListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopics() + .listByNamespace("examplerg", "examplenamespace2", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListSharedAccessKeysSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListSharedAccessKeysSamples.java new file mode 100644 index 000000000000..9950d0d4c6da --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsListSharedAccessKeysSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for NamespaceTopics ListSharedAccessKeys. */ +public final class NamespaceTopicsListSharedAccessKeysSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_ListSharedAccessKeys.json + */ + /** + * Sample code: NamespaceTopics_ListSharedAccessKeys. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicsListSharedAccessKeys( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopics() + .listSharedAccessKeysWithResponse( + "examplerg", "examplenamespace2", "examplenamespacetopic2", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsRegenerateKeySamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsRegenerateKeySamples.java new file mode 100644 index 000000000000..f65aa543aa56 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsRegenerateKeySamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; + +/** Samples for NamespaceTopics RegenerateKey. */ +public final class NamespaceTopicsRegenerateKeySamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_RegenerateKey.json + */ + /** + * Sample code: NamespaceTopics_RegenerateKey. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicsRegenerateKey(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaceTopics() + .regenerateKey( + "examplerg", + "examplenamespace2", + "examplenamespacetopic2", + new TopicRegenerateKeyRequest().withKeyName("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsUpdateSamples.java new file mode 100644 index 000000000000..ed58c6bba787 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespaceTopicsUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.resourcemanager.eventgrid.models.NamespaceTopic; + +/** Samples for NamespaceTopics Update. */ +public final class NamespaceTopicsUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/NamespaceTopics_Update.json + */ + /** + * Sample code: NamespaceTopics_Update. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespaceTopicsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + NamespaceTopic resource = + manager + .namespaceTopics() + .getWithResponse( + "examplerg", + "exampleNamespaceName1", + "exampleNamespaceTopicName1", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withEventRetentionInDays(1).apply(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..46c1a913c5aa --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesCreateOrUpdateSamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfiguration; +import com.azure.resourcemanager.eventgrid.models.TopicSpacesConfigurationState; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Namespaces CreateOrUpdate. */ +public final class NamespacesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_CreateOrUpdate.json + */ + /** + * Sample code: Namespaces_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaces() + .define("exampleNamespaceName1") + .withRegion("westus") + .withExistingResourceGroup("examplerg") + .withTags(mapOf("tag1", "value11", "tag2", "value22")) + .withTopicSpacesConfiguration( + new TopicSpacesConfiguration() + .withState(TopicSpacesConfigurationState.ENABLED) + .withRouteTopicResourceId( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampleTopic1")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesDeleteSamples.java new file mode 100644 index 000000000000..d5cac6f79234 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesDeleteSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for Namespaces Delete. */ +public final class NamespacesDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_Delete.json + */ + /** + * Sample code: Namespaces_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.namespaces().delete("examplerg", "exampleNamespaceName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..c5620fb3c55c --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for Namespaces GetByResourceGroup. */ +public final class NamespacesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_Get.json + */ + /** + * Sample code: Namespaces_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaces() + .getByResourceGroupWithResponse("examplerg", "exampleNamespaceName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListByResourceGroupSamples.java new file mode 100644 index 000000000000..f1908bc10f10 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListByResourceGroupSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for Namespaces ListByResourceGroup. */ +public final class NamespacesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_ListByResourceGroup.json + */ + /** + * Sample code: Namespaces_ListByResourceGroup. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.namespaces().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSamples.java new file mode 100644 index 000000000000..d04a0e8705af --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for Namespaces List. */ +public final class NamespacesListSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_ListBySubscription.json + */ + /** + * Sample code: Namespaces_ListBySubscription. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.namespaces().list(null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSharedAccessKeysSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSharedAccessKeysSamples.java new file mode 100644 index 000000000000..9f8e13312cbc --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesListSharedAccessKeysSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for Namespaces ListSharedAccessKeys. */ +public final class NamespacesListSharedAccessKeysSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_ListSharedAccessKeys.json + */ + /** + * Sample code: Namespaces_ListSharedAccessKeys. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesListSharedAccessKeys(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaces() + .listSharedAccessKeysWithResponse("examplerg", "exampleNamespaceName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesRegenerateKeySamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesRegenerateKeySamples.java new file mode 100644 index 000000000000..bee15f1ffa52 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesRegenerateKeySamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.resourcemanager.eventgrid.models.NamespaceRegenerateKeyRequest; + +/** Samples for Namespaces RegenerateKey. */ +public final class NamespacesRegenerateKeySamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_RegenerateKey.json + */ + /** + * Sample code: Namespaces_RegenerateKey. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesRegenerateKey(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .namespaces() + .regenerateKey( + "examplerg", + "exampleNamespaceName1", + new NamespaceRegenerateKeyRequest().withKeyName("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesUpdateSamples.java new file mode 100644 index 000000000000..73e127b55129 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/NamespacesUpdateSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.resourcemanager.eventgrid.models.Namespace; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Namespaces Update. */ +public final class NamespacesUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Namespaces_Update.json + */ + /** + * Sample code: Namespaces_Update. + * + * @param manager Entry point to EventGridManager. + */ + public static void namespacesUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + Namespace resource = + manager + .namespaces() + .getByResourceGroupWithResponse("examplerg", "exampleNamespaceName1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1Updated")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/OperationsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/OperationsListSamples.java index db221d6bd482..3a4df25333aa 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/OperationsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/OperationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Operations_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Operations_List.json */ /** * Sample code: Operations_List. @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to EventGridManager. */ public static void operationsList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsAuthorizePartnerSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsAuthorizePartnerSamples.java index ba825b2ae658..becd5dcca31a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsAuthorizePartnerSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsAuthorizePartnerSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.Partner; import java.time.OffsetDateTime; import java.util.UUID; @@ -12,7 +11,7 @@ /** Samples for PartnerConfigurations AuthorizePartner. */ public final class PartnerConfigurationsAuthorizePartnerSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_AuthorizePartner.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_AuthorizePartner.json */ /** * Sample code: PartnerConfigurations_AuthorizePartner. @@ -29,6 +28,6 @@ public static void partnerConfigurationsAuthorizePartner( .withPartnerRegistrationImmutableId(UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) .withPartnerName("Contoso.Finance") .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsCreateOrUpdateSamples.java index c8d50fd781dd..b4447a716da6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.PartnerConfigurationInner; import com.azure.resourcemanager.eventgrid.models.Partner; import com.azure.resourcemanager.eventgrid.models.PartnerAuthorization; @@ -15,7 +14,7 @@ /** Samples for PartnerConfigurations CreateOrUpdate. */ public final class PartnerConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_CreateOrUpdate.json */ /** * Sample code: PartnerConfigurations_CreateOrUpdate. @@ -47,6 +46,6 @@ public static void partnerConfigurationsCreateOrUpdate( .withPartnerName("fabrikam.HR") .withAuthorizationExpirationTimeInUtc( OffsetDateTime.parse("2022-02-20T01:00:00.142Z"))))), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteSamples.java index ae3fdb254207..8c45c5f26345 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerConfigurations Delete. */ public final class PartnerConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_Delete.json */ /** * Sample code: PartnerConfigurations_Delete. @@ -17,6 +15,6 @@ public final class PartnerConfigurationsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void partnerConfigurationsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerConfigurations().delete("examplerg", Context.NONE); + manager.partnerConfigurations().delete("examplerg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsGetByResourceGroupSamples.java index d02a8bfa79f7..d1eb16cee548 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerConfigurations GetByResourceGroup. */ public final class PartnerConfigurationsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_Get.json */ /** * Sample code: PartnerConfigurations_Get. @@ -17,6 +15,6 @@ public final class PartnerConfigurationsGetByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void partnerConfigurationsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerConfigurations().getByResourceGroupWithResponse("examplerg", Context.NONE); + manager.partnerConfigurations().getByResourceGroupWithResponse("examplerg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListByResourceGroupSamples.java index 370b64689fa1..9aad7a070f3b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerConfigurations ListByResourceGroup. */ public final class PartnerConfigurationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_ListByResourceGroup.json */ /** * Sample code: PartnerConfigurations_ListByResourceGroup. @@ -18,6 +16,6 @@ public final class PartnerConfigurationsListByResourceGroupSamples { */ public static void partnerConfigurationsListByResourceGroup( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerConfigurations().listByResourceGroup("examplerg", Context.NONE); + manager.partnerConfigurations().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListSamples.java index 779234e4680e..27ad89543407 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerConfigurations List. */ public final class PartnerConfigurationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_ListBySubscription.json */ /** * Sample code: PartnerConfigurations_ListBySubscription. @@ -18,6 +16,6 @@ public final class PartnerConfigurationsListSamples { */ public static void partnerConfigurationsListBySubscription( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerConfigurations().list(null, null, Context.NONE); + manager.partnerConfigurations().list(null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUnauthorizePartnerSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUnauthorizePartnerSamples.java index abb174e57e53..4b1e0475d8a4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUnauthorizePartnerSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUnauthorizePartnerSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.Partner; import java.time.OffsetDateTime; import java.util.UUID; @@ -12,7 +11,7 @@ /** Samples for PartnerConfigurations UnauthorizePartner. */ public final class PartnerConfigurationsUnauthorizePartnerSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_UnauthorizePartner.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_UnauthorizePartner.json */ /** * Sample code: PartnerConfigurations_UnauthorizePartner. @@ -29,6 +28,6 @@ public static void partnerConfigurationsUnauthorizePartner( .withPartnerRegistrationImmutableId(UUID.fromString("941892bc-f5d0-4d1c-8fb5-477570fc2b71")) .withPartnerName("Contoso.Finance") .withAuthorizationExpirationTimeInUtc(OffsetDateTime.parse("2022-01-28T01:20:55.142Z")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUpdateSamples.java index bf7b552af655..6899287c2813 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerConfigurationsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PartnerConfigurationUpdateParameters; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for PartnerConfigurations Update. */ public final class PartnerConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerConfigurations_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerConfigurations_Update.json */ /** * Sample code: PartnerConfigurations_Update. @@ -27,7 +26,7 @@ public static void partnerConfigurationsUpdate(com.azure.resourcemanager.eventgr new PartnerConfigurationUpdateParameters() .withTags(mapOf("tag1", "value11", "tag2", "value22")) .withDefaultMaximumExpirationTimeInDays(100), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsActivateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsActivateSamples.java new file mode 100644 index 000000000000..87bab58d71e0 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsActivateSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for PartnerDestinations Activate. */ +public final class PartnerDestinationsActivateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_Activate.json + */ + /** + * Sample code: PartnerDestinations_Activate. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsActivate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerDestinations() + .activateWithResponse("examplerg", "examplePartnerDestination1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..68263671f399 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsCreateOrUpdateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import java.time.OffsetDateTime; +import java.util.UUID; + +/** Samples for PartnerDestinations CreateOrUpdate. */ +public final class PartnerDestinationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_CreateOrUpdate.json + */ + /** + * Sample code: PartnerDestinations_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerDestinations() + .define("examplePartnerDestinationName1") + .withRegion("westus2") + .withExistingResourceGroup("examplerg") + .withPartnerRegistrationImmutableId(UUID.fromString("0bd70ee2-7d95-447e-ab1f-c4f320019404")) + .withEndpointServiceContext("This is an example") + .withExpirationTimeIfNotActivatedUtc(OffsetDateTime.parse("2022-03-14T19:33:43.430Z")) + .withEndpointBaseUrl("https://www.example/endpoint") + .withMessageForActivation("Sample Activation message") + .create(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsDeleteSamples.java new file mode 100644 index 000000000000..2901d320564b --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for PartnerDestinations Delete. */ +public final class PartnerDestinationsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_Delete.json + */ + /** + * Sample code: PartnerDestinations_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerDestinations() + .delete("examplerg", "examplePartnerDestinationName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..b3a924287ffe --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for PartnerDestinations GetByResourceGroup. */ +public final class PartnerDestinationsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_Get.json + */ + /** + * Sample code: PartnerDestinations_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .partnerDestinations() + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerDestinationName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListByResourceGroupSamples.java new file mode 100644 index 000000000000..9bc74dad1681 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListByResourceGroupSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for PartnerDestinations ListByResourceGroup. */ +public final class PartnerDestinationsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_ListByResourceGroup.json + */ + /** + * Sample code: PartnerDestinations_ListByResourceGroup. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsListByResourceGroup( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.partnerDestinations().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListSamples.java new file mode 100644 index 000000000000..932ad98baf9b --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for PartnerDestinations List. */ +public final class PartnerDestinationsListSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_ListBySubscription.json + */ + /** + * Sample code: PartnerDestinations_ListBySubscription. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsListBySubscription( + com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager.partnerDestinations().list(null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsUpdateSamples.java new file mode 100644 index 000000000000..6dcbd2ccc3df --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerDestinationsUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.resourcemanager.eventgrid.models.PartnerDestination; +import java.util.HashMap; +import java.util.Map; + +/** Samples for PartnerDestinations Update. */ +public final class PartnerDestinationsUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerDestinations_Update.json + */ + /** + * Sample code: PartnerDestinations_Update. + * + * @param manager Entry point to EventGridManager. + */ + public static void partnerDestinationsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + PartnerDestination resource = + manager + .partnerDestinations() + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerDestinationName1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesCreateOrUpdateSamples.java index 07734dd2678f..fead7fd398db 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for PartnerNamespaces CreateOrUpdate. */ public final class PartnerNamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_CreateOrUpdate.json */ /** * Sample code: PartnerNamespaces_CreateOrUpdate. @@ -25,7 +25,7 @@ public static void partnerNamespacesCreateOrUpdate(com.azure.resourcemanager.eve .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withPartnerRegistrationFullyQualifiedId( - "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1") + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/partnerRegistrations/ContosoCorpAccount1") .create(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteSamples.java index 9d4d19ead09c..2e40f3a78bb8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerNamespaces Delete. */ public final class PartnerNamespacesDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_Delete.json */ /** * Sample code: PartnerNamespaces_Delete. @@ -17,6 +15,8 @@ public final class PartnerNamespacesDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void partnerNamespacesDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerNamespaces().delete("examplerg", "examplePartnerNamespaceName1", Context.NONE); + manager + .partnerNamespaces() + .delete("examplerg", "examplePartnerNamespaceName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupSamples.java index d57c40fb6247..cf1cb49cc84d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerNamespaces GetByResourceGroup. */ public final class PartnerNamespacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_Get.json */ /** * Sample code: PartnerNamespaces_Get. @@ -19,6 +17,7 @@ public final class PartnerNamespacesGetByResourceGroupSamples { public static void partnerNamespacesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerNamespaces() - .getByResourceGroupWithResponse("examplerg", "examplePartnerNamespaceName1", Context.NONE); + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerNamespaceName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupSamples.java index a6f4eef75bfc..21922121a499 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerNamespaces ListByResourceGroup. */ public final class PartnerNamespacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_ListByResourceGroup.json */ /** * Sample code: PartnerNamespaces_ListByResourceGroup. @@ -18,6 +16,6 @@ public final class PartnerNamespacesListByResourceGroupSamples { */ public static void partnerNamespacesListByResourceGroup( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerNamespaces().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.partnerNamespaces().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSamples.java index 872c6d0a37ab..25469b8b4d36 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerNamespaces List. */ public final class PartnerNamespacesListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_ListBySubscription.json */ /** * Sample code: PartnerNamespaces_ListBySubscription. @@ -18,6 +16,6 @@ public final class PartnerNamespacesListSamples { */ public static void partnerNamespacesListBySubscription( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerNamespaces().list(null, null, Context.NONE); + manager.partnerNamespaces().list(null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSharedAccessKeysSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSharedAccessKeysSamples.java index da9489166a41..b15313cc7a8c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSharedAccessKeysSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesListSharedAccessKeysSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerNamespaces ListSharedAccessKeys. */ public final class PartnerNamespacesListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_ListSharedAccessKeys.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_ListSharedAccessKeys.json */ /** * Sample code: PartnerNamespaces_ListSharedAccessKeys. @@ -20,6 +18,7 @@ public static void partnerNamespacesListSharedAccessKeys( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerNamespaces() - .listSharedAccessKeysWithResponse("examplerg", "examplePartnerNamespaceName1", Context.NONE); + .listSharedAccessKeysWithResponse( + "examplerg", "examplePartnerNamespaceName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesRegenerateKeySamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesRegenerateKeySamples.java index c218e3f2f431..253a0c2cc5c7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesRegenerateKeySamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesRegenerateKeySamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PartnerNamespaceRegenerateKeyRequest; /** Samples for PartnerNamespaces RegenerateKey. */ public final class PartnerNamespacesRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_RegenerateKey.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_RegenerateKey.json */ /** * Sample code: PartnerNamespaces_RegenerateKey. @@ -23,7 +22,7 @@ public static void partnerNamespacesRegenerateKey(com.azure.resourcemanager.even .regenerateKeyWithResponse( "examplerg", "examplePartnerNamespaceName1", - new PartnerNamespaceRegenerateKeyRequest().withKeyName("key1"), - Context.NONE); + new PartnerNamespaceRegenerateKeyRequest().withKeyName("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesUpdateSamples.java index e793101b9dad..d7d3602cf2d4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerNamespacesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PartnerNamespace; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for PartnerNamespaces Update. */ public final class PartnerNamespacesUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerNamespaces_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerNamespaces_Update.json */ /** * Sample code: PartnerNamespaces_Update. @@ -23,7 +22,8 @@ public static void partnerNamespacesUpdate(com.azure.resourcemanager.eventgrid.E PartnerNamespace resource = manager .partnerNamespaces() - .getByResourceGroupWithResponse("examplerg", "examplePartnerNamespaceName1", Context.NONE) + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerNamespaceName1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1")).apply(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateSamples.java index 189ff18d97ce..d4f8957bee2f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for PartnerRegistrations CreateOrUpdate. */ public final class PartnerRegistrationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_CreateOrUpdate.json */ /** * Sample code: PartnerRegistrations_CreateOrUpdate. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteSamples.java index 7c75d38c639a..ddaa68ef6cf1 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerRegistrations Delete. */ public final class PartnerRegistrationsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_Delete.json */ /** * Sample code: PartnerRegistrations_Delete. @@ -17,6 +15,8 @@ public final class PartnerRegistrationsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void partnerRegistrationsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerRegistrations().delete("examplerg", "examplePartnerRegistrationName1", Context.NONE); + manager + .partnerRegistrations() + .delete("examplerg", "examplePartnerRegistrationName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupSamples.java index d5d1ea6004bd..fd08bbd87d20 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerRegistrations GetByResourceGroup. */ public final class PartnerRegistrationsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_Get.json */ /** * Sample code: PartnerRegistrations_Get. @@ -19,6 +17,7 @@ public final class PartnerRegistrationsGetByResourceGroupSamples { public static void partnerRegistrationsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerRegistrations() - .getByResourceGroupWithResponse("examplerg", "examplePartnerRegistrationName1", Context.NONE); + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerRegistrationName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupSamples.java index edd26213578e..cd760aeeb632 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerRegistrations ListByResourceGroup. */ public final class PartnerRegistrationsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_ListByResourceGroup.json */ /** * Sample code: PartnerRegistrations_ListByResourceGroup. @@ -18,6 +16,6 @@ public final class PartnerRegistrationsListByResourceGroupSamples { */ public static void partnerRegistrationsListByResourceGroup( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerRegistrations().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.partnerRegistrations().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListSamples.java index e0f051d08559..8b0a9368d8f5 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerRegistrations List. */ public final class PartnerRegistrationsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_ListBySubscription.json */ /** * Sample code: PartnerRegistrations_ListBySubscription. @@ -18,6 +16,6 @@ public final class PartnerRegistrationsListSamples { */ public static void partnerRegistrationsListBySubscription( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerRegistrations().list(null, null, Context.NONE); + manager.partnerRegistrations().list(null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsUpdateSamples.java index 31e1ae9d9ab7..d6949bb0dd57 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerRegistrationsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PartnerRegistration; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for PartnerRegistrations Update. */ public final class PartnerRegistrationsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerRegistrations_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerRegistrations_Update.json */ /** * Sample code: PartnerRegistrations_Update. @@ -23,9 +22,10 @@ public static void partnerRegistrationsUpdate(com.azure.resourcemanager.eventgri PartnerRegistration resource = manager .partnerRegistrations() - .getByResourceGroupWithResponse("examplerg", "examplePartnerRegistrationName1", Context.NONE) + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerRegistrationName1", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + resource.update().withTags(mapOf("NewKey", "NewValue")).apply(); } @SuppressWarnings("unchecked") diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsCreateOrUpdateSamples.java index a999b4c76a7d..055d65763c4b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -12,7 +11,7 @@ /** Samples for PartnerTopicEventSubscriptions CreateOrUpdate. */ public final class PartnerTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: PartnerTopicEventSubscriptions_CreateOrUpdate. @@ -35,6 +34,6 @@ public static void partnerTopicEventSubscriptionsCreateOrUpdate( .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteSamples.java index 5c4014702870..03cf4ffad668 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerTopicEventSubscriptions Delete. */ public final class PartnerTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_Delete.json */ /** * Sample code: PartnerTopicEventSubscriptions_Delete. @@ -20,6 +18,6 @@ public static void partnerTopicEventSubscriptionsDelete( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerTopicEventSubscriptions() - .delete("examplerg", "examplePartnerTopic1", "examplesubscription1", Context.NONE); + .delete("examplerg", "examplePartnerTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples.java index 2724906a99a4..f720fcfd8740 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerTopicEventSubscriptions GetDeliveryAttributes. */ public final class PartnerTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: PartnerTopicEventSubscriptions_GetDeliveryAttributes. @@ -21,6 +19,6 @@ public static void partnerTopicEventSubscriptionsGetDeliveryAttributes( manager .partnerTopicEventSubscriptions() .getDeliveryAttributesWithResponse( - "examplerg", "examplePartnerTopic1", "examplesubscription1", Context.NONE); + "examplerg", "examplePartnerTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlSamples.java index 419fb78f11b3..e64bc55609ca 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetFullUrlSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerTopicEventSubscriptions GetFullUrl. */ public final class PartnerTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: PartnerTopicEventSubscriptions_GetFullUrl. @@ -20,6 +18,7 @@ public static void partnerTopicEventSubscriptionsGetFullUrl( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerTopicEventSubscriptions() - .getFullUrlWithResponse("examplerg", "examplePartnerTopic1", "examplesubscription1", Context.NONE); + .getFullUrlWithResponse( + "examplerg", "examplePartnerTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetSamples.java index 2608487d7f73..59ad817b7f05 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerTopicEventSubscriptions Get. */ public final class PartnerTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_Get.json */ /** * Sample code: PartnerTopicEventSubscriptions_Get. @@ -19,6 +17,7 @@ public final class PartnerTopicEventSubscriptionsGetSamples { public static void partnerTopicEventSubscriptionsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerTopicEventSubscriptions() - .getWithResponse("examplerg", "examplePartnerTopic1", "examplesubscription1", Context.NONE); + .getWithResponse( + "examplerg", "examplePartnerTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsListByPartnerTopicSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsListByPartnerTopicSamples.java index e837b5508701..1a80dd8feabe 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsListByPartnerTopicSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsListByPartnerTopicSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerTopicEventSubscriptions ListByPartnerTopic. */ public final class PartnerTopicEventSubscriptionsListByPartnerTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_ListByPartnerTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_ListByPartnerTopic.json */ /** * Sample code: PartnerTopicEventSubscriptions_ListByPartnerTopic. @@ -20,6 +18,6 @@ public static void partnerTopicEventSubscriptionsListByPartnerTopic( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .partnerTopicEventSubscriptions() - .listByPartnerTopic("examplerg", "examplePartnerTopic1", null, null, Context.NONE); + .listByPartnerTopic("examplerg", "examplePartnerTopic1", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsUpdateSamples.java index 45807a959324..d76b4f1104dd 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicEventSubscriptionsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -13,7 +12,7 @@ /** Samples for PartnerTopicEventSubscriptions Update. */ public final class PartnerTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopicEventSubscriptions_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopicEventSubscriptions_Update.json */ /** * Sample code: PartnerTopicEventSubscriptions_Update. @@ -37,6 +36,6 @@ public static void partnerTopicEventSubscriptionsUpdate( .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateSamples.java index 1f962a0230bf..1390cf8933bb 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsActivateSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerTopics Activate. */ public final class PartnerTopicsActivateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_Activate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_Activate.json */ /** * Sample code: PartnerTopics_Activate. @@ -17,6 +15,8 @@ public final class PartnerTopicsActivateSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsActivate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().activateWithResponse("examplerg", "examplePartnerTopic1", Context.NONE); + manager + .partnerTopics() + .activateWithResponse("examplerg", "examplePartnerTopic1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateSamples.java index 2b711e47a0dc..3ff1168f2088 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for PartnerTopics CreateOrUpdate. */ public final class PartnerTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_CreateOrUpdate.json */ /** * Sample code: PartnerTopics_CreateOrUpdate. diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateSamples.java index bd698bdd1e83..a834db944a6f 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeactivateSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerTopics Deactivate. */ public final class PartnerTopicsDeactivateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_Deactivate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_Deactivate.json */ /** * Sample code: PartnerTopics_Deactivate. @@ -17,6 +15,8 @@ public final class PartnerTopicsDeactivateSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsDeactivate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().deactivateWithResponse("examplerg", "examplePartnerTopic1", Context.NONE); + manager + .partnerTopics() + .deactivateWithResponse("examplerg", "examplePartnerTopic1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteSamples.java index 9e7f511e2564..30b6219ca9e6 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerTopics Delete. */ public final class PartnerTopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_Delete.json */ /** * Sample code: PartnerTopics_Delete. @@ -17,6 +15,6 @@ public final class PartnerTopicsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().delete("examplerg", "examplePartnerTopicName1", Context.NONE); + manager.partnerTopics().delete("examplerg", "examplePartnerTopicName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupSamples.java index fd8b94ae52c6..40dc8205f284 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerTopics GetByResourceGroup. */ public final class PartnerTopicsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_Get.json */ /** * Sample code: PartnerTopics_Get. @@ -17,6 +15,8 @@ public final class PartnerTopicsGetByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().getByResourceGroupWithResponse("examplerg", "examplePartnerTopicName1", Context.NONE); + manager + .partnerTopics() + .getByResourceGroupWithResponse("examplerg", "examplePartnerTopicName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupSamples.java index 85bc256ba117..d5d0d0d146c0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerTopics ListByResourceGroup. */ public final class PartnerTopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_ListByResourceGroup.json */ /** * Sample code: PartnerTopics_ListByResourceGroup. @@ -17,6 +15,6 @@ public final class PartnerTopicsListByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.partnerTopics().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListSamples.java index d1894a9d1e70..177b69d766e4 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PartnerTopics List. */ public final class PartnerTopicsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_ListBySubscription.json */ /** * Sample code: PartnerTopics_ListBySubscription. @@ -17,6 +15,6 @@ public final class PartnerTopicsListSamples { * @param manager Entry point to EventGridManager. */ public static void partnerTopicsListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.partnerTopics().list(null, null, Context.NONE); + manager.partnerTopics().list(null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsUpdateSamples.java index 9742acd6e5d9..927cde855647 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PartnerTopicsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PartnerTopic; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for PartnerTopics Update. */ public final class PartnerTopicsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PartnerTopics_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PartnerTopics_Update.json */ /** * Sample code: PartnerTopics_Update. @@ -23,7 +22,8 @@ public static void partnerTopicsUpdate(com.azure.resourcemanager.eventgrid.Event PartnerTopic resource = manager .partnerTopics() - .getByResourceGroupWithResponse("examplerg", "examplePartnerTopicName1", Context.NONE) + .getByResourceGroupWithResponse( + "examplerg", "examplePartnerTopicName1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..c70978e3b561 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsCreateOrUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import com.azure.resourcemanager.eventgrid.models.PermissionType; + +/** Samples for PermissionBindings CreateOrUpdate. */ +public final class PermissionBindingsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PermissionBindings_CreateOrUpdate.json + */ + /** + * Sample code: PermissionBindings_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void permissionBindingsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .permissionBindings() + .define("examplePermissionBindingName1") + .withExistingNamespace("examplerg", "exampleNamespaceName1") + .withTopicSpaceName("exampleTopicSpaceName1") + .withPermission(PermissionType.PUBLISHER) + .withClientGroupName("exampleClientGroupName1") + .create(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsDeleteSamples.java new file mode 100644 index 000000000000..bd95423a75cb --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsDeleteSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for PermissionBindings Delete. */ +public final class PermissionBindingsDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PermissionBindings_Delete.json + */ + /** + * Sample code: PermissionBindings_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void permissionBindingsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .permissionBindings() + .delete( + "examplerg", + "exampleNamespaceName1", + "examplePermissionBindingName1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsGetSamples.java new file mode 100644 index 000000000000..0f30dc949d2f --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsGetSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for PermissionBindings Get. */ +public final class PermissionBindingsGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PermissionBindings_Get.json + */ + /** + * Sample code: PermissionBindings_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void permissionBindingsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .permissionBindings() + .getWithResponse( + "examplerg", + "exampleNamespaceName1", + "examplePermissionBindingName1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListByNamespaceSamples.java new file mode 100644 index 000000000000..9cc79f4cb8eb --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PermissionBindingsListByNamespaceSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for PermissionBindings ListByNamespace. */ +public final class PermissionBindingsListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PermissionBindings_ListByNamespace.json + */ + /** + * Sample code: PermissionBindings_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void permissionBindingsListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .permissionBindings() + .listByNamespace("examplerg", "namespace123", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsDeleteSamples.java index 83549ccf887b..bb47607d6146 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType; /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateEndpointConnections_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateEndpointConnections_Delete.json */ /** * Sample code: PrivateEndpointConnections_Delete. @@ -25,6 +24,6 @@ public static void privateEndpointConnectionsDelete(com.azure.resourcemanager.ev PrivateEndpointConnectionsParentType.TOPICS, "exampletopic1", "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetSamples.java index 2f4209d58424..56f859e32b8d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsGetSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType; /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateEndpointConnections_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateEndpointConnections_Get.json */ /** * Sample code: PrivateEndpointConnections_Get. @@ -25,6 +24,6 @@ public static void privateEndpointConnectionsGet(com.azure.resourcemanager.event PrivateEndpointConnectionsParentType.TOPICS, "exampletopic1", "BMTPE5.8A30D251-4C61-489D-A1AA-B37C4A329B8B", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceSamples.java index 542495ecc50a..3607562b6ebf 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsListByResourceSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.PrivateEndpointConnectionsParentType; /** Samples for PrivateEndpointConnections ListByResource. */ public final class PrivateEndpointConnectionsListByResourceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateEndpointConnections_ListByResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateEndpointConnections_ListByResource.json */ /** * Sample code: PrivateEndpointConnections_ListByResource. @@ -22,6 +21,11 @@ public static void privateEndpointConnectionsListByResource( manager .privateEndpointConnections() .listByResource( - "examplerg", PrivateEndpointConnectionsParentType.TOPICS, "exampletopic1", null, null, Context.NONE); + "examplerg", + PrivateEndpointConnectionsParentType.TOPICS, + "exampletopic1", + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateSamples.java index ed4da046b6e9..d1f6818cdbb0 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateEndpointConnectionsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.eventgrid.models.ConnectionState; import com.azure.resourcemanager.eventgrid.models.PersistedConnectionStatus; @@ -13,7 +12,7 @@ /** Samples for PrivateEndpointConnections Update. */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateEndpointConnections_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateEndpointConnections_Update.json */ /** * Sample code: PrivateEndpointConnections_Update. @@ -34,6 +33,6 @@ public static void privateEndpointConnectionsUpdate(com.azure.resourcemanager.ev .withStatus(PersistedConnectionStatus.APPROVED) .withDescription("approving connection") .withActionsRequired("None")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetSamples.java index 4cc2a035d230..f1cbd276c19c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateLinkResources_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateLinkResources_Get.json */ /** * Sample code: PrivateLinkResources_Get. @@ -17,6 +15,8 @@ public final class PrivateLinkResourcesGetSamples { * @param manager Entry point to EventGridManager. */ public static void privateLinkResourcesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.privateLinkResources().getWithResponse("examplerg", "topics", "exampletopic1", "topic", Context.NONE); + manager + .privateLinkResources() + .getWithResponse("examplerg", "topics", "exampletopic1", "topic", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceSamples.java index 3c2addcd3c8c..12293647b551 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/PrivateLinkResourcesListByResourceSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources ListByResource. */ public final class PrivateLinkResourcesListByResourceSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/PrivateLinkResources_ListByResource.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PrivateLinkResources_ListByResource.json */ /** * Sample code: PrivateLinkResources_ListByResource. @@ -18,6 +16,8 @@ public final class PrivateLinkResourcesListByResourceSamples { */ public static void privateLinkResourcesListByResource( com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.privateLinkResources().listByResource("examplerg", "topics", "exampletopic1", null, null, Context.NONE); + manager + .privateLinkResources() + .listByResource("examplerg", "topics", "exampletopic1", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsCreateOrUpdateSamples.java index fcd932af83bc..6a20af3a1643 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -12,7 +11,7 @@ /** Samples for SystemTopicEventSubscriptions CreateOrUpdate. */ public final class SystemTopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: SystemTopicEventSubscriptions_CreateOrUpdate. @@ -35,6 +34,6 @@ public static void systemTopicEventSubscriptionsCreateOrUpdate( .withSubjectBeginsWith("ExamplePrefix") .withSubjectEndsWith("ExampleSuffix") .withIsSubjectCaseSensitive(false)), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteSamples.java index 46721dc23f38..42b5279dae28 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for SystemTopicEventSubscriptions Delete. */ public final class SystemTopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_Delete.json */ /** * Sample code: SystemTopicEventSubscriptions_Delete. @@ -20,6 +18,6 @@ public static void systemTopicEventSubscriptionsDelete( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .systemTopicEventSubscriptions() - .delete("examplerg", "exampleSystemTopic1", "examplesubscription1", Context.NONE); + .delete("examplerg", "exampleSystemTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesSamples.java index 65fccff7c8af..cf97bc3e60be 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetDeliveryAttributesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for SystemTopicEventSubscriptions GetDeliveryAttributes. */ public final class SystemTopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: SystemTopicEventSubscriptions_GetDeliveryAttributes. @@ -21,6 +19,6 @@ public static void systemTopicEventSubscriptionsGetDeliveryAttributes( manager .systemTopicEventSubscriptions() .getDeliveryAttributesWithResponse( - "examplerg", "exampleSystemTopic1", "examplesubscription1", Context.NONE); + "examplerg", "exampleSystemTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlSamples.java index 3dbdf0c2b2b2..6e54814985ba 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetFullUrlSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for SystemTopicEventSubscriptions GetFullUrl. */ public final class SystemTopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: SystemTopicEventSubscriptions_GetFullUrl. @@ -20,6 +18,7 @@ public static void systemTopicEventSubscriptionsGetFullUrl( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .systemTopicEventSubscriptions() - .getFullUrlWithResponse("examplerg", "exampleSystemTopic1", "examplesubscription1", Context.NONE); + .getFullUrlWithResponse( + "examplerg", "exampleSystemTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetSamples.java index d7a6ea5b4bcc..565761c93728 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for SystemTopicEventSubscriptions Get. */ public final class SystemTopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_Get.json */ /** * Sample code: SystemTopicEventSubscriptions_Get. @@ -19,6 +17,7 @@ public final class SystemTopicEventSubscriptionsGetSamples { public static void systemTopicEventSubscriptionsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .systemTopicEventSubscriptions() - .getWithResponse("examplerg", "exampleSystemTopic1", "examplesubscription1", Context.NONE); + .getWithResponse( + "examplerg", "exampleSystemTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsListBySystemTopicSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsListBySystemTopicSamples.java index 7f02746a6ad6..71c0b4696642 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsListBySystemTopicSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsListBySystemTopicSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for SystemTopicEventSubscriptions ListBySystemTopic. */ public final class SystemTopicEventSubscriptionsListBySystemTopicSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_ListBySystemTopic.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_ListBySystemTopic.json */ /** * Sample code: SystemTopicEventSubscriptions_ListBySystemTopic. @@ -20,6 +18,6 @@ public static void systemTopicEventSubscriptionsListBySystemTopic( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .systemTopicEventSubscriptions() - .listBySystemTopic("examplerg", "exampleSystemTopic1", null, null, Context.NONE); + .listBySystemTopic("examplerg", "exampleSystemTopic1", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsUpdateSamples.java index 5df7b5e68f61..3b16bab359f8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicEventSubscriptionsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; @@ -13,7 +12,7 @@ /** Samples for SystemTopicEventSubscriptions Update. */ public final class SystemTopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopicEventSubscriptions_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopicEventSubscriptions_Update.json */ /** * Sample code: SystemTopicEventSubscriptions_Update. @@ -37,6 +36,6 @@ public static void systemTopicEventSubscriptionsUpdate( .withSubjectEndsWith("newSuffix") .withIsSubjectCaseSensitive(true)) .withLabels(Arrays.asList("label1", "label2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateSamples.java index adfbdb6fbb2f..f9bb55256149 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for SystemTopics CreateOrUpdate. */ public final class SystemTopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_CreateOrUpdate.json */ /** * Sample code: SystemTopics_CreateOrUpdate. @@ -25,7 +25,7 @@ public static void systemTopicsCreateOrUpdate(com.azure.resourcemanager.eventgri .withExistingResourceGroup("examplerg") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withSource( - "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e") + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e") .withTopicType("microsoft.storage.storageaccounts") .create(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteSamples.java index 9255474b0fab..ef9e8b95b53a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for SystemTopics Delete. */ public final class SystemTopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_Delete.json */ /** * Sample code: SystemTopics_Delete. @@ -17,6 +15,6 @@ public final class SystemTopicsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void systemTopicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.systemTopics().delete("examplerg", "exampleSystemTopic1", Context.NONE); + manager.systemTopics().delete("examplerg", "exampleSystemTopic1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupSamples.java index 3c0d56811c2b..565c14cf9db7 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for SystemTopics GetByResourceGroup. */ public final class SystemTopicsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_Get.json */ /** * Sample code: SystemTopics_Get. @@ -17,6 +15,8 @@ public final class SystemTopicsGetByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void systemTopicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.systemTopics().getByResourceGroupWithResponse("examplerg", "exampleSystemTopic2", Context.NONE); + manager + .systemTopics() + .getByResourceGroupWithResponse("examplerg", "exampleSystemTopic2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupSamples.java index 18a6d97a20e4..0031e396526a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for SystemTopics ListByResourceGroup. */ public final class SystemTopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_ListByResourceGroup.json */ /** * Sample code: SystemTopics_ListByResourceGroup. @@ -17,6 +15,6 @@ public final class SystemTopicsListByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void systemTopicsListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.systemTopics().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.systemTopics().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListSamples.java index 2224e6541a88..90b30b146a6b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for SystemTopics List. */ public final class SystemTopicsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_ListBySubscription.json */ /** * Sample code: SystemTopics_ListBySubscription. @@ -17,6 +15,6 @@ public final class SystemTopicsListSamples { * @param manager Entry point to EventGridManager. */ public static void systemTopicsListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.systemTopics().list(null, null, Context.NONE); + manager.systemTopics().list(null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsUpdateSamples.java index 5498028179ec..4a3fca17da67 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/SystemTopicsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.SystemTopic; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for SystemTopics Update. */ public final class SystemTopicsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/SystemTopics_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/SystemTopics_Update.json */ /** * Sample code: SystemTopics_Update. @@ -23,7 +22,7 @@ public static void systemTopicsUpdate(com.azure.resourcemanager.eventgrid.EventG SystemTopic resource = manager .systemTopics() - .getByResourceGroupWithResponse("examplerg", "exampleSystemTopic1", Context.NONE) + .getByResourceGroupWithResponse("examplerg", "exampleSystemTopic1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsCreateOrUpdateSamples.java index 61e0dafc7a9c..08ce2da34165 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsCreateOrUpdateSamples.java @@ -4,13 +4,14 @@ package com.azure.resourcemanager.eventgrid.generated; +import com.azure.resourcemanager.eventgrid.fluent.models.EventSubscriptionInner; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; /** Samples for TopicEventSubscriptions CreateOrUpdate. */ public final class TopicEventSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_CreateOrUpdate.json */ /** * Sample code: TopicEventSubscriptions_CreateOrUpdate. @@ -21,14 +22,18 @@ public static void topicEventSubscriptionsCreateOrUpdate( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .topicEventSubscriptions() - .define("exampleEventSubscriptionName1") - .withExistingTopic("examplerg", "exampleTopic1") - .withDestination(new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) - .withFilter( - new EventSubscriptionFilter() - .withSubjectBeginsWith("ExamplePrefix") - .withSubjectEndsWith("ExampleSuffix") - .withIsSubjectCaseSensitive(false)) - .create(); + .createOrUpdate( + "examplerg", + "exampleTopic1", + "exampleEventSubscriptionName1", + new EventSubscriptionInner() + .withDestination( + new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) + .withFilter( + new EventSubscriptionFilter() + .withSubjectBeginsWith("ExamplePrefix") + .withSubjectEndsWith("ExampleSuffix") + .withIsSubjectCaseSensitive(false)), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteSamples.java index 25b1e5f5c396..55cf8c45e293 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for TopicEventSubscriptions Delete. */ public final class TopicEventSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_Delete.json */ /** * Sample code: TopicEventSubscriptions_Delete. @@ -17,6 +15,8 @@ public final class TopicEventSubscriptionsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void topicEventSubscriptionsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topicEventSubscriptions().delete("examplerg", "exampleTopic1", "examplesubscription1", Context.NONE); + manager + .topicEventSubscriptions() + .delete("examplerg", "exampleTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesSamples.java index e35b1c2c9c52..0cdc3c852145 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetDeliveryAttributesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for TopicEventSubscriptions GetDeliveryAttributes. */ public final class TopicEventSubscriptionsGetDeliveryAttributesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_GetDeliveryAttributes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_GetDeliveryAttributes.json */ /** * Sample code: TopicEventSubscriptions_GetDeliveryAttributes. @@ -20,6 +18,7 @@ public static void topicEventSubscriptionsGetDeliveryAttributes( com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .topicEventSubscriptions() - .getDeliveryAttributesWithResponse("examplerg", "exampleTopic1", "examplesubscription1", Context.NONE); + .getDeliveryAttributesWithResponse( + "examplerg", "exampleTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlSamples.java index 485af3d84e2f..8237b3b0b609 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetFullUrlSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for TopicEventSubscriptions GetFullUrl. */ public final class TopicEventSubscriptionsGetFullUrlSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_GetFullUrl.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_GetFullUrl.json */ /** * Sample code: TopicEventSubscriptions_GetFullUrl. @@ -19,6 +17,7 @@ public final class TopicEventSubscriptionsGetFullUrlSamples { public static void topicEventSubscriptionsGetFullUrl(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .topicEventSubscriptions() - .getFullUrlWithResponse("examplerg", "exampleTopic1", "examplesubscription1", Context.NONE); + .getFullUrlWithResponse( + "examplerg", "exampleTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetSamples.java index a842ae6f6b36..9b5a89393884 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for TopicEventSubscriptions Get. */ public final class TopicEventSubscriptionsGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_Get.json */ /** * Sample code: TopicEventSubscriptions_Get. @@ -19,6 +17,6 @@ public final class TopicEventSubscriptionsGetSamples { public static void topicEventSubscriptionsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .topicEventSubscriptions() - .getWithResponse("examplerg", "exampleTopic1", "examplesubscription1", Context.NONE); + .getWithResponse("examplerg", "exampleTopic1", "examplesubscription1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsListSamples.java index ecdd66ffd6be..31cbcc2eb35d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for TopicEventSubscriptions List. */ public final class TopicEventSubscriptionsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_List.json */ /** * Sample code: TopicEventSubscriptions_List. @@ -17,6 +15,8 @@ public final class TopicEventSubscriptionsListSamples { * @param manager Entry point to EventGridManager. */ public static void topicEventSubscriptionsList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topicEventSubscriptions().list("examplerg", "exampleTopic1", null, null, Context.NONE); + manager + .topicEventSubscriptions() + .list("examplerg", "exampleTopic1", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsUpdateSamples.java index 764e05c7a7dc..b2479b2fe59e 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicEventSubscriptionsUpdateSamples.java @@ -4,16 +4,15 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.eventgrid.models.EventSubscription; import com.azure.resourcemanager.eventgrid.models.EventSubscriptionFilter; +import com.azure.resourcemanager.eventgrid.models.EventSubscriptionUpdateParameters; import com.azure.resourcemanager.eventgrid.models.WebhookEventSubscriptionDestination; import java.util.Arrays; /** Samples for TopicEventSubscriptions Update. */ public final class TopicEventSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicEventSubscriptions_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicEventSubscriptions_Update.json */ /** * Sample code: TopicEventSubscriptions_Update. @@ -21,20 +20,21 @@ public final class TopicEventSubscriptionsUpdateSamples { * @param manager Entry point to EventGridManager. */ public static void topicEventSubscriptionsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - EventSubscription resource = - manager - .topicEventSubscriptions() - .getWithResponse("examplerg", "exampleTopic1", "exampleEventSubscriptionName1", Context.NONE) - .getValue(); - resource - .update() - .withDestination(new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) - .withFilter( - new EventSubscriptionFilter() - .withSubjectBeginsWith("existingPrefix") - .withSubjectEndsWith("newSuffix") - .withIsSubjectCaseSensitive(true)) - .withLabels(Arrays.asList("label1", "label2")) - .apply(); + manager + .topicEventSubscriptions() + .update( + "examplerg", + "exampleTopic1", + "exampleEventSubscriptionName1", + new EventSubscriptionUpdateParameters() + .withDestination( + new WebhookEventSubscriptionDestination().withEndpointUrl("https://requestb.in/15ksip71")) + .withFilter( + new EventSubscriptionFilter() + .withSubjectBeginsWith("existingPrefix") + .withSubjectEndsWith("newSuffix") + .withIsSubjectCaseSensitive(true)) + .withLabels(Arrays.asList("label1", "label2")), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..b83ce457325b --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesCreateOrUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +import java.util.Arrays; + +/** Samples for TopicSpaces CreateOrUpdate. */ +public final class TopicSpacesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicSpaces_CreateOrUpdate.json + */ + /** + * Sample code: TopicSpaces_CreateOrUpdate. + * + * @param manager Entry point to EventGridManager. + */ + public static void topicSpacesCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .topicSpaces() + .define("exampleTopicSpaceName1") + .withExistingNamespace("examplerg", "exampleNamespaceName1") + .withTopicTemplates(Arrays.asList("filter1", "filter2")) + .create(); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesDeleteSamples.java new file mode 100644 index 000000000000..795fb04b9b47 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for TopicSpaces Delete. */ +public final class TopicSpacesDeleteSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicSpaces_Delete.json + */ + /** + * Sample code: TopicSpaces_Delete. + * + * @param manager Entry point to EventGridManager. + */ + public static void topicSpacesDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .topicSpaces() + .delete("examplerg", "exampleNamespaceName1", "exampleTopicSpaceName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesGetSamples.java new file mode 100644 index 000000000000..fdebf966af71 --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for TopicSpaces Get. */ +public final class TopicSpacesGetSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicSpaces_Get.json + */ + /** + * Sample code: TopicSpaces_Get. + * + * @param manager Entry point to EventGridManager. + */ + public static void topicSpacesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .topicSpaces() + .getWithResponse( + "examplerg", "exampleNamespaceName1", "exampleTopicSpaceName1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListByNamespaceSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListByNamespaceSamples.java new file mode 100644 index 000000000000..7696b67140cd --- /dev/null +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicSpacesListByNamespaceSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.eventgrid.generated; + +/** Samples for TopicSpaces ListByNamespace. */ +public final class TopicSpacesListByNamespaceSamples { + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicSpaces_ListByNamespace.json + */ + /** + * Sample code: TopicSpaces_ListByNamespace. + * + * @param manager Entry point to EventGridManager. + */ + public static void topicSpacesListByNamespace(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .topicSpaces() + .listByNamespace("examplerg", "namespace123", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetSamples.java index 6e7490842404..b9d48ec85bc9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for TopicTypes Get. */ public final class TopicTypesGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicTypes_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicTypes_Get.json */ /** * Sample code: TopicTypes_Get. @@ -17,6 +15,6 @@ public final class TopicTypesGetSamples { * @param manager Entry point to EventGridManager. */ public static void topicTypesGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topicTypes().getWithResponse("Microsoft.Storage.StorageAccounts", Context.NONE); + manager.topicTypes().getWithResponse("Microsoft.Storage.StorageAccounts", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesSamples.java index f05d84c7c64b..12bd3fce491d 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListEventTypesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for TopicTypes ListEventTypes. */ public final class TopicTypesListEventTypesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicTypes_ListEventTypes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicTypes_ListEventTypes.json */ /** * Sample code: TopicTypes_ListEventTypes. @@ -17,6 +15,6 @@ public final class TopicTypesListEventTypesSamples { * @param manager Entry point to EventGridManager. */ public static void topicTypesListEventTypes(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topicTypes().listEventTypes("Microsoft.Storage.StorageAccounts", Context.NONE); + manager.topicTypes().listEventTypes("Microsoft.Storage.StorageAccounts", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListSamples.java index c0d07ed8608e..02d12b86dd1a 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicTypesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for TopicTypes List. */ public final class TopicTypesListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/TopicTypes_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicTypes_List.json */ /** * Sample code: TopicTypes_List. @@ -17,6 +15,6 @@ public final class TopicTypesListSamples { * @param manager Entry point to EventGridManager. */ public static void topicTypesList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topicTypes().list(Context.NONE); + manager.topicTypes().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsCreateOrUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsCreateOrUpdateSamples.java index ded23628614d..7809ebea5b54 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsCreateOrUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsCreateOrUpdateSamples.java @@ -4,9 +4,12 @@ package com.azure.resourcemanager.eventgrid.generated; +import com.azure.resourcemanager.eventgrid.models.ExtendedLocation; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; +import com.azure.resourcemanager.eventgrid.models.InputSchema; import com.azure.resourcemanager.eventgrid.models.IpActionType; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; +import com.azure.resourcemanager.eventgrid.models.ResourceKind; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -14,7 +17,7 @@ /** Samples for Topics CreateOrUpdate. */ public final class TopicsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_CreateOrUpdate.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_CreateOrUpdate.json */ /** * Sample code: Topics_CreateOrUpdate. @@ -37,6 +40,31 @@ public static void topicsCreateOrUpdate(com.azure.resourcemanager.eventgrid.Even .create(); } + /* + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_CreateOrUpdateForAzureArc.json + */ + /** + * Sample code: Topics_CreateOrUpdateForAzureArc. + * + * @param manager Entry point to EventGridManager. + */ + public static void topicsCreateOrUpdateForAzureArc(com.azure.resourcemanager.eventgrid.EventGridManager manager) { + manager + .topics() + .define("exampletopic1") + .withRegion("westus2") + .withExistingResourceGroup("examplerg") + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withKind(ResourceKind.AZURE_ARC) + .withExtendedLocation( + new ExtendedLocation() + .withName( + "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourcegroups/examplerg/providers/Microsoft.ExtendedLocation/CustomLocations/exampleCustomLocation") + .withType("CustomLocation")) + .withInputSchema(InputSchema.CLOUD_EVENT_SCHEMA_V1_0) + .create(); + } + @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsDeleteSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsDeleteSamples.java index 7f431683afb8..01d2f0e20805 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsDeleteSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Topics Delete. */ public final class TopicsDeleteSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_Delete.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_Delete.json */ /** * Sample code: Topics_Delete. @@ -17,6 +15,6 @@ public final class TopicsDeleteSamples { * @param manager Entry point to EventGridManager. */ public static void topicsDelete(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().delete("examplerg", "exampletopic1", Context.NONE); + manager.topics().delete("examplerg1", "exampletopic1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupSamples.java index b5a6f19e38eb..25c15fbde8de 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Topics GetByResourceGroup. */ public final class TopicsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_Get.json */ /** * Sample code: Topics_Get. @@ -17,6 +15,6 @@ public final class TopicsGetByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void topicsGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().getByResourceGroupWithResponse("examplerg", "exampletopic2", Context.NONE); + manager.topics().getByResourceGroupWithResponse("examplerg", "exampletopic2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupSamples.java index b15b23aa3292..5a76868ed659 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Topics ListByResourceGroup. */ public final class TopicsListByResourceGroupSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_ListByResourceGroup.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_ListByResourceGroup.json */ /** * Sample code: Topics_ListByResourceGroup. @@ -17,6 +15,6 @@ public final class TopicsListByResourceGroupSamples { * @param manager Entry point to EventGridManager. */ public static void topicsListByResourceGroup(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().listByResourceGroup("examplerg", null, null, Context.NONE); + manager.topics().listByResourceGroup("examplerg", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesSamples.java index 43add6ea6a6d..f186271dd534 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListEventTypesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Topics ListEventTypes. */ public final class TopicsListEventTypesSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_ListEventTypes.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_ListEventTypes.json */ /** * Sample code: Topics_ListEventTypes. @@ -19,6 +17,11 @@ public final class TopicsListEventTypesSamples { public static void topicsListEventTypes(com.azure.resourcemanager.eventgrid.EventGridManager manager) { manager .topics() - .listEventTypes("examplerg", "Microsoft.Storage", "storageAccounts", "ExampleStorageAccount", Context.NONE); + .listEventTypes( + "examplerg", + "Microsoft.Storage", + "storageAccounts", + "ExampleStorageAccount", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSamples.java index 682bd301cdbe..e525e937e49c 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Topics List. */ public final class TopicsListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_ListBySubscription.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_ListBySubscription.json */ /** * Sample code: Topics_ListBySubscription. @@ -17,6 +15,6 @@ public final class TopicsListSamples { * @param manager Entry point to EventGridManager. */ public static void topicsListBySubscription(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().list(null, null, Context.NONE); + manager.topics().list(null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSharedAccessKeysSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSharedAccessKeysSamples.java index b6d5f9932c67..51c3dc3f538b 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSharedAccessKeysSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsListSharedAccessKeysSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for Topics ListSharedAccessKeys. */ public final class TopicsListSharedAccessKeysSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_ListSharedAccessKeys.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_ListSharedAccessKeys.json */ /** * Sample code: Topics_ListSharedAccessKeys. @@ -17,6 +15,8 @@ public final class TopicsListSharedAccessKeysSamples { * @param manager Entry point to EventGridManager. */ public static void topicsListSharedAccessKeys(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.topics().listSharedAccessKeysWithResponse("examplerg", "exampletopic2", Context.NONE); + manager + .topics() + .listSharedAccessKeysWithResponse("examplerg", "exampletopic2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsRegenerateKeySamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsRegenerateKeySamples.java index 4adc07406bf0..2d8f0b24bbd8 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsRegenerateKeySamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsRegenerateKeySamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.TopicRegenerateKeyRequest; /** Samples for Topics RegenerateKey. */ public final class TopicsRegenerateKeySamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_RegenerateKey.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_RegenerateKey.json */ /** * Sample code: Topics_RegenerateKey. @@ -21,6 +20,9 @@ public static void topicsRegenerateKey(com.azure.resourcemanager.eventgrid.Event manager .topics() .regenerateKey( - "examplerg", "exampletopic2", new TopicRegenerateKeyRequest().withKeyName("key1"), Context.NONE); + "examplerg", + "exampletopic2", + new TopicRegenerateKeyRequest().withKeyName("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsUpdateSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsUpdateSamples.java index 433f2cfb244e..c40b8684e1e9 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsUpdateSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/TopicsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.eventgrid.models.InboundIpRule; import com.azure.resourcemanager.eventgrid.models.IpActionType; import com.azure.resourcemanager.eventgrid.models.PublicNetworkAccess; @@ -16,7 +15,7 @@ /** Samples for Topics Update. */ public final class TopicsUpdateSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/Topics_Update.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/Topics_Update.json */ /** * Sample code: Topics_Update. @@ -25,7 +24,10 @@ public final class TopicsUpdateSamples { */ public static void topicsUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) { Topic resource = - manager.topics().getByResourceGroupWithResponse("examplerg", "exampletopic1", Context.NONE).getValue(); + manager + .topics() + .getByResourceGroupWithResponse("examplerg", "exampletopic1", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetSamples.java index 9f37aea34e06..0272f3454842 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for VerifiedPartners Get. */ public final class VerifiedPartnersGetSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/VerifiedPartners_Get.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/VerifiedPartners_Get.json */ /** * Sample code: VerifiedPartners_Get. @@ -17,6 +15,6 @@ public final class VerifiedPartnersGetSamples { * @param manager Entry point to EventGridManager. */ public static void verifiedPartnersGet(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.verifiedPartners().getWithResponse("Contoso.Finance", Context.NONE); + manager.verifiedPartners().getWithResponse("Contoso.Finance", com.azure.core.util.Context.NONE); } } diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListSamples.java b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListSamples.java index 05cbe202c6bd..94ef8b3e6980 100644 --- a/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListSamples.java +++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/src/samples/java/com/azure/resourcemanager/eventgrid/generated/VerifiedPartnersListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.eventgrid.generated; -import com.azure.core.util.Context; - /** Samples for VerifiedPartners List. */ public final class VerifiedPartnersListSamples { /* - * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2022-06-15/examples/VerifiedPartners_List.json + * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/VerifiedPartners_List.json */ /** * Sample code: VerifiedPartners_List. @@ -17,6 +15,6 @@ public final class VerifiedPartnersListSamples { * @param manager Entry point to EventGridManager. */ public static void verifiedPartnersList(com.azure.resourcemanager.eventgrid.EventGridManager manager) { - manager.verifiedPartners().list(null, null, Context.NONE); + manager.verifiedPartners().list(null, null, com.azure.core.util.Context.NONE); } }